A simple, interactive Bash project generator that scaffolds a modern static web structure for you in seconds. It generates a semantic index.html, a modern dark-themed styles/style.css, and a production-ready src/main.js.
Thanks to npm, you don't even need to clone this repository or download any files. You can execute Webash instantly from anywhere using npx:
npx webash-cliDepending on your preference, Webash will scaffold the following modern structure either directly in your current directory or inside a new dedicated folder:
<project_name>/
├─ index.html
├─ assets/
├─ src/
│ └─ main.js
└─ styles/
└─ style.css
- Clean HTML5 semantic layout.
- Pre-linked to
styles/style.cssandsrc/main.js. - Responsive viewport configuration.
- Modern Dark Mode theme out-of-the-box using CSS custom properties (variables).
- Clean global layout reset (
* { margin: 0; padding: 0; box-sizing: border-box; }). - Fully centered Glassmorphism/Dark UI container box using Flexbox.
- Built-in badge and modern typography styles.
- Safe initialization enclosed inside a
DOMContentLoadedevent listener. - Dynamic console greeting mapping your exact project name.
When executed, Webash guides you through a streamlined CLI setup:
- Branding: Displays a stylized ASCII Art logo bound to the current framework global version.
- Environment Scan: Prints your exact current working directory path.
- Deployment Mode Choice: Prompts you whether to create a new subfolder
(y/N).
- If No (Default): Deploys files directly in your current workspace, dynamically adapting the project metadata to your current folder name.
- If Yes: Prompts for a project name (falls back to
web_projectif left blank).
- Smart Conflict Resolution: If the requested folder already exists, Webash triggers an interactive loop asking whether you want to Overwrite it
[y/N]or Pick another name safely without losing data. - Boilerplate Injection: Creates all folders and injects the semantic premium web template.
- Architecture Tree: Outputs a visual breakdown of your new project (
treebinary if available, otherwise falls back to a recursivels -R).
- Linux / macOS / WSL shell environment running Bash.
- Standard system binaries:
mkdir,cat,tr,basename. - Node.js & npm (Only if you wish to run it globally via
npx). - Optional:
treecommand for advanced post-generation structural logging.
If you prefer to download and run the script locally instead of using npx:
- Make sure the script is granted execution permissions:
chmod +x webash.sh- Fire it up:
./webash.shWebash prioritizes your data safety. Unlike previous versions, it will never delete data automatically.
- If a folder collision occurs, the script enters a protective state.
- Existing files are wiped using
rm -rfonly if you explicitly typeyoryeswhen prompted to overwrite.
The script is modular by design. You can easily modify the script's cat << EOF sections to:
- Inject your favorite CSS frameworks (Tailwind CSS CDN, FontAwesome, etc.).
- Add multi-page scaffolding templates (e.g.,
about.html,contact.html). - Preset specific JavaScript utilities or state management templates inside
src/main.js.
This project is open-source software licensed under the MIT License.
Hermas Francisco (fhermas22) — Pragmatic software engineering and automated environments.