Configuration
Overview
The ajs config command group manages global CLI settings. These settings persist across all projects and are stored in a platform-specific configuration file.
Configuration File Location
| Platform | Path |
|---|---|
| Linux / macOS | ~/.antelopejs/config.json |
| Windows | %USERPROFILE%\.antelopejs\config.json |
ajs config commands to manage this file. Editing the file by hand is possible but not recommended.Configuration Keys
The CLI currently supports one configuration key:
| Key | Description | Default |
|---|---|---|
git | URL of the interface repository | https://github.com/AntelopeJS/interfaces.git |
The interface repository lists the interfaces, the modules that implement them and the module templates. ajs project modules install reads it to add the modules that implement unresolved interfaces, and ajs module init and ajs project init read their templates from it. Changing this value lets you point the CLI at a private or organization-specific interface repository; the --git option and ANTELOPEJS_GIT override it for a single command.
ajs config show
Display all current CLI settings.
ajs config show
This command prints every setting as a key/value line. A value that differs from the default is marked (custom). The output is useful for confirming the active configuration before running other commands.
git https://github.com/acme/interfaces.git (custom)
| Option | Description |
|---|---|
-j, --json | Print the configuration as JSON on stdout |
ajs config get
Retrieve the value of a specific configuration key.
ajs config get <key>
| Argument | Description |
|---|---|
key | The configuration key to read (e.g., git) |
| Option | Description |
|---|---|
-j, --json | Print the value as a JSON string |
The command prints only the value on stdout, so it can be used in scripts. An empty value prints nothing on stdout and a notice on stderr.
Example:
ajs config get git
# https://github.com/AntelopeJS/interfaces.git
REPOSITORY=$(ajs config get git)
ajs config set
Set a configuration key to a new value.
ajs config set <key> <value>
| Argument | Description |
|---|---|
key | The configuration key to update |
value | The new value to assign |
Example:
ajs config set git https://github.com/your-org/interfaces.git
▲ Using a non-default git repository
Its interfaces are not official and may not adhere to community quality standards or best practices.
✔ Set git to https://github.com/your-org/interfaces.git
Previous value: https://github.com/AntelopeJS/interfaces.git
The git value must be a repository git clone can read: an https or ssh URL, an scp-like address such as [email protected]:your-org/interfaces.git, or an absolute local path. Any other value is rejected with exit code 2. Setting a key to the value it already has changes nothing and says so:
ℹ git is already set to https://github.com/your-org/interfaces.git
After running this command, the CLI uses the specified repository URL whenever ajs project modules install needs to resolve interface dependencies. The new value persists in the configuration file until changed or reset.
ajs config reset
Reset all CLI settings to their default values.
ajs config reset [options]
| Option | Description |
|---|---|
-y, --yes | Skip the confirmation |
Examples:
# Reset with confirmation prompt
ajs config reset
# Reset without confirmation
ajs config reset --yes
When standard input is not a terminal, or CI is set, the command cannot ask for confirmation: it exits with code 2 and asks for --yes instead. Cancelling the confirmation with Ctrl+C exits with code 130.
See also
- Configuration — Configuration file reference and options