[data-reveal]{opacity:1!important;transform:none!important}
DocumentationCheat sheet

Cheat sheet

Every AntelopeJS CLI command and its main options on one page, with the commands for common workflows.

Installation

Package managerCommand
npmnpm install -g @antelopejs/core
yarnyarn global add @antelopejs/core
pnpmpnpm 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

CommandDescription
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 listList the modules of the project (alias: ls)
ajs project modules update [modules...]Update npm modules and their locks
ajs project modules installAdd modules for unresolved interfaces
ajs project modules release-leasesDelete the cache leases of runs that are gone
ajs project logging showShow the logging settings (alias: ls)
ajs project logging setChange the logging settings

Module commands

CommandDescription
ajs module init <path>Create a module from a template
ajs module test [path]Run the tests of a module

Config commands

CommandDescription
ajs config showShow every CLI setting
ajs config get <key>Print one CLI setting
ajs config set <key> <value>Change one CLI setting
ajs config resetReset every CLI setting to its default

Other commands

CommandDescription
ajs update [plugin]Update the CLI and its global plugins
ajs pluginsList official plugins (alias: ajs plugin)

General options

OptionDescription
-h, --helpShow help for a command
-v, --versionPrint the version
--verbose [=channels]Print TRACE logs and full error details. Pass channels, separated by commas, to limit the logs to them.
-q, --quietPrint only results, warnings and errors. ANTELOPEJS_QUIET=1 does the same.
--no-colorDisable colors. NO_COLOR=1 does the same.
-j, --jsonPrint 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.

OptionAvailable inDescription
-p, --project <path>dev, build, startPath of the project folder (default: current directory)
-e, --env <environment>dev, build, startEnvironment of antelope.config.ts to use
-c, --concurrency <number>dev, startNumber of modules to load concurrently
-w, --watchdevReload modules when their files change (HMR)
--inspect [host:port]devEnable the Node.js inspector (default: 127.0.0.1:9229)
-i, --interactivedevOpen a REPL with the project loaded
--refresh-configstartResolve antelope.config.ts for the environment instead of the build configuration

Common workflows

New project

Create a project and start developing with HMR:

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

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

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

terminal
# 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:

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

terminal
# 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:

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