@boredooms/stackforge-cli
v0.2.0
Published
StackForge CLI — generate complete, compatibility-checked dev stack setup commands from your terminal
Maintainers
Readme
@boredooms/stackforge-cli
Generate complete, compatibility-checked dev stack setup commands — right from your terminal.
StackForge CLI shares the exact same stack-resolution engine, compatibility rules, and command generator as the StackForge web app. Whatever works in the browser works here, with zero drift between the two.
Install
npm install -g @boredooms/stackforge-cliOr run it without installing:
npx @boredooms/stackforge-cli create my-appQuick start
stackforge create my-appThis launches an interactive wizard that walks you through:
- Project category (SaaS, AI app, dashboard, blog, API, etc.)
- Core framework (Next.js, Astro, SvelteKit, Hono, and more)
- Language, package manager, styling system
- UI library, database, ORM, authentication provider
- Deployment target
- Optional dev tools (ESLint, Prettier, Vitest, Playwright, Husky, etc.)
Every selection is checked against a compatibility matrix before commands are generated, so you never get a setup that's broken out of the box (e.g. shadcn/ui + SvelteKit, or an ORM with no database selected).
Commands
stackforge create [project-name]
Runs the interactive stack wizard and prints the generated setup commands. By default it only
previews — nothing runs on your machine unless you pass --execute.
# Preview only (default) — copy the commands and run them yourself
stackforge create my-app
# Skip the wizard, use a built-in template
stackforge create my-app --template saas-next-supabase
# Generate, confirm, then let StackForge run the commands for you
stackforge create my-app --execute
# Fully non-interactive — for scripts, CI, or AI agents
stackforge create my-app --template saas-next-supabase --execute --no-confirm| Option | Description | Default |
|---|---|---|
| [project-name] | Project directory name | my-app |
| -t, --template <id> | Start from a built-in template (e.g. saas-next-supabase), skipping the wizard entirely | — |
| --pm <manager> | Package manager: npm | pnpm | bun | yarn | npm |
| --dry-run | Print commands only. Ignores --execute even if both are passed | — |
| -e, --execute | Run the generated commands on this machine after confirmation | off |
| --no-confirm | Skip the confirmation prompt before executing (pair with --execute) | — |
| --force | Execute even if incompatible stack selections were detected | off |
| --timeout <seconds> | Kill any single command that runs longer than this | none |
Execution safety model
StackForge separates generating commands from running them, and running is opt-in:
- Without
--execute(the default): commands are only generated and printed. Nothing touches your filesystem beyond that. This is unchanged from earlier versions. - With
--execute: StackForge shows you the full command list, asks for confirmation (unless--no-confirm), then runs each command in order using your real shell — so interactive sub-installers (shadcn init,prisma init,wrangler login,convex dev) can still prompt you directly instead of hanging. - Stops on the first failure. If any command exits non-zero, execution halts immediately and prints exactly which block and command failed, with the exit code. It never continues past an error or silently skips a broken step.
- Refuses incompatible stacks. If the compatibility engine flagged the selected stack as
incompatible,
--executeis blocked unless you also pass--force. cdis tracked, not spawned. Directory changes between commands are tracked internally (like a shell script would) rather than run as subprocesses, so multi-step flows likenpm create next-app my-app && cd my-app && npm installbehave correctly.--timeout <seconds>is there for headless runs (CI, agents) where no human is present to answer a stuck prompt — it kills any single command that exceeds the limit instead of hanging forever.
This is intentionally not a silent auto-installer: even with --execute, you always see every
command before it runs, and a broken step never gets papered over.
stackforge preview <config-file>
Loads a previously exported stack-config.json (from the web app or a saved CLI session) and
prints the commands it resolves to, without running the interactive wizard.
stackforge preview ./stack-config.jsonUseful for:
- Re-generating setup commands for a saved team stack
- Reviewing a config before sharing it with teammates
- CI checks that verify a config still resolves cleanly
stackforge doctor
Checks your local environment for the tooling StackForge-generated commands expect.
stackforge doctorStackForge Doctor
✓ Node.js v20.11.0
✓ npm 10.2.4
✓ git git version 2.43.0
✓ pnpm 8.15.1
– bun not installed
✓ yarn 1.22.21
All required tools found. You are ready to use StackForge.Required tools (node, npm, git) will exit with a non-zero code if missing. Optional
package managers (pnpm, bun, yarn) are reported but won't block you.
Global options
| Option | Description |
|---|---|
| -V, --version | Print the installed CLI version |
| -h, --help | Show help for the CLI or a specific command |
Example session
$ stackforge create my-saas
┌ STACKFORGE
│ Generate your perfect dev stack
│
◆ What are you building?
│ ● SaaS App
│ ○ AI App
│ ○ Dashboard
│ ...
│
◆ Choose a framework:
│ ● Next.js
│ ...
│
◇ Stack resolved successfully
▶ Create Project
┌───────────────────────────────────────────────────────────
│ $ npm create next-app@latest my-saas --typescript --tailwind --eslint --app
│ $ cd my-saas
└───────────────────────────────────────────────────────────
▶ Install Database
┌───────────────────────────────────────────────────────────
│ $ npm install @supabase/supabase-js
└───────────────────────────────────────────────────────────
✓ All compatibility checks passedExample: automatic execution
$ stackforge create my-saas --execute
┌ STACKFORGE
│ Generate your perfect dev stack
◇ Stack resolved successfully
▶ Create Project
┌───────────────────────────────────────────────────────────
│ $ npm create next-app@latest my-saas --typescript --tailwind
│ $ cd my-saas
└───────────────────────────────────────────────────────────
✓ All compatibility checks passed
● Run the commands above now? This will create files and install packages. (y/N) y
▶ Create Project
$ npm create next-app@latest my-saas --typescript --tailwind
✓ Create Project complete
▶ Install Database
$ npm install @supabase/supabase-js
✓ Install Database complete
└ ✓ my-saas is ready. Good luck with your project!If any step fails, StackForge stops immediately and tells you exactly which command broke:
▶ Install ORM
$ npm install -D prisma
✗ Command exited with code 1.
Block: Install ORM
Command: npm install -D prisma
└ Setup stopped early. Fix the issue above and re-run, or finish the remaining steps manually.Why generate-first, execute-second?
StackForge separates generation from execution by default, and makes execution an
explicit opt-in rather than automatic. The CLI resolves your stack, validates compatibility,
and shows you exact commands first — you decide whether it runs them or you do. This keeps the
tool auditable and safe to use in any environment, including CI, shared machines, or codebases
you don't fully control yet, while still giving you a genuine "just do it for me" path with
--execute when you want one.
Compatible stacks
StackForge supports and validates combinations across:
- Frameworks: Next.js, Astro, SvelteKit, Remix, Nuxt, Hono, Express, NestJS, Fastify, React + Vite
- Databases: Supabase, Convex, PostgreSQL, Neon, Turso, MongoDB, Firebase, MySQL
- ORMs: Prisma, Drizzle, Mongoose, Kysely
- Auth: Better Auth, Clerk, Auth.js, Supabase Auth, Firebase Auth, Auth0
- UI libraries: shadcn/ui, Radix UI, NextUI, Mantine, Chakra UI, Ant Design
- Deployment: Vercel, Netlify, Cloudflare, Railway, Fly.io, Render
- Package managers: npm, pnpm, bun, yarn
Incompatible combinations (e.g. shadcn/ui with a non-React framework, or an ORM with no database) are flagged before any commands are generated.
Related
- StackForge web app — the same engine, in your browser, with a live architecture preview and template gallery.
@stackforge/core— the shared schemas, compatibility rules, and command engine both surfaces run on.
License
MIT
