Command Reference

This page documents all available Tektii CLI commands, their arguments, and options.

Global Options

These options apply to all commands:

OptionEnvironment VariableDescriptionDefault
--api-url <URL>TEKTII_API_URLAPI endpointhttps://api.tektii.com
--api-key <KEY>TEKTII_API_KEYAPI authentication keyRequired
--output <FORMAT>-Output format: table or jsontable
-v, --verbose-Increase verbosity levelwarn
-q, --quiet-Quiet mode (errors only)-

Verbosity Levels

FlagLevelUse Case
(default)WARNNormal operation
-vINFOGeneral information
-vvDEBUGTroubleshooting
-vvvTRACEDeep debugging
-qERRORScripts (errors only)

strategy

Manage trading strategies.

strategy create

Create a new trading strategy.

tektii strategy create --name <NAME>
ArgumentRequiredDescription
--name <NAME>YesStrategy name

Example:

tektii strategy create --name "momentum-v1"

strategy list

List all strategies with pagination support.

tektii strategy list [--limit <N>] [--cursor <CURSOR>]
ArgumentRequiredDefaultDescription
--limit <N>No20Number 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>
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID

Example:

tektii strategy get strat_abc123def456

strategy delete

Delete a strategy and all its versions.

tektii strategy delete <STRATEGY_ID> [--yes]
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID
--yesNoSkip confirmation prompt

Example:

tektii strategy delete strat_abc123def456 --yes

strategy set-auto-run

Set the list of scenario configurations that run automatically when a new version is uploaded for this strategy.

tektii strategy set-auto-run <STRATEGY_ID> --configs <CONFIG_IDS>
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID
--configs <CONFIG_IDS>YesComma-separated configuration IDs. Pass an empty string to clear.

Examples:

# Run two configs on every new version
tektii strategy set-auto-run strat_abc123def456 \
  --configs cfg_xyz789,cfg_uvw321

# Clear the auto-run list
tektii strategy set-auto-run strat_abc123def456 --configs ""

version

Manage strategy versions.

version upload

Create a new strategy version — either by building and pushing a Docker image, or from a platform template that skips Docker entirely.

tektii version upload <STRATEGY_ID> \
  [--git-sha <SHA>] \
  [--dockerfile <PATH>] \
  [--context <PATH>] \
  [--parent <VERSION_ID>] \
  [--template <TEMPLATE>]
ArgumentRequiredDefaultDescription
<STRATEGY_ID>Yes-Strategy ID
--git-sha <SHA>NoAuto-detectedGit commit SHA
--dockerfile <PATH>No./DockerfilePath to Dockerfile (ignored when --template is used)
--context <PATH>No.Docker build context directory (ignored when --template is used)
--parent <VERSION_ID>No-Parent version ID when branching from an existing version
--template <TEMPLATE>No-Create the version from a platform template instead of building a Docker image. Available templates: ma-crossover, rsi-momentum.

Process (Docker build):

  1. Validates Dockerfile exists
  2. Auto-detects git SHA (or uses timestamp fallback)
  3. Creates version entry in API
  4. Builds Docker image for linux/amd64 platform
  5. Pushes image to registry

Process (--template):

  1. Skips Dockerfile validation, Docker build, and registry push
  2. Creates version entry in API and the server copies the template image into your strategy
  3. Useful for first-run users who want a working strategy without configuring Docker

Examples:

# 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

# Use a platform template (no Docker needed)
tektii version upload strat_abc123def456 --template ma-crossover

# Branch from an existing version
tektii version upload strat_abc123def456 --parent ver_xyz789

version list

List versions for a strategy.

tektii version list <STRATEGY_ID> [--limit <N>] [--cursor <CURSOR>]
ArgumentRequiredDefaultDescription
<STRATEGY_ID>Yes-Strategy ID
--limit <N>No20Number 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>
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID
<VERSION_ID>YesVersion 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>
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID
--config <FILE>YesPath 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>]
ArgumentRequiredDefaultDescription
<STRATEGY_ID>Yes-Strategy ID
--limit <N>No20Number 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>
ArgumentRequiredDescription
<STRATEGY_ID>YesStrategy ID
<SCENARIO_ID>YesScenario 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]
ArgumentRequiredDefaultDescription
<STRATEGY_ID>Yes-Strategy ID
<SCENARIO_ID>Yes-Scenario ID
--file <PATH>No*-Output file path
--result-type <TYPE>NometadataType: metadata, timeseries, or trades
--format <FORMAT>NotableDisplay format (terminal only)
--rawNo-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 --name <NAME> --file <FILE>
ArgumentRequiredDescription
--name <NAME>YesConfiguration name
--file <FILE>YesPath to JSON configuration file

Example:

tektii config create \
  --name "2023-backtest" \
  --file ./config.json

config list

List your configurations.

tektii config list [--limit <N>] [--cursor <CURSOR>]
ArgumentRequiredDefaultDescription
--limit <N>No20Number of items to return
--cursor <CURSOR>No-Pagination cursor

Example:

tektii config list

config get

Get details for a specific configuration.

tektii config get <CONFIG_ID>
ArgumentRequiredDescription
<CONFIG_ID>YesConfiguration ID

Example:

tektii config get cfg_xyz789

config update

Update an existing configuration.

tektii config update <CONFIG_ID> --file <FILE>
ArgumentRequiredDescription
<CONFIG_ID>YesConfiguration ID
--file <FILE>YesPath to updated JSON configuration

Example:

tektii config update cfg_xyz789 --file ./updated-config.json

config delete

Delete a configuration.

tektii config delete <CONFIG_ID> [--yes]
ArgumentRequiredDescription
<CONFIG_ID>YesConfiguration ID
--yesNoSkip confirmation prompt

Example:

tektii config delete cfg_xyz789 --yes

Next Steps