ExetJS CLI
The @exetjs/cli package provides the exet executable for creating, running, inspecting and extending ExetJS projects.
Full public documentation is available at https://exetjs.com/.
Requirements
- Node.js 24 LTS or newer.
- A generated project may use pnpm, npm or Yarn.
Commands
exet init [projectName]
exet start
exet install <moduleName>
exet list
exet doctor
exet init [projectName]
Creates a runnable Express + TypeScript project.
exet init my-api
The wizard asks for the project description, package manager, server port, host, API prefix, CORS origin and whether dependencies should be installed immediately.
Skip dependency installation when required:
exet init my-api --no-install
Generated projects use @exetjs/core and include the health module, runtime validation, logging, request/error middleware and registry markers used by exet install.
exet start
Starts the configured project in development mode using its local tsx dependency.
exet start
Disable watch mode:
exet start --no-watch
The command loads exet.config.ts, resolves the configured env file, validates runtime values and prints the resolved host, port, API prefix, environment and health URL before starting the child process.
Runtime precedence is:
process environment > configured env file > exet.config.ts
EXET_ENV_FILE can select a process-specific env file.
exet install <moduleName>
Installs a source template into the configured module directory and updates the module registry.
exet install auth
Useful options:
exet install auth --dry-run
exet install auth --no-install
exet install auth --force
Behavior:
- validates the project before writes;
- validates the module manifest;
- validates minimum Core compatibility when declared;
- checks both registry marker zones;
- copies the template files;
- updates module imports and registrations only inside marker zones;
- appends documented env settings to the configured
.env.example; - updates package dependencies;
- installs dependencies by default;
- refuses to overwrite existing generated module files unless
--forceis used.
--dry-run reports the planned files, dependencies and env settings without modifying the project.
--no-install performs file/package metadata updates without running the package manager.
--force should be used only after reviewing template changes because it overwrites generated module files.
Available installable modules
| Module | Purpose | Core requirement |
|---|---|---|
auth | Authentication starter with replaceable repository contract | >=0.2.0 for the 0.2.0 template |
db-mongo | MongoDB connection lifecycle | >=0.2.0 |
db-postgres | PostgreSQL connection lifecycle | >=0.2.0 |
db-mysql | MySQL connection lifecycle | >=0.2.0 |
db-mariadb | MariaDB connection lifecycle | >=0.2.0 |
db-sqlite | SQLite connection lifecycle | >=0.2.0 |
See Auth module and Database modules for complete configuration and API references.
exet list
Lists templates shipped by the installed CLI version:
exet list
This is the authoritative user-facing list of installable templates. Internal development sources such as tools/db-core are intentionally not exposed as installable modules.
exet doctor
Validates the current project:
exet doctor
Checks include:
exet.config.tspresence and validity;package.jsonandtsconfig.json;- configured entry and module registry paths;
- env file presence or deployment warning;
- resolved runtime configuration;
- registry markers;
- health module registration;
- installed DB template files, driver dependency declarations and Core compatibility.
exet doctor does not connect to configured databases. Use runtime health checks or the live integration workflow in Testing for network validation.
Local CLI usage
For a project with @exetjs/cli installed locally:
pnpm exec exet doctor
pnpm exec exet install db-postgres
This avoids accidentally invoking an older globally installed CLI.