Framework-agnostic CLI scaffolding tool for backend applications
npm install stacky-cli
Framework-agnostic CLI scaffolding tool for backend applications
Installation •
Usage •
Features •
Roadmap •
Contributing
---
Stacky is a CLI tool that scaffolds production-ready backend projects with your choice of framework, runtime, database, and authentication. It uses a plugin-based architecture following the Strategy Pattern for extreme modularity.
Why Stacky?
- Start projects in seconds, not hours
- Production-ready setup with Docker, CORS, logging, and health checks
- Mix and match frameworks, runtimes, databases, and auth providers
- Consistent project structure across different tech stacks
- Commander.js - CLI framework
- Clack - Beautiful CLI prompts
- TypeScript - Type safety
---
``bash`
npm install -g stacky-cli
Or use directly with npx:
`bash`
npx stacky-cli my-app
---
Simply run stacky and follow the prompts:
`bash`
stacky
Skip the prompts with flags:
`bash`
stacky my-app -f hono -r bun -d drizzle -a better-auth -i
| Flag | Description | Values |
|------|-------------|--------|
| -f, --framework | Web framework | hono, express, fastify |-r, --runtime
| | JavaScript runtime | node, bun |-d, --database
| | Database ORM | prisma, drizzle |-a, --auth
| | Authentication | better-auth, passport |-i, --install
| | Auto-install dependencies | - |--no-docker
| | Skip Docker setup | - |--no-cors
| | Skip CORS middleware | - |--no-logging
| | Skip request logging | - |--no-health
| | Skip health endpoint | - |
Hono + Bun + Drizzle + Better Auth:
`bash`
stacky my-api -f hono -r bun -d drizzle -a better-auth -i
Express + Node (minimal):
`bash`
stacky my-api -f express -r node --no-docker
Fastify + Prisma:
`bash`
stacky my-api -f fastify -r node -d prisma -i
---
| Framework | Description |
|-----------|-------------|
| Hono | Ultra-fast, lightweight, Web Standards |
| Express | Classic, mature ecosystem |
| Fastify | High performance, schema validation |
| Runtime | Description |
|---------|-------------|
| Node.js | Stable, widely supported |
| Bun | Fast, modern, batteries included |
| ORM | Description |
|-----|-------------|
| Drizzle | Lightweight, SQL-like, type-safe |
| Prisma | Full-featured, migrations, studio |
| Provider | Description |
|----------|-------------|
| Better Auth | Modern, session-based, easy setup |
| Passport | Classic, 500+ strategies |
``
my-app/
├── src/
│ ├── index.ts # App entry point
│ ├── db/ # Database (Drizzle)
│ │ ├── index.ts
│ │ └── schema.ts
│ └── lib/
│ └── auth.ts # Auth config
├── prisma/ # Database (Prisma)
│ └── schema.prisma
├── .env
├── .env.example
├── .gitignore
├── .dockerignore
├── Dockerfile
├── drizzle.config.ts
├── eslint.config.js
├── package.json
├── tsconfig.json
└── README.md
- TypeScript - Strict mode enabled
- ESLint - ESLint 9 flat config with TypeScript support
- Docker - Production-ready Dockerfile
- Environment - .env and .env.example files/health
- Health Check - endpoint
- CORS - Cross-origin resource sharing
- Logging - Request logging middleware
---
- [x] Core CLI with interactive prompts
- [x] Hono, Express, Fastify frameworks
- [x] Node.js and Bun runtimes
- [x] Prisma and Drizzle ORMs
- [x] Better Auth and Passport authentication
- [x] Docker support
- [x] ESLint configuration
- [ ] Testing setup (Vitest)
- [ ] CI/CD templates (GitHub Actions)
- [ ] More auth providers (Lucia, Auth.js)
- [ ] Redis/caching support
- [ ] OpenAPI/Swagger generation
- [ ] Monorepo support
---
Contributions are welcome! Here's how:
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature'
3. Commit your changes ()git push origin feature/amazing-feature
4. Push to the branch ()
5. Open a Pull Request
Plugins follow the Strategy Pattern. See existing plugins in:
- src/plugins/frameworks/ - Framework pluginssrc/plugins/databases/
- - Database pluginssrc/plugins/auth/
- - Auth plugins
---
Distributed under the MIT License. See LICENSE` for more information.
---
- create-t3-app - Inspiration for interactive CLI
- Hono - Amazing web framework
- Drizzle - TypeScript ORM
- Better Auth - Modern authentication
---