Skip to content

CLI Reference

Kaelum CLI comes bundled with the kaelum package. No separate install needed:

Terminal window
npx kaelum create

Scaffold a new Kaelum project with interactive prompts or flags.

Terminal window
npx kaelum create [project-name] [--template <template>]
Terminal window
npx kaelum create

Prompts for:

  1. Project name
  2. Language — JavaScript or TypeScript
  3. Template — web (MVC) or api (REST)
  4. Install dependencies — auto-run npm install
Terminal window
# JavaScript web app
npx kaelum create my-app --template js-web
# JavaScript REST API
npx kaelum create my-api --template js-api
# TypeScript web app
npx kaelum create my-app --template ts-web
# TypeScript REST API
npx kaelum create my-api --template ts-api

Print the installed Kaelum version:

Terminal window
npx kaelum --version
# kaelum v1.x.x

Print environment information (useful for bug reports):

Terminal window
npx kaelum info
# Kaelum CLI
# Kaelum: v1.x.x
# Node.js: v20.11.0
# OS: Windows_NT 10.0.22631 (x64)
# Platform: win32

Show all available commands and options.

All templates are available in JavaScript and TypeScript variants.

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.json

Optimized for REST API projects:

my-api/
├── controllers/
│ └── usersController.js
├── middlewares/
│ └── authMock.js
├── routes.js
├── app.js
├── .env
├── .gitignore
└── package.json

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.json

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.json
Terminal window
cd my-app
npm start # Start the server
npm run dev # Start with file watching
Terminal window
cd my-app
npm run dev # Start dev server with tsx (hot-reload)
npm run build # Compile TypeScript to JavaScript
npm start # Run compiled output from dist/

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)