CLI Reference
Cheat Sheet
Quick reference for every AntelopeJS CLI command, option, and common workflow.
Installation
| Package Manager | Command |
|---|---|
| npm | npm install -g @antelopejs/core |
| yarn | yarn global add @antelopejs/core |
| pnpm | pnpm add -g @antelopejs/core |
Project Commands
| Command | Description |
|---|---|
ajs project init <project> | Create a project |
ajs project dev [options] | Run the project in development mode |
ajs project run [options] | Same as ajs project dev (former name) |
ajs project build [options] | Build the project for production (build.json) |
ajs project start [options] | Start the project from its build |
ajs project modules add <modules...> | Add modules to the project |
ajs project modules remove <modules...> | Remove modules from the project (alias: rm) |
ajs project modules list | List the modules of the project (alias: ls) |
ajs project modules update [modules...] | Update npm modules to their latest version |
ajs project modules install | Add modules for unresolved interfaces |
ajs project logging show | Show the logging settings (alias: ls) |
ajs project logging set | Change the logging settings |
Module Commands
| Command | Description |
|---|---|
ajs module init <path> | Create a module from a template |
ajs module test [path] | Run the tests of a module |
Config Commands
| Command | Description |
|---|---|
ajs config show | Show every CLI setting |
ajs config get <key> | Print one CLI setting |
ajs config set <key> <value> | Change one CLI setting |
ajs config reset | Reset every CLI setting to its default |
Other Commands
| Command | Description |
|---|---|
ajs update [plugin] | Update the CLI and its global plugins |
ajs plugins | List official plugins |
General Options
| Option | Description |
|---|---|
-h, --help | Show help for a command |
-v, --version | Print the version |
--verbose [=channels] | Print TRACE logs and full error details; scope to a comma-separated channel list |
-q, --quiet | Print only results, warnings and errors (also ANTELOPEJS_QUIET=1) |
--no-color | Disable colors (also NO_COLOR=1) |
-j, --json | Print the result as JSON (modules list, logging show, config show/get, plugins) |
Set AJS_NO_UPDATE_CHECK=1 to turn off the update notice.
Common Dev Options
These options are shared across ajs project dev, ajs project run, ajs project build, and ajs project start:
| Option | Available In | Description |
|---|---|---|
-p, --project <path> | dev, build, start | Path of the project folder (default: current directory) |
-e, --env <environment> | dev, build, start | Environment of antelope.config.ts to use |
-c, --concurrency <number> | dev, start | Number of parallel module loads |
-w, --watch | dev | Reload modules when their files change (HMR) |
--inspect [host:port] | dev | Enable the Node.js inspector |
-i, --interactive | dev | Open a REPL with the project loaded |
--refresh-config | start | Start with the configuration resolved at start |
Quick Workflows
New Project
Create a project and start developing with HMR:
ajs project init my-project
cd my-project
ajs project dev --watch
In scripts and CI, answer every question with a flag:
ajs project init my-project --template "Blank Typescript" --pm pnpm --no-git-init
Build and Deploy
Generate production artifacts and start the application:
ajs project build -e production
ajs project start -e production
Add Modules
Install modules from npm, local paths, or auto-detect from interface imports:
# Add from npm (default mode)
ajs project modules add @antelopejs/api
# Add a local module
ajs project modules add ./modules/auth --mode local
# Auto-install from interface imports
ajs project modules install
Create and Test a Module
Create a module from a template and run its tests:
ajs module init ./modules/my-module
ajs module test ./modules/my-module
Update Modules
Check for available updates and apply them:
# Preview updates
ajs project modules update --dry-run
# Apply updates
ajs project modules update
Configure Logging
Enable logging, change the DEBUG template and inspect the result:
# Enable logging
ajs project logging set --enable
# Use a custom template for DEBUG lines
ajs project logging set --level debug --format "[{{DATE}}] {{ARGS}}"
# Show DEBUG and TRACE lines while running the project
ajs project dev --verbose
# Check the current logging configuration, templates included
ajs project logging show --json