# πŸ—οΈ Ashiba **Ashiba** (θΆ³ε ΄) means β€œscaffolding” in Japanese β€” a blazing-fast file scaffolding CLI built with **Bun**. Define reusable project templates using TOML, and generate files in miliseconds from the command line. --- ## ✨ Features - ⚑ **Instant startup** β€” built on Bun, optimized for speed - 🧩 **Template-based generation** β€” define scaffolds in `.ashiba/` - πŸ—„οΈ **TOML-powered config** β€” readable, minimal, and flexible - 🧠 **Interactive prompts** β€” guided input with select/dropdown support - πŸͺΆ **Lightweight architecture** β€” clean separation of CLI, config, and file logic - πŸ”Œ **Extensible commands** β€” powered by [commander](https://github.com/tj/commander.js) for structured CLI parsing --- ## πŸ“¦ Installation Once published, install globally with Bun: ```bash bun install -g @ashiba-dev/ashiba ``` For local development: ```bash bun link ``` Then you can run `ashiba` anywhere on your system. --- ## 🧱 Quick Start Create a `.ashiba` directory in your project root: ``` .ashiba/ β”œβ”€ blog-post.toml β”œβ”€ blog-post/ β”‚ └─ {title}.md ``` Define your scaffold config in `blog-post.toml`: ```toml description = "A basic blog post template" order = ["title", "author"] [title] description = "The title of the post" [author] description = "Who wrote the blog post" select = ["Nick", "Alice", "Jean"] ``` Then generate your scaffold: ```bash ashiba new blog-post -o path/to/where/you/want/the/generated/files ``` You’ll be prompted for each field: ``` ? The title of the post: Hello World ? Who wrote the blog post: Alice ``` Ashiba will interpolate variables into filenames and contents: ``` ./ └── Hello World.md ``` --- ## πŸ“‹ Input Types Ashiba supports four input types in your TOML config: **Text** β€” Standard text input ```toml [name] description = "The name of the file" ``` **Number** β€” Numeric input with optional min/max validation ```toml [reading_goal] description = "How many books do you want to read?" type = "number" default = 5 min = 1 max = 100 ``` **Select** β€” Choose from predefined options ```toml [author] description = "Who is writing the thing?" select = ["Larry", "Curly", "Moe"] ``` **Confirm** β€” Boolean yes/no prompt ```toml [publish] confirm = "Should this be published now?" ``` --- ## πŸ”§ Project Architecture ``` ashiba/ β”œβ”€ src/ β”‚ β”œβ”€ cli/ β”‚ β”‚ β”œβ”€ index.ts # CLI entry point & program setup β”‚ β”‚ └─ commands/ β”‚ β”‚ β”œβ”€ index.ts # Command exports β”‚ β”‚ β”œβ”€ new.ts # Scaffold new template command β”‚ β”‚ └─ list.ts # List templates command β”‚ β”œβ”€ core/ β”‚ β”‚ β”œβ”€ config.ts # Loads and validates TOML configs β”‚ β”‚ β”œβ”€ scaffold.ts # Core file generation & interpolation β”‚ β”‚ β”œβ”€ prompt.ts # Interactive CLI prompts β”‚ β”‚ └─ templates.ts # Template discovery & metadata β”‚ └─ utils/ β”‚ └─ fs.ts # File system utilities β”œβ”€ .ashiba/ # User template definitions β”œβ”€ dist/ # Compiled binary output β”œβ”€ package.json β”œβ”€ tsconfig.json β”œβ”€ bunfig.toml └─ README.md ``` ### Core commands | Command | Description | | ----------------------- | ------------------------------------------------- | | `ashiba new