CLI Reference
Installation
Section titled “Installation”Kaelum CLI comes bundled with the kaelum package. No separate install needed:
npx kaelum createCommands
Section titled “Commands”kaelum create
Section titled “kaelum create”Scaffold a new Kaelum project with interactive prompts or flags.
npx kaelum create [project-name] [--template <template>]Interactive Mode
Section titled “Interactive Mode”npx kaelum createPrompts for:
- Project name
- Language — JavaScript or TypeScript
- Template — web (MVC) or api (REST)
- Install dependencies — auto-run
npm install
Direct Mode
Section titled “Direct Mode”# JavaScript web appnpx kaelum create my-app --template js-web
# JavaScript REST APInpx kaelum create my-api --template js-api
# TypeScript web appnpx kaelum create my-app --template ts-web
# TypeScript REST APInpx kaelum create my-api --template ts-apikaelum --version
Section titled “kaelum --version”Print the installed Kaelum version:
npx kaelum --version# kaelum v1.x.xkaelum info
Section titled “kaelum info”Print environment information (useful for bug reports):
npx kaelum info# Kaelum CLI# Kaelum: v1.x.x# Node.js: v20.11.0# OS: Windows_NT 10.0.22631 (x64)# Platform: win32kaelum help
Section titled “kaelum help”Show all available commands and options.
Templates
Section titled “Templates”All templates are available in JavaScript and TypeScript variants.
JavaScript Web (js-web)
Section titled “JavaScript Web (js-web)”MVC structure for page-driven sites:
my-web-app/├── public/│ └── style.css├── views/│ └── index.html├── controllers/│ └── pagesController.js├── middlewares/│ └── logger.js├── routes.js├── app.js├── .env├── .gitignore└── package.jsonJavaScript API (js-api)
Section titled “JavaScript API (js-api)”Optimized for REST API projects:
my-api/├── controllers/│ └── usersController.js├── middlewares/│ └── authMock.js├── routes.js├── app.js├── .env├── .gitignore└── package.jsonTypeScript Web (ts-web)
Section titled “TypeScript Web (ts-web)”TypeScript MVC structure with tsx for development:
my-web-app/├── src/│ ├── app.ts│ ├── routes.ts│ ├── controllers/│ │ └── pagesController.ts│ └── middlewares/│ └── logger.ts├── public/│ └── style.css├── views/│ └── index.html├── tsconfig.json├── .env├── .gitignore└── package.jsonTypeScript API (ts-api)
Section titled “TypeScript API (ts-api)”TypeScript REST API with full type safety:
my-api/├── src/│ ├── app.ts│ ├── routes.ts│ ├── controllers/│ │ └── usersController.ts│ └── middlewares/│ └── authMock.ts├── tsconfig.json├── .env├── .gitignore└── package.jsonAfter Scaffolding
Section titled “After Scaffolding”JavaScript projects
Section titled “JavaScript projects”cd my-appnpm start # Start the servernpm run dev # Start with file watchingTypeScript projects
Section titled “TypeScript projects”cd my-appnpm run dev # Start dev server with tsx (hot-reload)npm run build # Compile TypeScript to JavaScriptnpm start # Run compiled output from dist/Auto-generated Files
Section titled “Auto-generated Files”Every scaffolded project includes:
.env— Environment variables with sensible defaults (PORT=3000,NODE_ENV=development).gitignore— Standard Node.js exclusions (node_modules/,.env,dist/,*.log)