Skip to Content
DocsClientsCLI

Truss CLI

The CLI is the direct command-line client and the runtime service host used by editor clients.

Install

npm install -g @truss-harness/cli

The global installer prints the first commands to run. truss-cli and truss-cli help display the complete built-in reference without requiring a model.

Commands

CommandPurpose
truss-cli chat [prompt]Stream one task, or open persistent chat with no prompt
truss-cli modelsList detected local endpoints and models
truss-cli config pathPrint user and workspace configuration paths
truss-cli config initCreate a workspace profile template
truss-cli initGenerate or refresh repository instructions
truss-cli update [note]Store Git state and a handoff note
truss-cli statusInspect durable workspace state
truss-cli clear-memoryReset durable workspace memory
truss-cli commandsPrint shared slash commands
truss-cli serveHost the JSONL runtime protocol

Workspace commands

Run truss-cli init to create or refresh generated repository context in AGENTS.md. Use truss-cli update [note] to record Git state and a handoff note in durable memory, truss-cli status to inspect it, and truss-cli clear-memory to reset it. These commands do not need a configured model. truss-cli commands prints the same slash-command help used by the TUI and VS Code panel.

Chat

chat with a prompt creates an in-memory one-shot session, streams output to standard output, and prints tool requests to standard error. Run truss-cli chat without a prompt to keep one conversation open in the terminal.

truss-cli chat --profile ollama-coder --mode plan "Find the files that define the agent loop"

Direct CLI chat auto-allows tools. Use it only in trusted workspaces. The terminal UI and VS Code client provide interactive or policy-based approvals.

Persistent chat retains conversation history and the starting configuration until you exit. Use :mode chat, :mode plan, or :mode edit to switch modes, or prefix a message with --mode edit to switch and send it at once. Use :clear for a fresh conversation, :help for controls, and :exit to close the session.

Add --internet-access to expose web_search and web_fetch for that run. Because direct CLI chat auto-allows tools, enabling this flag also authorizes public network requests. Use --no-internet-access to override an enabled profile.

When a Plan-mode run produces a checklist, the CLI prints the saved plan to standard error. The active plan is stored at .truss-harness/plans/active.json and is automatically included in later Edit-mode context.

Service mode

truss-cli serve --profile ollama-coder

Service mode uses newline-delimited JSON on standard input/output. Output is reserved for protocol messages; do not add logs to standard output. The VS Code extension starts this service automatically.

Model discovery

truss-cli models

This prints detected endpoints and model IDs for local servers.

MCP servers

The CLI reads mcpServers from the shared configuration system and reports each connection before an Agent run. Run truss-cli config path to locate the user and workspace files. Repository-provided MCP commands require the user-level allowWorkspaceMcpServers opt-in. See MCP Servers for the complete schema and safety behavior.

Last updated on