CLI Command Reference
exisjs dev
Starts the development server with live reload and automatic port collision avoidance.
$ npx exisjs dev [options]Options
| Option | Description |
|---|---|
-p, --port <port> | Port to listen on (overrides .env and exis.config.ts). |
-H, --host <host> | Host to bind to (e.g. 0.0.0.0 or localhost). |
-e, --entry <file> | Custom entry file path (default: src/http/server.ts). |
- Automatic Port Collision Detection: If the designated port is occupied, the CLI detects the conflict and increments to the next available port automatically.
- PID Lockfile: Manages a
.exis/dev.pidlockfile to prevent accidentally spawning duplicate dev servers in the same directory.
exisjs build
Compiles TypeScript to production JavaScript and produces route manifests.
$ npx exisjs build [options]Options
| Option | Description |
|---|---|
-o, --out-dir <dir> | Output directory (default: .exis/server or dist). |
--no-clean | Skip cleaning the output directory before compilation. |
- Type-Check: Runs the TypeScript compiler in check-only mode (
noEmit) to verify strict typing before compiling. - Fast Bundling: Emits JavaScript via esbuild.
- Route Manifest: Generates
.exis/routes-manifest.jsto enable O(1) route discovery at runtime without filesystem directory walks.
exisjs start
Starts the compiled production server.
$ npx exisjs start [options]Options
| Option | Description |
|---|---|
-p, --port <port> | Port to listen on. |
-H, --host <host> | Host to bind to. |
-e, --entry <file> | Custom compiled entry file path. |
exisjs generate
Scaffolds framework components and files according to ExisJS core conventions.
$ npx exisjs generate <type> <name> [options]$ npx exisjs g <type> <name> [options]Arguments
| Argument | Description |
|---|---|
<type> | The schematic type to generate. |
<name> | The name of the feature / folder. |
Options
| Option | Description |
|---|---|
--oop | Generates using Class-Based (OOP) decorators instead of Functional syntax. |
Supported Schematics
| Schematic | Alias | Description | Output Path |
|---|---|---|---|
resource | Complete domain slice (schema.ts, service.ts, boundary.ts, route.ts) | src/http/<name>/ | |
route | r, c, controller | HTTP route file | src/http/<name>/route.ts |
service | s | Injectable service / business logic | src/http/<name>/service.ts |
schema | sc | Validation schemas powered by tex | src/http/<name>/schema.ts |
boundary | b | Folder-scoped configuration and request pipeline | src/http/<name>/boundary.ts |
plugin | p | Distributable plugin module | src/plugins/<name>.ts |
middleware | m | Standalone middleware handler | src/middleware/<name>.ts |
test | t | Native test suite | tests/<name>.test.ts |
exisjs routes
Analyzes and prints the application routing table to the terminal.
$ npx exisjs routes [options]Options
| Option | Description |
|---|---|
-e, --entry <file> | Custom entry file path to bootstrap the app from. |
exisjs init
Initializes a new ExisJS project in the current directory using @exisjs/create.
$ npx exisjs initexisjs test
Runs the native Node.js test runner (node:test) across the project.
$ npx exisjs test [files...] [options]Options
| Option | Description |
|---|---|
--watch | Watch for file changes and re-run tests. |
-u, --update | Update test snapshots. |
-e, --entry <file> | Custom entry file path to bootstrap before running tests. |
exisjs repl
Starts an interactive Node.js REPL console loaded with your application context.
$ npx exisjs repl [options]$ npx exisjs console [options]exisjs exports
Lists all available framework exports and public subpaths exposed by exisjs/*.
$ npx exisjs exportsexisjs info
Displays runtime environment, Node.js version, platform, architecture, and ExisJS version.
$ npx exisjs info