Skip to content

API Reference

This page provides detailed information about all available commands in Cortex CLI.

Global Options

These options can be used with any command:

OptionAliasDescription
--help-hDisplay help information
--version-vDisplay version information
--config-cSpecify a configuration file
--debug-dEnable debug output
--quiet-qSuppress normal output
--json-jOutput in JSON format

Commands

cortex auth

Authentication-related commands.

SubcommandDescription
loginAuthenticate with the service
logoutEnd the current session
statusCheck authentication status
tokenManage API tokens

Examples:

bash
cortex auth login
cortex auth token create --name="CI Token" --expiry=30d

cortex test

Run tests with the Cortex testing framework.

OptionDescription
--tagsFilter tests by tags
--parallelRun tests in parallel
--outputSpecify output format
--reporterSpecify test reporter

Examples:

bash
cortex test ./tests/api/ --tags=integration
cortex test ./tests/performance/ --reporter=detailed

cortex lint

Lint files using configurable rules.

OptionDescription
--fixAutomatically fix issues when possible
--rulesSpecify ruleset to use
--ignorePatterns to ignore

Examples:

bash
cortex lint ./src/ --fix
cortex lint ./src/ --rules=strict

cortex config

Manage configuration settings.

SubcommandDescription
getGet a configuration value
setSet a configuration value
listList all configurations
resetReset to default values

Examples:

bash
cortex config set api.timeout=30
cortex config list

cortex plugin

Manage plugins and extensions.

SubcommandDescription
installInstall a plugin
listList installed plugins
updateUpdate plugins
removeRemove a plugin

Examples:

bash
cortex plugin install my-custom-plugin
cortex plugin list

Exit Codes

CodeDescription
0Success
1General error
2Command not found
3Invalid arguments
4Authentication error
5Network error

For more detailed examples and advanced usage patterns, refer to the Getting Started guide.