Helix is an AI-driven decision engine that autonomously executes systematic trading strategies to compound capital.
helix-tui is a Go CLI + TUI trading cockpit for Alpaca with:
- risk-gated order execution
- autonomous execution agents (
heuristicandllm) - low-frequency strategy analyst overseer
- SQLite-backed persistence (events, equity history, strategy memory)
This project is an AI-generated, experimental toy project for educational/development use only. It is not investment advice and is not production-ready trading software. You are solely responsible for all configuration, operation, compliance, and losses. Use at your own risk.
- Runtime broker is Alpaca.
- Select environment via
[alpaca].env = "paper" | "live". - The in-memory
paperbroker adapter exists for tests only.
- Go 1.24+
- Alpaca account/API keys (paper recommended)
- Optional: OpenAI API key for
[agent].type = "llm"and strategy analyst
- Create your config:
Copy-Item config.example.toml config.tomlIf config.toml is missing, startup will prompt you to create it automatically from config.example.toml.
- Keep safe defaults while validating:
[alpaca].env = "paper"mode = "manual"ormode = "assist"- if using
mode = "auto", set[agent].dry_run = truefirst
- Run with TUI:
go run ./cmd/helix -config=config.toml- Optional headless mode:
go run ./cmd/helix -config=config.toml -headless- Print version:
go run ./cmd/helix -versionConfig source precedence:
- built-in defaults
config.toml- env vars (
APCA_API_KEY_ID,APCA_API_SECRET_KEY,APCA_API_DATA_URL,OPENAI_API_KEY) - CLI flags (
-config,-headless,-version)
Key config areas:
mode:manual | assist | auto[identity]:human_name,human_alias,agent_name[alpaca]: env/endpoints/feed + credentials (or env/keyring)[risk]: max trade/day notional[compliance]: PDT/GFV guardrails[agent]: runtime cadence + intent limits + low power[agent.heuristic]: heuristic-only sizing/trigger settings[agent.llm]: model/prompt/timeout/context logging[strategy]and[strategy.llm]: overseer cadence + model/prompt[logging]: structured log file/mode/level[database]: SQLite state path
You can provide credentials via:
- environment variables
config.toml- OS keyring (
[keyring].use = true)
Recommended: enable keyring and avoid keeping secrets in config.toml.
manual: no autonomous order executionassist: agent proposes intents, operator approves manuallyauto: agent executes via the same risk/compliance path as manual commands
Safe progression:
manual+ watch behaviorassistautowith[agent].dry_run = trueautowith dry-run disabled only after validation
buy <SYM> <QTY>sell <SYM> <QTY>cancel <ORDER_ID|ORDER_ID_PREFIX|#ROW>flattensyncwatch list|add <SYM>|remove <SYM>|syncevents up|down|top|tail [N]strategy run|status|approve <ID>|reject <ID>|archive <ID>strategy proposal status|list|apply <ID>|reject <ID>strategy chat status|list|new <TITLE>|use <ID>|say <MESSAGE>tab overview|strategy|system|logsq?toggle help
- Watchlist is the effective trading allowlist.
- LLM output only proposes intents; engine risk/compliance gates still decide execution.
- Compliance gate can reject orders (e.g., PDT/GFV protections) with explicit rejection reasons.
- Strategy mode can constrain autonomous execution to active plan recommendations.
- Strategy chat is advisory-only and does not place orders directly.
- Copilot proposals are staged and require explicit
strategy proposal applybefore taking effect. - Low-power mode reduces autonomous activity outside market hours.
Run checks before committing:
go test ./...
go build ./cmd/helix
go run golang.org/x/vuln/cmd/govulncheck@latest ./...This repo is wired for GoReleaser.
- Config:
.goreleaser.yaml - GitHub workflow:
.github/workflows/release.yml(runs on tags likev1.2.3) - Release archives include: binary +
README.md+LICENSE+config.example.toml+docs/
Local smoke checks:
go run github.com/goreleaser/goreleaser/v2@latest check
go run github.com/goreleaser/goreleaser/v2@latest release --snapshot --cleanCreate a release:
git tag v0.1.0
git push origin v0.1.0