Overview
The commands of the DMS frontend CLI, the options every command accepts, and how the CLI prints, exits and checks for updates.
ajs dms has eight commands. ajs dms --help lists them:
$ ajs dms --help
ajs dms 0.9.1 · DMS frontend for AntelopeJS (Vue 3, Vite, Inertia)
Usage: ajs dms [options] [command]
Options:
-v, --version Print the version
--no-color Disable colors (also NO_COLOR=1)
--verbose [=channels] Show full output and stack traces (also
ANTELOPEJS_VERBOSE); any channels turn all of it on
-q, --quiet Print only results, warnings and errors (also
ANTELOPEJS_QUIET=1)
--no-update-check Skip the daily update check (also NO_UPDATE_NOTIFIER=1)
-h, --help Show help for a command
Commands:
dev Run the dev server against a local backend, with hot
reload
build Build the production frontend
start Serve the production build
prepare Generate the workspace and module types
(postinstall-safe)
workspaces List generated workspaces
clean Remove generated workspaces
verify-source Build and type-check unpublished frontend sources
prepare-types Write the types of frontend sources for type-aware lint
help [command] Show help for a command
Examples:
# Inside a project started with ajs project dev
$ ajs dms dev
# Build for production from the project root, without a backend
$ ajs dms build
# Serve the build against its backend, on another port
$ ajs dms start -b https://api.example.com -p 3001
Run ajs dms <command> --help for its options and examples, and
ajs dms help environment for the variables read from the environment.
| Command | What it does | Backend URL |
|---|---|---|
dev | Serves the dashboard with hot reload, reading the modules from the project, as build does | Discovered from .antelope/dev.json, or -b |
build | Builds the production frontend from the project into .dms-frontend/dist | None. It reads the project. |
start | Serves the build build made from the project, or the one in --workspace | Required |
prepare | Generates the workspace, the module registry and the types, without failing an install | Optional |
workspaces | Lists the generated workspaces, their size and last use | None |
clean | Removes generated workspaces | -b or --all, never the environment |
verify-source | Builds and type-checks unpublished frontend modules | None |
prepare-types | Writes a tsconfig and the auto-import declarations that point at the sources of frontend modules | None |
--help, --version, workspaces and clean run from any directory. Without -l, verify-source and prepare-types run in a project that installs @antelopejs/dms.
Options every command accepts
The global options can come before or after the command name, so ajs dms build -q and ajs dms -q build are the same run. ajs --no-color dms …, ajs --verbose dms … and ajs -q dms … set the matching variables for the plugin too.
| Option | Variable | Effect |
|---|---|---|
--no-color | NO_COLOR=1 | Turns colors off. Terminals that cannot draw Unicode, such as TERM=dumb, also get ASCII symbols. |
--verbose, --verbose=<channels> | ANTELOPEJS_VERBOSE | Streams the full pnpm and Vite output, each line behind the name of its step, and adds the stack trace of the underlying error to a failure. Any channel list turns all of it on. |
-q, --quiet | ANTELOPEJS_QUIET=1 | Prints only results, warnings and errors. The command header, the progress, the summary and the update notice are left out. A ready dev or start server prints only its Local URL. |
--no-update-check | NO_UPDATE_NOTIFIER=1 | Skips the daily update check. |
Output and exit codes
The CLI follows the output contract of ajs. Only the help, the version and the list that workspaces prints go to stdout. Progress, warnings and errors go to stderr.
The dependency install and each step of a production build run as one progress line each. The CLI keeps their output and shows its last lines when the step fails. Paths into the generated workspace in those lines point at the frontend module's own sources instead.
| Exit code | Meaning |
|---|---|
0 | Success |
1 | Failure |
2 | Usage error, such as an unknown command or option, a missing or invalid argument, or a missing configuration value |
3 | build --prepared refused a workspace that is not prepared, before it built anything |
130 | Stopped with Ctrl+C |
A usage error names the fix:
$ ajs dms prepare --strict
✖ Backend URL is required
→ Pass -b <url> or set DMS_API_BASE_URL
Update check
At most once a day, the CLI asks npm for a newer release. When one exists, it prints a one-line notice on stderr, and only to a terminal. The notice is the last line of a command that succeeded, or sits under the ready block of dev and start.
The notice never shows for the help, --version, --json, a quiet run, a failed command, a pipe or TERM=dumb. The lookup never delays the command's exit. After a lookup that comes back empty, the CLI tries again an hour later. The time of the last lookup is stored in ~/.antelopejs/dms-frontend/update-check.json.
--no-update-check, NO_UPDATE_NOTIFIER or a CI variable turns the check off.
The environment topic
ajs dms help environment lists every variable the CLI and the generated server read. The Configuration page holds the same list, generated from the same source.