Appearance
API Reference
This page provides detailed information about all available commands in Cortex CLI.
Global Options
These options can be used with any command:
Option | Alias | Description |
---|---|---|
--help | -h | Display help information |
--version | -v | Display version information |
--config | -c | Specify a configuration file |
--debug | -d | Enable debug output |
--quiet | -q | Suppress normal output |
--json | -j | Output in JSON format |
Commands
cortex auth
Authentication-related commands.
Subcommand | Description |
---|---|
login | Authenticate with the service |
logout | End the current session |
status | Check authentication status |
token | Manage 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.
Option | Description |
---|---|
--tags | Filter tests by tags |
--parallel | Run tests in parallel |
--output | Specify output format |
--reporter | Specify test reporter |
Examples:
bash
cortex test ./tests/api/ --tags=integration
cortex test ./tests/performance/ --reporter=detailed
cortex lint
Lint files using configurable rules.
Option | Description |
---|---|
--fix | Automatically fix issues when possible |
--rules | Specify ruleset to use |
--ignore | Patterns to ignore |
Examples:
bash
cortex lint ./src/ --fix
cortex lint ./src/ --rules=strict
cortex config
Manage configuration settings.
Subcommand | Description |
---|---|
get | Get a configuration value |
set | Set a configuration value |
list | List all configurations |
reset | Reset to default values |
Examples:
bash
cortex config set api.timeout=30
cortex config list
cortex plugin
Manage plugins and extensions.
Subcommand | Description |
---|---|
install | Install a plugin |
list | List installed plugins |
update | Update plugins |
remove | Remove a plugin |
Examples:
bash
cortex plugin install my-custom-plugin
cortex plugin list
Exit Codes
Code | Description |
---|---|
0 | Success |
1 | General error |
2 | Command not found |
3 | Invalid arguments |
4 | Authentication error |
5 | Network error |
For more detailed examples and advanced usage patterns, refer to the Getting Started guide.