Skip to main content

TRI CLI Commands Reference (v8.27 - STRICT MODE)

TRI is the Unified Trinity Command Line Interface — the primary orchestrator for all development workflows.

# Build and run
zig build tri # Build TRI binary
./zig-out/bin/tri # Interactive REPL mode
./zig-out/bin/tri <command> # Run specific command
./zig-out/bin/tri help # Show all commands

CommandAliasesDescriptionLink
tri chat [--stream] <msg>-Interactive chat (vision + voice + tools)-
tri code [--stream] <prompt>-Generate code with typing effect-
tri gen <spec.vibee>-Compile VIBEE spec to Zig/Verilog-
tri pipeline run <task>chainExecute 17-link Golden Chain (incl TVC)0-17
tri decompose <task>-Break task into sub-tasks (Link 4)4
tri plan <task>-Generate implementation plan (Link 5)5
tri spec_create <name>spec-createCreate .vibee spec template (Link 6)6
tri loop-decide [mode]loop_decideLoop decision: CONTINUE/EXIT (Link 17)17

CommandDescription
tri verifyRun tests + benchmarks (Links 7-11)
tri benchRun performance benchmarks
tri verdictGenerate toxic verdict (Link 14)

SWE Agent Commands

CommandDescription
tri fix <file>Detect and fix bugs
tri explain <file|prompt>Explain code or concept
tri test <file>Generate tests
tri doc <file>Generate documentation
tri refactor <file>Suggest refactoring
tri reason <prompt>Chain-of-thought reasoning

Git Commands

CommandDescription
tri statusGit status --short
tri diffGit diff
tri logGit log --oneline -10
tri commit <message>Git add -A && commit

Tools

CommandDescription
tri convert <file>Convert WASM/Binary → Ternary
tri serve --model <path>Start HTTP API server
tri benchRun performance benchmarks
tri evolve [--dim N]Evolve fingerprint (Firebird)

TVC (Distributed Learning)

CommandAliasesDescription
tri tvc-demotvcRun TVC chat demo (distributed learning)
tri tvc-stats-Show TVC corpus statistics

Demo & Benchmark Commands

Each cycle has -demo and -bench variants for running demonstrations and performance benchmarks.

CycleDemo CommandsBench CommandsDescription
Multi-Agentagents-demo, agentsagents-benchCoordination
Long Contextcontext-demo, contextcontext-benchSliding window
RAGrag-demo, ragrag-benchRetrieval
Voice I/Ovoice-demo, voice, micvoice-bench, mic-benchSTT+TTS
Code Sandboxsandbox-demo, sandboxsandbox-benchSafe execution
Streaming (Cycle 38)stream-demo, stream, pipelinestream-benchMulti-modal pipeline
Vision (Cycle 28)vision-demo, vision, eyevision-bench, eye-benchImage analysis
Fine-tuningfinetune-demo, finetunefinetune-benchModel adaptation
Multi-Modal (Cycle 26)multimodal-demo, multimodal, mmmultimodal-bench, mm-benchUnified
Tool Use (Cycle 27)tooluse-demo, tooluse, toolstooluse-bench, tools-benchTools from any modality
Unified Agent (Cycle 30)unified-demo, unified, agentunified-bench, agent-benchAll capabilities
Autonomous (Cycle 31)auto-demo, auto, autonomousauto-bench, autonomous-benchSelf-directed
Orchestration (Cycle 32)orch-demo, orch, orchestrateorch-bench, orchestrate-benchCoordinator+specialists
MM Orchestration (Cycle 33)mmo-demo, mmo, mm-orchmmo-bench, mm-orch-benchMulti-modal agents
Memory (Cycle 34)memory-demo, memory, memmemory-bench, mem-benchCross-modal learning
Persistent (Cycle 35)persist-demo, persist, savepersist-bench, save-benchDisk serialization
Spawn (Cycle 36)spawn-demo, spawn, poolspawn-bench, pool-benchDynamic agents
Cluster (Cycle 37)cluster-demo, cluster, nodescluster-bench, nodes-benchMulti-node
Work-Stealing (Cycle 39)worksteal-demo, worksteal, stealworksteal-bench, steal-benchAdaptive scheduler
Plugin (Cycle 40)plugin-demo, plugin, extplugin-bench, ext-benchExtension system
Comms (Cycle 41)comms-demo, comms, msgcomms-bench, msg-benchCommunication protocol
Observe (Cycle 42)observe-demo, observe, otelobserve-bench, otel-benchObservability
Consensus (Cycle 43)consensus-demo, consensus, raftconsensus-bench, raft-benchCoordination
Spec Exec (Cycle 44)specexec-demo, specexec, specspecexec-bench, spec-benchSpeculative execution
Governor (Cycle 45)governor-demo, governor, govgovernor-bench, gov-benchResource governor
Fed Learn (Cycle 46)fedlearn-demo, fedlearn, flfedlearn-bench, fl-benchFederated learning
Event Src (Cycle 47)eventsrc-demo, eventsrc, eseventsrc-bench, es-benchEvent sourcing
Cap Sec (Cycle 48)capsec-demo, capsec, seccapsec-bench, sec-benchCapability security
DTXN (Cycle 49)dtxn-demo, dtxn, txndtxn-bench, txn-benchDistributed transactions
Cache (Cycle 50)cache-demo, cache, memocache-bench, memo-benchAdaptive caching
Contract (Cycle 51)contract-demo, contract, slacontract-bench, sla-benchAgent negotiation
Workflow (Cycle 52)workflow-demo, workflow, wfworkflow-bench, wf-benchTemporal workflows

Sacred Mathematics (v2.0)

CommandDescription
tri mathSacred math dispatcher
tri constantsShow φ, π, e, μ, χ, σ, ε...
tri phi <n>Compute φⁿ
tri fib <n>Fibonacci with BigInt
tri lucas <n>Lucas L(n) — L(2)=3=TRINITY
tri spiral <n>φ-spiral coordinates

Info Commands

CommandAliasesDescription
tri info-System information
tri version--version, -vShow version
tri help--help, -hThis help message

REPL Commands (Interactive Mode)

When running tri without arguments, you enter interactive REPL mode:

CommandDescription
/chatSwitch to Chat mode
/codeSwitch to Code Generation mode
/fixSwitch to Bug Fix mode
/explainSwitch to Explain mode
/testSwitch to Test Generation mode
/docSwitch to Documentation mode
/reasonSwitch to Chain-of-Thought mode
/zigSet language to Zig
/pythonSet language to Python
/rustSet language to Rust
/jsSet language to JavaScript
/statsShow session statistics
/verboseToggle verbose output
/helpShow REPL help
/quitExit REPL

Sacred Logging

All TRI CLI calls are logged to trinity-nexus/.ralph/sacred_tool_calls.log:

[φ] 1 | tri spec-create test_module
[φ] 2 | tri loop-decide auto

Multilingual Support

TRI CLI auto-detects and responds in multiple languages:

tri code "write fibonacci function"   # English
tri code "escribir funcion fibonacci" # Spanish
tri code "写一个斐波那契函数" # Chinese

φ² + 1/φ² = 3 = TRINITY