CLI Installation
Quick install
bash
curl -fsSL https://tradectl.com/install.sh | shThis detects your platform and installs the tradectl binary to ~/.tradectl/bin/.
Manual download
Download the binary for your platform from GitHub Releases:
| Platform | Architecture | Binary |
|---|---|---|
| Linux | x86_64 | tradectl-linux-x86_64 |
| Linux | aarch64 | tradectl-linux-aarch64 |
| macOS | Intel (x86_64) | tradectl-darwin-x86_64 |
| macOS | Apple Silicon | tradectl-darwin-aarch64 |
bash
chmod +x tradectl-*
mv tradectl-* ~/.tradectl/bin/tradectlPATH setup
Add ~/.tradectl/bin to your PATH:
bash
echo 'export PATH="$HOME/.tradectl/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcbash
echo 'export PATH="$HOME/.tradectl/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcPrerequisites for building strategies
Strategies are Rust crates compiled to dynamic libraries. You need the Rust toolchain (edition 2021):
bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThe CLI itself is a standalone binary — no Rust required to use it.
Verify
bash
tradectl --versionUpdate
bash
tradectl updateThe CLI checks GitHub Releases and replaces itself in place. Re-running the install script also works.
Directory layout
~/.tradectl/
├── bin/ # tradectl binary
├── lib/ # installed strategy plugins (.so / .dylib)
├── config/ # cached license token, exchange credentials (encrypted)
├── data/ # raw + prepared market data
├── logs/ # default log directory for `tradectl run`
└── lab.db # shared SQLite for backtests / sweeps (lab + CLI)Environment variables
| Variable | Default | Description |
|---|---|---|
TRADECTL_API_URL | https://tradectl.com | Platform API base URL |
TRADECTL_DOWNLOAD_URL | GitHub Releases | Override binary download location |
LAB_PORT | 9200 | Lab dashboard port (when running tradectl-lab) |
Override the API base for local development:
bash
export TRADECTL_API_URL=http://localhost:3001