Prerequisites
Before you begin, ensure you have:- Node.js (v18 or higher recommended)
- npm or yarn package manager
- Git for version control
Setup Steps
Install dependencies
Install all dependencies for the monorepo:This will install dependencies for all workspace packages (CLI and docs site).
Build all packages
Build all packages in the monorepo:This runs:
build:cli- Compiles the CLI TypeScript code and copies templatesbuild:web- Builds the documentation site
Link the CLI globally
To test the CLI as if it were installed globally, create a symlink:This creates a global symlink, allowing you to run the CLI from anywhere:You should see your local development version number.
Development Workflow
Running the CLI in Development
You have several options for testing during development:Option 1: Using tsx (Recommended)
The fastest way to test changes without rebuilding:tsx which executes TypeScript directly.
Option 2: Build and Link
Rebuild and test the compiled version:Option 3: Watch Mode
Automatically rebuild on changes:Running the Docs Site
To work on the documentation site locally:http://localhost:5173 (or another port if 5173 is in use).
Available Scripts
From the root of the monorepo:| Script | Description |
|---|---|
yarn dev:web | Start the docs site in development mode |
yarn dev:cli | Run the CLI in development mode with tsx |
yarn build:web | Build the docs site for production |
yarn build:cli | Build the CLI package |
yarn build | Build all packages |
Testing Your Changes
Test different combinations of:- Frameworks: Express, Fastify
- Databases: MySQL, PostgreSQL, MongoDB
- ORMs: Drizzle, Prisma, Mongoose
Unlinking the CLI
When you’re done with development, you can unlink the CLI:Troubleshooting
Permission Errors
If you get permission errors when linking:CLI Not Found After Linking
Make sure your npm global bin directory is in your PATH:Changes Not Reflecting
If your changes aren’t showing up:- Make sure you rebuilt the CLI:
yarn build:cli - Check you’re running the linked version:
which create-node-blueprint - Try unlinking and relinking
Next Steps
Monorepo Structure
Understand how the codebase is organized
Adding Templates
Learn how to add new framework, database, or ORM templates