Command Reference
This page documents all available Tektii CLI commands, their arguments, and options.
Global Options
These options apply to all commands:
| Option | Environment Variable | Description | Default |
|---|---|---|---|
--api-url <URL> | TEKTII_API_URL | API endpoint | https://api.tektii.com |
--api-key <KEY> | TEKTII_API_KEY | API authentication key | Required |
--output <FORMAT> | - | Output format: table or json | table |
-v, --verbose | - | Increase verbosity level | warn |
-q, --quiet | - | Quiet mode (errors only) | - |
Verbosity Levels
| Flag | Level | Use Case |
|---|---|---|
| (default) | WARN | Normal operation |
-v | INFO | General information |
-vv | DEBUG | Troubleshooting |
-vvv | TRACE | Deep debugging |
-q | ERROR | Scripts (errors only) |
strategy
Manage trading strategies.
strategy create
Create a new trading strategy.
tektii strategy create --name <NAME>
| Argument | Required | Description |
|---|---|---|
--name <NAME> | Yes | Strategy name |
Example:
tektii strategy create --name "momentum-v1"
strategy list
List all strategies with pagination support.
tektii strategy list [--limit <N>] [--cursor <CURSOR>]
| Argument | Required | Default | Description |
|---|---|---|---|
--limit <N> | No | 20 | Number of items to return |
--cursor <CURSOR> | No | - | Pagination cursor for next page |
Example:
tektii strategy list --limit 10
strategy get
Get details for a specific strategy.
tektii strategy get <STRATEGY_ID>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
Example:
tektii strategy get strat_abc123def456
strategy delete
Delete a strategy and all its versions.
tektii strategy delete <STRATEGY_ID> [--yes]
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
--yes | No | Skip confirmation prompt |
This permanently deletes the strategy and all its versions, scenarios, and configurations.
Example:
tektii strategy delete strat_abc123def456 --yes
version
Manage strategy versions.
version upload
Build and push a Docker image as a new strategy version.
tektii version upload <STRATEGY_ID> [--git-sha <SHA>] [--dockerfile <PATH>] [--context <PATH>]
| Argument | Required | Default | Description |
|---|---|---|---|
<STRATEGY_ID> | Yes | - | Strategy ID |
--git-sha <SHA> | No | Auto-detected | Git commit SHA |
--dockerfile <PATH> | No | ./Dockerfile | Path to Dockerfile |
--context <PATH> | No | . | Docker build context directory |
Process:
- Validates Dockerfile exists
- Auto-detects git SHA (or uses timestamp fallback)
- Creates version entry in API
- Builds Docker image for
linux/amd64platform - Pushes image to registry
Example:
# From strategy repository root cd /path/to/my-strategy tektii version upload strat_abc123def456 # With custom paths tektii version upload strat_abc123def456 \ --dockerfile ./docker/Dockerfile.prod \ --context ./src
version list
List versions for a strategy.
tektii version list <STRATEGY_ID> [--limit <N>] [--cursor <CURSOR>]
| Argument | Required | Default | Description |
|---|---|---|---|
<STRATEGY_ID> | Yes | - | Strategy ID |
--limit <N> | No | 20 | Number of items to return |
--cursor <CURSOR> | No | - | Pagination cursor |
Example:
tektii version list strat_abc123def456
version get
Get details for a specific version.
tektii version get <STRATEGY_ID> <VERSION_ID>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
<VERSION_ID> | Yes | Version ID |
Example:
tektii version get strat_abc123def456 ver_xyz789
scenario
Manage backtest scenarios.
scenario create
Create a new backtest scenario from a JSON configuration file.
tektii scenario create <STRATEGY_ID> --config <FILE>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
--config <FILE> | Yes | Path to JSON configuration file |
Example:
tektii scenario create strat_abc123 --config ./backtest-config.json
scenario list
List scenarios for a strategy.
tektii scenario list <STRATEGY_ID> [--limit <N>] [--cursor <CURSOR>]
| Argument | Required | Default | Description |
|---|---|---|---|
<STRATEGY_ID> | Yes | - | Strategy ID |
--limit <N> | No | 20 | Number of items to return |
--cursor <CURSOR> | No | - | Pagination cursor |
Example:
tektii scenario list strat_abc123
scenario get
Get details for a specific scenario.
tektii scenario get <STRATEGY_ID> <SCENARIO_ID>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
<SCENARIO_ID> | Yes | Scenario ID |
Example:
tektii scenario get strat_abc123 scen_def456
scenario download
Download backtest results (metadata, timeseries, or trades).
tektii scenario download <STRATEGY_ID> <SCENARIO_ID> [options]
| Argument | Required | Default | Description |
|---|---|---|---|
<STRATEGY_ID> | Yes | - | Strategy ID |
<SCENARIO_ID> | Yes | - | Scenario ID |
--file <PATH> | No* | - | Output file path |
--result-type <TYPE> | No | metadata | Type: metadata, timeseries, or trades |
--format <FORMAT> | No | table | Display format (terminal only) |
--raw | No | - | Output raw zstd-compressed data |
*Required for timeseries and trades result types.
Examples:
# View metadata in terminal tektii scenario download strat_abc123 scen_def456 # Download metadata as JSON tektii scenario download strat_abc123 scen_def456 \ --format json \ --file metadata.json # Download full timeseries tektii scenario download strat_abc123 scen_def456 \ --result-type timeseries \ --file timeseries.json # Download trade log tektii scenario download strat_abc123 scen_def456 \ --result-type trades \ --file trades.json
config
Manage reusable scenario configurations.
config create
Create a reusable scenario configuration.
tektii config create <STRATEGY_ID> --name <NAME> --file <FILE>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
--name <NAME> | Yes | Configuration name |
--file <FILE> | Yes | Path to JSON configuration file |
Example:
tektii config create strat_abc123 \ --name "2023-backtest" \ --file ./config.json
config list
List configurations for a strategy.
tektii config list <STRATEGY_ID> [--limit <N>] [--cursor <CURSOR>]
| Argument | Required | Default | Description |
|---|---|---|---|
<STRATEGY_ID> | Yes | - | Strategy ID |
--limit <N> | No | 20 | Number of items to return |
--cursor <CURSOR> | No | - | Pagination cursor |
Example:
tektii config list strat_abc123
config get
Get details for a specific configuration.
tektii config get <STRATEGY_ID> <CONFIG_ID>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
<CONFIG_ID> | Yes | Configuration ID |
Example:
tektii config get strat_abc123 cfg_xyz789
config update
Update an existing configuration.
tektii config update <STRATEGY_ID> <CONFIG_ID> --file <FILE>
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
<CONFIG_ID> | Yes | Configuration ID |
--file <FILE> | Yes | Path to updated JSON configuration |
Example:
tektii config update strat_abc123 cfg_xyz789 --file ./updated-config.json
config delete
Delete a configuration.
tektii config delete <STRATEGY_ID> <CONFIG_ID> [--yes]
| Argument | Required | Description |
|---|---|---|
<STRATEGY_ID> | Yes | Strategy ID |
<CONFIG_ID> | Yes | Configuration ID |
--yes | No | Skip confirmation prompt |
Example:
tektii config delete strat_abc123 cfg_xyz789 --yes
Next Steps
- Authentication - Configure your API key
- Read Workflow - List strategies and download results
- Write Workflow - Push Docker images as versions