Browse documentation
DOCS/CLI reference

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

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:

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

ModulePurposeCore requirement
authAuthentication starter with replaceable repository contract>=0.2.0 for the 0.2.0 template
db-mongoMongoDB connection lifecycle>=0.2.0
db-postgresPostgreSQL connection lifecycle>=0.2.0
db-mysqlMySQL connection lifecycle>=0.2.0
db-mariadbMariaDB connection lifecycle>=0.2.0
db-sqliteSQLite 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 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.