Authentication
The Tektii CLI requires an API key to authenticate with the platform. This guide covers how to configure authentication.
Get Your API Key
- Log in to your Tektii account
- Navigate to Developers → API Keys
- Click Create New Key
- Copy the key and store it securely
The API key is only shown once when created. Store it securely as you cannot retrieve it later.
Configure the CLI
There are two ways to authenticate the CLI: environment variable (recommended) or command-line flag.
Environment Variable (Recommended)
Set the TEKTII_API_KEY environment variable in your shell:
export TEKTII_API_KEY="your-api-key"
To make this permanent, add the export line to your shell profile:
# For bash echo 'export TEKTII_API_KEY="your-api-key"' >> ~/.bashrc source ~/.bashrc # For zsh echo 'export TEKTII_API_KEY="your-api-key"' >> ~/.zshrc source ~/.zshrc
Command-Line Flag
Alternatively, pass the key with the --api-key flag on each command:
tektii --api-key "your-api-key" strategy list
The environment variable is recommended: you set the key once instead of retyping it on every command, and the single line in your shell profile is the one place to update when you rotate the key.
Test Your Connection
Once configured, verify your authentication works:
tektii strategy list
If authenticated correctly, you'll see a list of your strategies (or an empty list if you haven't created any yet).
Troubleshooting
If the CLI reports a missing or invalid key, your key may have been revoked or copied incompletely — mint a new one from Developers → API Keys. For the full list of errors and fixes (PATH, network, Docker), see Troubleshooting.
Next Steps
- Your First Backtest - Run a complete backtest end to end
- Installation - Install the CLI if you haven't already
- Read Workflow - List strategies and download results