A code generator for JavaScript/TypeScript projects that helps you bootstrap monorepos, services, and packages with best practices and modern tooling.
- Monorepo Initialization: Create full-featured monorepos with workspaces
- Service Generation: Generate microservices with various feature combinations
- Package Creation: Create reusable packages within monorepos
- Single Repository Setup: Initialize standalone projects
- TypeScript with modern configuration
- Express.js for web services
- TypeORM with SQLite for database operations
- Testing with Vitest and coverage reporting
- Logging with Winston and custom logger integration
- CI/CD with GitLab CI templates
- ESLint with configurable rules (Node.js, Browser, React)
- Prettier with import sorting
- Husky for git hooks
- lint-staged for pre-commit checks
- Changesets for version management
- knip for dependency validation
- madge for circular dependency
npm install -g kodegenOr use directly with npx:
npx kodegen [command]npx kodegen monorepo initThis creates a monorepo with:
- Workspace configuration
- TypeScript base config
- ESLint and Prettier setup
- Git hooks with Husky
- CI/CD pipeline (optional)
- Testing setup (optional)
- Changesets support (optional)
npx kodegen monorepo add-packageCreates a reusable package with:
- TypeScript build configuration
- Testing setup (optional)
- Proper package.json structure
- README template
npx kodegen monorepo add-serviceGenerates a service with selectable features:
- Express.js API
- Database (TypeORM + SQLite)
- Logging system
- Testing setup
- Configuration management
npx kodegen repo initCreates a single repository with similar feature options as monorepo services.
- ESLint Configurations: Node.js, Browser, and React-specific rules
- Prettier with Import Sorting: Automated code formatting
- TypeScript: Strict configuration with path aliases
- Testing: Vitest with Istanbul coverage
- Git Hooks: Pre-commit validation with lint-staged
- CI/CD: GitLab CI pipeline templates
- Version Management: Changesets for semantic versioning
- Dependency Checking: knip integration
- Circular Dependency: madge integration
- Logging: Structured logging with Winston
- Database: TypeORM with migrations support
- Express.js: REST API framework
- Configuration: YAML-based config with
configpackage - Database: SQLite with TypeORM entities and migrations
- Logging: File-based logging with rotation
When initializing a monorepo, you can select from:
- ESLint features (Node, Browser, React)
- CI/CD pipeline setup
- Testing with coverage
- Changesets for versioning
- Dependency checking
When creating a service, choose from:
- Express.js web framework
- Database with TypeORM
- Logging system
- Testing setup
-
Create a new monorepo:
npx kodegen monorepo init
-
Add your first service:
cd your-monorepo npx kodegen monorepo add-service -
Add a shared package:
npx kodegen monorepo add-package
MIT License - see the LICENSE file for details.
Check the current version:
npx kodegen --version
# or
npx kodegen -v