Skip to main content

TRI CLI — Complete Command Reference

310+ commands across 25 groups. Single source of truth for every tri subcommand.


1. tri git — Git Workflow

File: src/tri/tri_commands.zig:229-326

CommandArgumentsDescription
tri git statusgit status --short
tri git diffgit diff --stat
tri git log [N]N=10Last N commits
tri git branch <name>branch nameCreate + switch branch
tri git add <files>file1 [file2...]Stage files (no -A/. allowed)
tri git commit "<msg>""type(scope): desc"Conventional commit, auto zig fmt
tri git pushPush to origin (blocks main/master)

Safety: Conventional commit format enforced. Force-push to main blocked.


2. tri issue — GitHub Issues

File: src/tri/github_commands.zig:61-87

CommandArgumentsDescription
tri issue listList open issues
tri issue view <N>issue numberView issue details
tri issue create "<title>"title, --bodyCreate issue
tri issue comment <N>issue, --bodyAdd comment
tri issue close <N>issue numberClose issue
tri issue assign <N>issue, --assigneeAssign issue
tri issue decompose <N>issue numberBreak into sub-issues

3. tri farm — Training Farm

File: src/tri/tri_farm.zig

Manages Railway training farm across 3 accounts (PRIMARY, FARM-2, FARM-3), up to 75 services total.

CommandArgumentsDescription
tri farm statusAll services across 3 accounts with status icons
tri farm idleShow finished/idle services
tri farm recycle[options]Set training vars + redeploy idle/crashed
tri farm fill[options]Create NEW services to fill empty slots
tri farm evolveASHA+PBT evolution step

Options (recycle & fill)

OptionDefaultDescription
--lr <value>3e-4Learning rate
--batch <value>128Batch size
--ctx <value>81Context length
--optimizer <type>lamblamb/adamw/adam
--warmup <value>2000Warmup steps
--wd <value>0.01Weight decay
--steps <value>100000Total steps
--include-primaryoffInclude PRIMARY account

Additional fill options

OptionDefaultDescription
--max <N>37Max new services
--dry-runoffPreview without creating

Env: RAILWAY_TOKEN, RAILWAY_TOKEN_2, RAILWAY_TOKEN_3


4. tri cloud — Cloud Orchestration

File: src/tri/tri_cloud.zig

Native Railway integration + Cloud Dev agent orchestration.

Infrastructure

CommandArgumentsDescription
tri cloud statusRailway services + SSH status
tri cloud logs [service]service nameDeployment logs via GraphQL
tri cloud vars [service]service name or set K=V [id]List/set env vars
tri cloud deploy [service]service idTrigger redeployment
tri cloud redeployManual redeploy
tri cloud restart [service]service idRestart service
tri cloud delete-service <id>service idDelete service (DESTRUCTIVE)

SSH & Remote

CommandArgumentsDescription
tri cloud exec <command>command stringRun via SSH
tri cloud pullPull code on Railway
tri cloud ssh-statusSSH server status
tri cloud tmuxTmux session control

Agent Containers

CommandArgumentsDescription
tri cloud spawn <N>issue number, --accountSpawn agent container
tri cloud spawn-allSpawn for all agent:spawn issues
tri cloud kill <N>issue numberKill agent container
tri cloud agentsList active agents (max 10)
tri cloud cleanupRemove finished containers
tri cloud syncReconcile Railway state
tri cloud history <N>issue numberEvent timeline

Diagnostics

CommandArgumentsDescription
tri cloud api-checkTest API key + model routing
tri cloud diagnoseDiagnose Railway issues
tri cloud metricsAggregate fitness metrics
tri cloud record-metricsRecord metrics
tri cloud monitorLive monitoring dashboard
tri cloud metalMetal infrastructure status

Delegation

CommandArgumentsDescription
tri cloud farmDelegates to tri farm
tri cloud trainTraining-specific commands
tri cloud train-batchBatch training operations
tri cloud bridgeBridge protocol commands
tri cloud issue-createCreate GitHub issue
tri cloud pipelinePipeline orchestration
tri cloud verifyVerify agent work
tri cloud mergeMerge agent PR

Env: RAILWAY_TOKEN, AGENT_GH_TOKEN


5. tri dev — SWE Agent Farm

File: src/tri/tri_dev.zig

Each GitHub issue = 1 Railway service = 1 autonomous Claude Code agent.

CommandArgumentsDescription
tri dev statusTable of all dev agents
tri dev spawn <N>issue numberSpawn agent for issue
tri dev kill <N>issue numberKill agent
tri dev recycleReassign idle agents
tri dev fillSpawn for all agent:dev issues
tri dev metricsAggregate fitness metrics
tri dev leaderboardRank agents by fitness
tri dev evolveASHA+PBT evolution step
tri dev scanScan for new work
tri dev pickPick next task

6. tri train — HSLM Training

File: src/tri/tri_train.zig

Monitor and control HSLM training runs (local + Railway).

CommandArgumentsDescription
tri train status[--json] [--host railway]Live dashboard or JSON
tri train start[options] [--host railway]Launch training
tri train logs[--host railway]Tail training logs
tri train loss [dir]checkpoint dirParse loss curve
tri train diagnose [dir]checkpoint dirAuto-diagnose anomalies
tri train compare <d1> <d2>two dirsSide-by-side comparison
tri train checkpoint list [dir]checkpoint dirList checkpoints

Options for tri train start

OptionDefaultDescription
--steps <N>100000Total steps
--lr <value>3e-4 local / 1e-4 railwayLearning rate
--warmup <N>5000Warmup steps
--batch <N>64Batch size
--optimizer <type>adamwadamw/lamb
--ste <mode>nonenone/vanilla/twn/progressive
--wd <value>0.1Weight decay
--checkpoint-dir <path>data/checkpointsCheckpoint directory
--resume <path>Resume from checkpoint
--data <path>data/tinystories/real_tinystories.txtData file
--grad-accum <N>1Gradient accumulation
--context <N>81Context length

Env: HSLM_OPTIMIZER, HSLM_LR, HSLM_LR_SCHEDULE (ALWAYS cosine)


7. tri loop — Autonomous Dev Loop

File: src/tri/tri_loop.zig

Ralph pattern: wake → scan → decide → act → report → sleep.

CommandArgumentsDescription
tri loopSingle iteration (default)
tri loop onceSingle iteration
tri loop stepAlias for once
tri loop statusShow last loop state
tri loop continuous[-i <seconds>]Run continuously (default 5min)
tri loop daemonAlias for continuous
tri loop retry[options]Build-test-retry with experience

Options for tri loop retry

OptionDefaultDescription
--issue <N>GitHub issue for progress
--max-iter <N>10Max iterations
--task "<desc>"Task description

8. tri research — Scholar Agent

File: src/tri/tri_research.zig

Web research, error analysis, code quality verification.

CommandArgumentsDescription
tri research "<query>"search queryWeb research via Perplexity
tri research explain "<error>"error messageOffline error analysis
tri research --cacheShow cached answers
tri research idempotency100-cycle idempotency audit
tri research idemAlias
tri research duplicationCode duplication scan
tri research dupAlias
tri research sacredSacred constants verification
tri research constantsAlias

Env: PERPLEXITY_API_KEY (optional, offline analysis works without it)


9. tri experiment — Experiment Tracking

File: src/tri/tri_experiment.zig

HSLM experiment visualization and leaderboard.

CommandArgumentsDescription
tri experiment chart [dirs...]checkpoint dirsASCII PPL vs Step chart
tri experiment list [dirs...]checkpoint dirsLeaderboard by best PPL
tri experiment compare <d1> <d2>two dirsSide-by-side comparison
tri experiment exportGenerate docs/EXPERIMENTS.md

Auto-scans: data/checkpoints, data/checkpoints/real, data/checkpoints_v3, data/checkpoints_v13_lamb128


10. tri zenodo — Academic Publishing

File: src/tri/tri_zenodo.zig

DOI publishing to Zenodo.

CommandArgumentsDescription
tri zenodo publish <version>version tagCreate, upload, publish
tri zenodo statusShow current record
tri zenodo draft <version>version tagCreate draft only

Env: ZENODO_TOKEN


11. tri job — Async Job System

File: src/tri/tri_job.zig

Long-running commands with status tracking.

CommandArgumentsDescription
tri job start <command>command + argsStart async job
tri job status <id>job idCheck status
tri job logs <id>job idGet stdout/stderr
tri job artifacts <id>job idCollect outputs
tri job cancel <id>job idCancel running job
tri job listList all jobs

12. tri experience — Memory & Learning

File: src/tri/tri_experience.zig

Episode storage + mistake patterns + ExpeL log.

CommandArgumentsDescription
tri experience save[options]Save episode
tri experience recall--task/--type/--categoryRecall episodes
tri experience mistakesShow mistakes by frequency

Options for tri experience save

OptionDefaultDescription
--issue <N>GitHub issue
--task "<desc>"requiredTask description
--verdict <v>UNKNOWNPASS/FAIL/PARTIAL
--iterations <N>1Iteration count
--mistake "<text>"Add mistake (up to 8)
--learning "<text>"Add learning (up to 8)

13. tri faculty — Agent Faculty Board

File: src/tri/faculty_board.zig

CommandArgumentsDescription
tri facultyCompact board
tri faculty fullFull detailed board
tri faculty --rawRaw JSON output
tri faculty --lang ru/enOverride language

14. tri fpga — FPGA Synthesis & Inference

File: src/tri/tri_register.zig

CommandArgumentsDescription
tri fpga statusFPGA device status
tri fpga buildBuild FPGA project
tri fpga synthRun synthesis
tri fpga flashFlash bitstream
tri fpga verifyVerify bitstream
tri fpga uartUART test
tri fpga snapSnapshot state
tri fpga eyeEye diagram
tri fpga inferTernary inference on FPGA

Hardware: Xilinx 7-series, 135 BRAM36-eq, 0 DSP, 5000 tok/s


15. tri doctor — Pipeline Health

File: src/tri/tri_commands.zig:1706

CommandArgumentsDescription
tri doctorOne-line health status
tri doctor initScan + mark + report
tri doctor scanClassify all .zig files
tri doctor markAdd @origin/@regen markers
tri doctor reportHealth dashboard
tri doctor planCreate migration queue
tri doctor healRegenerate via pipeline
tri doctor enforceHook setup instructions
tri doctor enforce-checkHook permit/deny binary

Health: 100 × (0.4×generated + 0.3×compliance + 0.2×specs + 0.1×tests) 90+ HEALTHY | 70-89 RECOVERING | 50-69 INFECTED | 0-49 CRITICAL


16. tri notify — Telegram

File: src/tri/tri_commands.zig:393

CommandArgumentsDescription
tri notify "<message>"message textSend notification
tri notify "<msg>" --pinSend and pin
tri notify "<msg>" --chat <id>chat idSend to specific chat
tri notify "<msg>" --edit <id>message idEdit existing message

Env: TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID


17. tri deploy — Railway Deployment

File: src/tri/tri_commands.zig:365

CommandArgumentsDescription
tri deploy pushDeploy to Railway
tri deploy statusDeployment status
tri deploy logsDeployment logs
tri deploy domainDomain management

Env: RAILWAY_TOKEN


18. tri gen — Code Generation

File: src/tri/tri_commands.zig:40-100

CommandArgumentsDescription
tri gen <spec.tri>spec pathGenerate Zig/Verilog from .tri spec

19. tri convert — Format Conversion

CommandArgumentsDescription
tri convert <from> <to>format pairConvert: b2t, wasm, gguf

20. tri serve — HTTP Server

CommandArgumentsDescription
tri serve [options]Start HTTP server + API gateway

21. tri bench — Benchmarks

CommandArgumentsDescription
tri benchVSA/network benchmarks

22. tri evolve — Self-Improvement

CommandArgumentsDescription
tri evolve [N]iterations (default 10)Self-improvement analysis

AI & Chat (5 commands)

CommandArgumentsDescription
tri chat[--stream]Interactive chat
tri code[--stream]Code generation
tri fix <file>file pathBug detection + fix
tri explain <file>file pathExplain code
tri reason <prompt>promptChain-of-thought

Sacred Math (8 commands)

CommandArgumentsDescription
tri mathSacred math dispatcher
tri constantsShow phi, pi, e, mu, chi, sigma, epsilon
tri phi <N>exponentCompute phi^N
tri fib <N>indexFibonacci with BigInt
tri lucas <N>indexLucas L(N) — L(2)=3=TRINITY
tri spiral <N>indexPhi-spiral coordinates
tri gematria <text>textCalculate gematria value
tri sacredSacred mathematics overview

Sacred Science (25 commands)

Biology

CommandDescription
tri bio dnaDNA sequence analysis
tri bio rnaRNA sequence analysis
tri bio proteinProtein structure
tri bio codonCodon lookup

Cosmology

CommandDescription
tri cosmos hubbleHubble tension via phi
tri cosmos darkDark energy pi-patterns
tri cosmos expandUniverse expansion

Neuroscience

CommandDescription
tri neuro wavesBrain wave patterns
tri neuro consciousnessPsi consciousness formula
tri neuro regionsBrain regions mapping
tri neuro networkNeural network phi-patterns

Music (8 commands)

CommandDescription
tri musicMusic theory analysis
tri frequencyFrequency to note
tri scaleScale construction
tri chordChord analysis
tri resonanceResonance patterns
tri waveformWaveform visualization
tri harmonyHarmonic analysis
tri phi-seriesPhi-based music series

Development Tools (20+ commands)

CommandArgumentsDescription
tri test <file>file pathGenerate tests
tri doc <file>file pathGenerate docs
tri refactor <file>file pathSuggest refactoring
tri analyzeAnalyze codebase
tri search <query>querySearch code
tri context-infoContext information
tri cleanClean build artifacts
tri fmtFormat code
tri statsProject statistics
tri iglaIGLA hybrid operations

Pipeline — Golden Chain (8 commands)

CommandArgumentsDescription
tri pipeline run "<task>"task descriptionExecute full Golden Chain
tri pipeline demoDemo pipeline run
tri decompose "<task>"taskBreak into sub-tasks
tri plan "<task>"taskGenerate implementation plan
tri spec-create "<name>"nameCreate .tri spec template
tri loop-decideLoop decision: CONTINUE/EXIT
tri verifyRun tests + benchmarks
tri verdictGenerate toxic verdict

Swarm (6+ commands)

CommandArgumentsDescription
tri swarmSwarm status
tri governGovernance
tri omegaOmega convergence
tri quantumQuantum operations
tri consciousConsciousness formula
tri identityIdentity affirmation
tri intelligenceIntelligence metrics

System (12 commands)

CommandArgumentsDescription
tri infoSystem information
tri versionShow version
tri help[--category] [--search]Show commands
tri depsList dependencies
tri tvc-statsTVC corpus statistics
tri distributedDistributed inference
tri multi-clusterMulti-cluster management
tri hardwareHardware info
tri timeTime utilities
tri installInstallation utilities
tri buildBuild utilities

Demos (37 commands)

tvc-demo, agents-demo, context-demo, rag-demo, voice-demo,
sandbox-demo, stream-demo, vision-demo, finetune-demo,
batched-demo, priority-demo, deadline-demo, multimodal-demo,
tooluse-demo, unified-demo, autonomous-demo, orchestration-demo,
mm-orch-demo, memory-demo, persist-demo, spawn-demo,
cluster-demo, worksteal-demo, plugin-demo, comms-demo,
observe-demo, consensus-demo, specexec-demo, governor-demo,
fedlearn-demo, eventsrc-demo, capsec-demo, dtxn-demo,
cache-demo, contract-demo, workflow-demo, fpga-demo,
sacred-full-cycle

Benchmarks (36 commands)

agents-bench, context-bench, rag-bench, voice-bench,
sandbox-bench, stream-bench, vision-bench, finetune-bench,
batched-bench, priority-bench, deadline-bench, multimodal-bench,
tooluse-bench, unified-bench, autonomous-bench, orchestration-bench,
mm-orch-bench, memory-bench, persist-bench, spawn-bench,
cluster-bench, worksteal-bench, plugin-bench, comms-bench,
observe-bench, consensus-bench, specexec-bench, governor-bench,
fedlearn-bench, eventsrc-bench, capsec-bench, dtxn-bench,
cache-bench, contract-bench, workflow-bench

DePIN (4 commands)

CommandDescription
tri walletWallet management
tri meshMesh networking
tri reputationReputation system
tri hardwareHardware registration

23. tri chimera — Fused Multi-Step Commands

File: src/tri/tri_chimera.zig

CommandStepsDescription
tri chimera farm-cycle4status → idle → recycle → evolve
tri chimera train-cycle5status → loss → diagnose → chart → leaderboard
tri chimera deploy-full5commit → push → deploy → verify → notify
tri chimera doctor-full4scan → mark → report → heal
tri chimera research-deep4query → recall → idempotency → dedup

24. tri agent run — Flagship Autonomous Cycle

File: src/tri/tri_agent_run.zig

CommandArgumentsDescription
tri agent run <N>issue number8-step: view → recall → spec → gen → verify → verdict → save → commit

25. tri depin — DePIN Node Protocol

File: src/tri/tri_depin.zig

CommandArgumentsDescription
tri depin statusNetwork overview dashboard
tri depin nodesList all nodes with type/status
tri depin fitnessAggregate fitness by node type

Critical Rules

  1. ALWAYS tri <cmd> — no direct git/gh/curl
  2. Conventional commits: type(scope): message
  3. NO force-push to main
  4. NO git add . or git add -A
  5. Schedule = ALWAYS cosine (never flat)
  6. 3 Railway accounts: PRIMARY, FARM-2, FARM-3
  7. Max 10 concurrent agents
  8. GitHub issue tracking mandatory