foldera
v1.0.0
Published
π Foldera CLI - Foldera is a blazingβfast project scaffolding CLI. Bootstrap modern stacks in seconds with interactive prompts, preβbaked templates, and smart defaults
Maintainers
Readme
π FOLDERA β The Fast Project Generator
ββββββββ βββββββ βββ ββββββββ ββββββββ βββββββ ββββββ
ββββββββ βββββββββ βββ ββ βββ ββββββββ ββββββββ ββββββββ
ββββββ βββ βββ βββ ββ βββ ββββββ ββββββββ ββββββββ
βββ βββ βββ βββ ββ βββ ββββββ ββββββ ββββββββ
βββ ββββββββ ββββββββ ββββββ β ββββββββ βββ βββ βββ βββ
βββ βββββββ ββββββββ βββββββ ββββββββ βββ βββ βββFoldera is a blazingβfast project scaffolding CLI. Bootstrap modern stacks in seconds with interactive prompts, preβbaked templates, and smart defaults.
β¨ Features
- β‘ Instant scaffolding:
npx foldera my-app - π¨ Templates: Node (basic), React + Vite + Tailwind + Nodejs + Express (fullstack), Express API
- π Interactive UX via Clack prompts
- π¦ Autoβinstall dependencies (root + nested
client/,server/) - π Update notifier builtβin
- π§© Extensible commands (
init) - π οΈ Clean, modular architecture (ESM)
π¦ Installation
# Global install
npm install -g foldera
# OR run directly
npx foldera my-appπ Quick Start
Default Generator (Interactive)
foldera # asks for name, template, installNamed Project (Interactive Template)
foldera my-app # skips name prompt, picks template interactivelyFully NonβInteractive
foldera my-app nodejs # name + template providedExplicit Command
foldera generate # same interactive generatorInitialize Existing Folder
foldera initAdd a Feature Later
foldera add tailwindποΈ Templates
- nodejs β Minimal Node.js starter
- fullstack-vite β React + Vite + Tailwind, prewired configs
- express-api β RESTful API skeleton with routing & scripts
Use a template directly:
npx foldera my-app react-basicπ·οΈ Flags
--help,-hβ Show help--version,-vβ Show installed version
Strict flags: Unknown flags (e.g.,
--helo) produce an error. Use--helpto see valid options.
π οΈ Project Architecture
project-root/
β
βββ app.js # CLI entry β runs src/core/cli.js
β
βββ /src
β βββ /core
β β βββ cli.js # Router: parses flags/args, dispatches
β β βββ prompts.js # Clack prompts
β β βββ installer.js # npm installs (root + nested)
β β βββ notifier.js # update checks
β β βββ utils.js # helpers
β β
β βββ /commands
β β βββ index.js # registers commands
β β βββ generate.js # scaffold projects
β β βββ add.js # add features/templates
β β βββ init.js # init in existing dir
β β βββ help.js # help renderer
β β
β βββ /templates
β β βββ nodejs/
β β βββ fullstack-vite/
β β βββ express-api/
β β βββ config.json
π§ Template: React + Vite + Tailwind (Expectations)
Dependencies (dev): tailwindcss, @tailwindcss/vite, autoprefixer
index.css
@import "tailwindcss";
App.jsx (sample)
export default function App() {
return (
<div className="text-4xl font-semibold text-center mt-10">
π Tailwind is ready!
</div>
);
}βοΈ Behavior & Routing Rules
- No args β run interactive generator.
npx foldera <folder-name>β treat<name>as project name, prompt for template & install.- Known command (e.g.,
init) β dispatch to command handler(still in development). - Flags first:
--help,-h,--version,-vhandled globally. - Strict flag mode: any unknown
--somethingβ error out with guidance.
π§ͺ Local Development
git clone https://github.com/your-username/foldera.git
cd foldera
npm install
npm link # use `foldera` globally during devRun CLI:
foldera --help
foldera my-appπ€ Contributing
- Use ESM (
import), no CommonJS - Keep commands small, focused
- Document changes in this README +
/docs - Add tests for new flags/commands
PR checklist:
- [ ] Feature works on Node 18/20+
- [ ] No breaking UX without docs
- [ ] Tests and docs updated
β FAQ
Q: How do I create a new project?
npx foldera my-app
Q: Can I specify the template directly?
npx foldera my-app react-basic
Q: How do I show help or version?
npx foldera --help, npx foldera --version
Q: Why do I get Unknown flag?
Flags are strict. Use exact names.
Q: Does it install nested deps (client/server)?
Yes. The installer scans root and known subfolders and runs npm install where needed.
π Deep Dives
For focused guides, see /docs:
- Architecture β
docs/architecture.md - Commands β
docs/commands.md
π License
MIT Β© 2025 Nikhil Mishra
