Skip to main content

Core Commands

Chat, code generation, and the SWE (Software Engineering) agent.

chat

Interactive multi-modal chat with vision, voice, and tool support (v2.1).

tri chat [message]
tri chat "Explain ternary computing"
tri chat --stream "Tell me about phi"
tri chat --image photo.jpg "What's in this image?"
tri chat --voice recording.wav "Transcribe this"

Options:

FlagDescription
--streamEnable streaming output (typing effect, token-by-token)
--image <path>Attach image file for vision analysis
--voice <path>Attach audio file for speech-to-text processing

Provider priority: Groq (fastest) > Claude > OpenAI > local GGUF

The chat system integrates with the TVC corpus — similar queries are served from cache (threshold: ϕ1=0.618\phi^{-1} = 0.618) without making an LLM call.

In REPL mode, type any message directly to chat. See Interactive REPL for details.

code

Generate code from a natural language prompt.

tri code [prompt]
tri code "Write a Fibonacci function in Zig"
tri code --stream "Implement a binary search" # Typing effect

Options:

FlagDescription
--streamEnable streaming (character-by-character typing effect)

The output language is determined by the current language setting (default: Zig). Use /zig, /python, /rust, or /js in REPL mode to switch.

gen

Compile a .vibee specification into Zig or Verilog code.

tri gen <spec.vibee>
tri gen specs/tri/my_module.vibee

Output: Generated code is placed in trinity/output/ (Zig) or trinity/output/fpga/ (Verilog).

SWE Agent Commands

The SWE (Software Engineering) Agent provides AI-powered code assistance. All SWE commands use the TrinitySWEAgent with multi-language support:

LanguageREPL switchFile extensions
Zig/zig.zig
Python/python.py
Rust/rust.rs
JavaScript/js.js, .ts

fix

Detect and fix bugs in files.

tri fix [file] [description]
tri fix src/main.zig "Fix memory leak in allocator"

explain

Explain code or concepts.

tri explain [file or topic]
tri explain src/vsa.zig
tri explain "How does VSA binding work?"

test

Generate comprehensive tests.

tri test [file]
tri test src/vsa.zig

doc

Generate documentation for code.

tri doc [file]
tri doc src/hybrid.zig

refactor

Suggest and apply refactoring improvements.

tri refactor [file]
tri refactor src/vm.zig

reason

Chain-of-thought reasoning about problems.

tri reason [prompt]
tri reason "What's the optimal data structure for ternary vectors?"

Info Commands

info

Display system information — version, platform, architecture, mode, vocabulary, and template counts.

tri info

Example output:

═══ System Information ═══
TRI CLI Version: 3.0.0
Platform: macos
Architecture: aarch64
Mode: 100% LOCAL
Vocabulary: 50000 words
Code Templates: 50+
Chat Patterns: 60+

φ² + 1/φ² = 3 = TRINITY

version

Show TRI CLI version.

Aliases: -v, --version

tri version

help

Show complete command reference.

Aliases: -h, --help

tri help

REPL Commands

These commands are available inside the interactive REPL (prefix with /):

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
/refactorSwitch to refactor mode
/reasonSwitch to reasoning mode
/zigSet language to Zig
/pythonSet language to Python
/rustSet language to Rust
/jsSet language to JavaScript (also /javascript)
/statsShow session statistics
/verboseToggle verbose mode
/helpShow REPL help
/quitExit REPL
/exitExit REPL (alias for /quit)
/qExit REPL (alias for /quit)