CLI Overview
The ExisJS CLI (exisjs or exis) is the command-line interface for developing, compiling, running, and diagnosing ExisJS applications.
The CLI is structured around ExisJS core conventions:
- File-system route discovery under
src/http/. - Schema compilation with
tex. - Pre-compiled route manifests (
.exis/routes-manifest.js) for O(1) runtime lookup. - Environment variable cascading (
.env). - Native test execution using
node:test.
Installation & Execution
On-Demand via npx
Run commands directly without global installation:
# Initialize a new project in a directorynpx exisjs init
# Start the dev servernpx exisjs devGlobal Installation
To install the exisjs / exis binary globally:
npm install -g exisjsProject-Local Execution
Inside an initialized ExisJS project, the CLI is available locally through npm run scripts or npx exisjs.
Command Syntax
All CLI commands adhere to the standard command structure:
exisjs <command> [arguments] [options]Or using the shorter alias:
exis <command> [arguments] [options]Examples
# Start development server on port 5000npx exisjs dev -p 5000
# Scaffold an HTTP route in Functional paradigmnpx exisjs generate route users
# Scaffold with Class-Based (OOP) decoratorsnpx exisjs generate route users --oop
# Print the application routing tablenpx exisjs routesCommand Summary
| Command | Alias | Description |
|---|---|---|
dev | Starts development server with file watching and automatic port collision avoidance. | |
build | Type-checks and compiles TypeScript to JavaScript, generating route manifests. | |
start | Starts the compiled production server. | |
clean | cl | Removes .exis build artifacts and cached manifests (-a to include dist/). |
routes | Analyzes and prints the application routing table to the terminal or JSON. | |
generate | g | Scaffolds framework components (crud, model, route, service, schema, boundary, plugin, middleware, test). |
test | Runs test suites using the native node:test runner. | |
run | exec | Executes a script or external command with ExisJS .env files pre-loaded. |
console | repl | Launches an interactive Node.js REPL loaded with the application context. |
doctor | Audits project health, configuration, and route structure. | |
info | Displays runtime environment, Node.js version, platform, and OS architecture. | |
exports | Lists all framework public subpath export modules. | |
init | Initializes an ExisJS application in the current working directory. |