Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TrinaxCode/TrinaxAI/llms.txt

Use this file to discover all available pages before exploring further.

The TrinaxAI CLI brings every capability of the PWA into your terminal. Ask one-shot questions, run an interactive REPL, index entire project directories for semantic code search, and manage memory and collections — all without leaving your shell. Because the CLI talks directly to the same FastAPI backend (localhost:3333) that powers the PWA, there is no separate setup: configure once, use everywhere. The CLI is distributed as a standard Python package and is installed with pip install -e . from the repo root. It targets Python 3.10+ and has two runtime dependencies: httpx for HTTP and rich for terminal output.

Installation

# Clone the repo (if you haven't already)
git clone https://github.com/TrinaxCode/TrinaxAI.git
cd TrinaxAI

# Install the CLI in editable mode
pip install -e .

# Verify the install
trinaxai --version
trinaxai doctor
Running pip install -e . inside a virtual environment (.venv) is recommended so the CLI’s dependencies don’t conflict with system Python packages. The one-command install.sh script does this automatically.

Quick Commands Overview

CommandDescription
trinaxaiOpen the interactive REPL (defaults to chat)
trinaxai ask "..."Send one question and print the answer, then exit
trinaxai chatStart an interactive streaming chat session
trinaxai index <path>Index a directory into the local RAG store
trinaxai browseBrowse indexed collections, files, and chunks
trinaxai doctorRun a full system health check
trinaxai startStart all TrinaxAI local services
trinaxai stopStop AI services (optionally including the PWA)
trinaxai watchControl the file watcher daemon for auto-reindex
trinaxai research "..."Multi-pass deep research on a question
trinaxai exportExport a saved chat session to Markdown
trinaxai memoryManage persistent memory entries
trinaxai collectionsList or manage RAG knowledge collections

Global Flags

These flags apply to every command and are placed before the subcommand name:
FlagDescription
--api-url <URL>Override the RAG API base URL for this invocation
--insecureDisable TLS certificate verification (useful for custom certs)
--config <path>Path to a config TOML file (overrides $TRINAXAI_CONFIG and XDG search)
--no-colorDisable ANSI colour output
--verbose / -vEnable DEBUG-level logging to stderr
--versionPrint the CLI version and exit
--engine is a global flag placed before the subcommand (e.g. trinaxai --engine rag ask "...") that forces the engine for a single invocation. To change the default engine for all commands, set engine = "rag" or engine = "ollama" in ~/.config/trinaxai/config.toml.

Same Backend as the PWA

The CLI and the PWA share the same FastAPI backend. Every query, indexed document, memory entry, and collection is visible from both interfaces. When you index a directory with trinaxai index ., the results are immediately available in the chat at https://localhost:3334. No separate configuration is required.
┌──────────────────────────────────────────┐
│              Your Device                 │
│  ┌──────────┐  ┌─────────────────────┐   │
│  │ PWA (React)│  │ CLI (trinaxai)     │   │
│  │ :3334     │  │ pip install -e .    │   │
│  └─────┬─────┘  └──────────┬──────────┘  │
│        │                   │              │
│  ┌─────┴───────────────────┴──────────┐  │
│  │     RAG API (FastAPI) :3333        │  │
│  │  LlamaIndex • bge-m3 • BM25       │  │
│  └─────┬──────────────────────────────┘  │
│        │                                  │
│  ┌─────┴──────┐                           │
│  │  Ollama    │  qwen2.5 • llama3.2      │
│  │  :11434    │                           │
│  └────────────┘                           │
└──────────────────────────────────────────┘

Build docs developers (and LLMs) love