Cheat sheet
Every AntelopeJS CLI command and its main options on one page, with the commands for common workflows.
Installation
| Package manager | Command |
|---|---|
| npm | npm install -g @antelopejs/core |
| yarn | yarn global add @antelopejs/core |
| pnpm | pnpm add -g @antelopejs/core |
Without a global install, run any command as npx @antelopejs/core <command>. Inside a project that lists @antelopejs/core as a dependency, npx runs that installed copy.
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, under its 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 and their locks |
ajs project modules install | Add modules for unresolved interfaces |
ajs project modules release-leases | Delete the cache leases of runs that are gone |
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 (alias: ajs plugin) |
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. Pass channels, separated by commas, to limit the logs to them. |
-q, --quiet | Print only results, warnings and errors. ANTELOPEJS_QUIET=1 does the same. |
--no-color | Disable colors. NO_COLOR=1 does the same. |
-j, --json | Print the result as JSON. Accepted by modules list, logging show, config show, config get and plugins. |
Set AJS_NO_UPDATE_CHECK=1 to turn off the update notice.
Common dev options
ajs project dev, ajs project run, ajs project build and ajs project start share these options. ajs project run takes the same options as ajs project dev.
| 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 modules to load concurrently |
-w, --watch | dev | Reload modules when their files change (HMR) |
--inspect [host:port] | dev | Enable the Node.js inspector (default: 127.0.0.1:9229) |
-i, --interactive | dev | Open a REPL with the project loaded |
--refresh-config | start | Resolve antelope.config.ts for the environment instead of the build configuration |
Common workflows
New project
Create a project and start developing with HMR:
npx @antelopejs/core project init my-project
cd my-project
npx @antelopejs/core project dev --watch
In scripts and CI, answer every question with a flag:
npx @antelopejs/core project init my-project --template blank-typescript --pm pnpm --no-git-init
Build and deploy
Build the production artifact and start the application from it:
ajs project build -e production
ajs project start -e production
Add modules
Add modules from npm or a local path, or add the modules that implement the interfaces your project imports:
# Add from npm (default mode)
ajs project modules add @antelopejs/api
# Add a local module
ajs project modules add ./modules/auth --mode local
# Add modules for unresolved interface imports
ajs project modules install
Create and test a module
Create a module from a template and run its tests:
npx @antelopejs/core module init ./modules/my-module --template module-typescript
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