Skip to main content

Usage

The directory you launch OrbCode from becomes the workspace directory: the default target for file operations and commands, and the file listing the model sees in its environment details.

Configuration

settings.json, env vars, custom models, sessions

MCP servers

Connect external tools through the Model Context Protocol

Skills & memory

Reusable instruction sets and AGENTS.md project memory

Hooks

Block, auto-approve, rewrite, or inject context

CLI reference (entry point)

Flags

The TUI always takes over the full terminal screen on launch (prior shell output stays in scrollback). OrbCode needs a real TTY (raw mode) and won’t accept piped stdin in interactive mode — use -p for non-interactive runs.

Slash commands

Slash commands are entered at the input prompt (start with /). Most have aliases or fuzzy matching: typing /mod + enter runs the highlighted match. Every menu in the CLI (slash commands, @-files, model picker, session picker, followups) is navigable with / and selectable with enter.

Keyboard shortcuts

A trailing newline in a paste submits; multi-line pastes are sent as one input.

Input affordances

  • @-references — type @ in the input to fuzzy-search workspace files. / to choose, enter/tab inserts the top/selected match into the prompt.
  • Multi-char paste — pasting multiple lines puts them all in the input; a trailing newline submits.
  • Slash autocomplete — a menu appears whenever the line starts with /, narrowable by typing more characters.
  • History/ walks the per-session history (across sessions, persisted in the session file).

Approvals & safety

Read-only tools (read_file / list_files / search_files / web_* / update_todo_list) run without prompting. Mutating tools prompt first:
  • File edits (file_edit, multi_file_edit, file_write) — prompt shows the target and a diff; y allow once, n deny, a allow for the rest of the session.
  • Commands (execute_command) — prompt shows the exact command line. The model classifies commands with an isDangerous flag; dangerous commands (deletes, force-pushes, system changes) can never be auto-approved — no a option, and --yolo / session-approval don’t apply.
A denial is reported back to the model as “The user denied this operation.” so it can adjust course rather than fail.
Use Shift+Tab at runtime to cycle the approval mode: askaccept edits onauto-approve. The session defaults can also be set in settings.json via autoApproveEdits and autoApproveSafeCommands (dangerous commands still always prompt).
Hooks can override any of this — see Hooks: PreToolUse for permissionDecision: allow | deny | ask and updatedInput.

Headless mode

  • Prints only the final content to stdout (the completion result, or the last assistant message) — no tool activity, no intermediate text.
  • Errors go to stderr.
  • Without --yolo, edit/command approvals are auto-denied (read-only analysis).
  • Followup questions are auto-answered with “proceed with best judgment”.
  • Project hooks still run, but untrusted project hooks are skipped (set MATTERAI_TRUST_PROJECT_HOOKS=1 to auto-trust them).

The TUI

  • Streaming responses rendered as markdown (headers, lists, code fences, inline code, links) via a lightweight ANSI renderer.
  • Thinking — reasoning streams live under ✦ Thinking… and collapses to ✦ Thought for Ns when done. Ctrl+O toggles expanded thinking.
  • Tool rows — each tool call shows a formatted name, a one-line summary, live “running” state, then / with a short result preview.
  • Edit diffs — file-modifying tools render a real diff with a stats header and red/green backgrounds, both in the approval prompt and the finished tool row.
  • Tasks — the model maintains a checklist via update_todo_list, rendered as a compact Tasks panel.
  • @-references — type @ in the input to fuzzy-search workspace files.
  • Status bar — approval mode, busy state, model name, context token usage, and session cost.
  • Spinner tips — after an operation runs for 2s, a random slash-command tip appears under the Thinking / Working spinner.
  • Figma auto-fetch — paste a figma.com URL into a prompt and the agent pre-fetches the design’s node tree, components, styles, and rendered images before the first completion, so it has visual + structural context from step 0.
  • Completion cardattempt_completion renders a bordered ”✔ Task completed” card with the result.

MCP servers

OrbCode connects to external tools via the Model Context Protocol (MCP). MCP servers expose tools that appear alongside the native tools as mcp__<server>__<tool> and can be called by the model like any other tool. The /mcp command opens an interactive manager at any time: ↑/↓ to select a server, enter or 2 to toggle enable/disable, r or 3 to reconnect, a or 1 to authenticate a needs-auth OAuth server, esc to close. Each server shows a live status icon (✓ connected, △ needs-auth, ✗ failed, ○ disabled, ⋯ connecting) plus a tool count when connected. You can also manage servers from the command line with orbcode mcp add/remove/list. See the MCP servers page for the three configuration scopes, server types, and OAuth options.

Skills

Skills are reusable instruction sets the model can load on demand. A skill is a directory containing a SKILL.md file with optional YAML frontmatter and a markdown body of specialized instructions. Place a directory under ~/.orbcode/skills/ (user, applies everywhere) or .orbcode/skills/ (project, checked into the repo). The skill catalog (names + descriptions + when-to-use) is injected into the system prompt; when a task matches a skill’s when_to_use condition, the model calls the use_skill tool to load the full instructions into context. Project skills override user skills on name collisions. See the Skills & memory page for the full reference.

AGENTS.md memory

AGENTS.md files provide project- and user-level instructions that are injected into every system prompt — build commands, code style, architecture notes, conventions. This is OrbCode’s equivalent of Claude Code’s CLAUDE.md, using the open AGENTS.md filename so it works across tools. Files are loaded in this order (lowest precedence first): user memory (~/.orbcode/AGENTS.md), project memory (AGENTS.md and .orb/AGENTS.md in the cwd and parents), and local memory (AGENTS.local.md, private per-machine). Use /init to have OrbCode generate or refine a starter AGENTS.md by analyzing the codebase. See the Skills & memory page for the discovery order and @include directives.

/init — generate .orb/AGENTS.md

/init investigates the project (layout, key config files, a few representative sources) and writes a concise .orb/AGENTS.md at the repo root, capped at ~150 lines so it stays cheap to include in every future prompt. The generated file covers:
  1. What the project does (1-2 lines) and its main tech stack.
  2. Project structure — the key directories/files and what each is responsible for.
  3. Architecture — how the main pieces fit together (entry points, data/control flow).
  4. Business-logic mapping — the rules and invariants the model needs to honor.
  5. Code patterns and conventions — the idioms the codebase already uses.
The prompt also tells the agent to refine an existing AGENTS.md rather than overwriting it, and to fold in any existing AI assistant rules (CLAUDE.md, .cursorrules, .github/copilot-instructions.md). The .orb/ folder is shared with the Orbital IDE extension — the same AGENTS.md is read by both, so a single source of truth covers your terminal and your editor. /link opens an interactive manager for linked repositories: other repos on your machine whose AGENTS.md should be considered when you’re working in this one, so a change here is checked for impact on (or propagated to) them. Each link is just a folder path — absolute, ~/path, or relative to the project. Links are persisted per-project in .orb/links.json in the current repo:
At session start, OrbCode walks the links, reads each linked repo’s AGENTS.md (from .orb/, .orbital/, or .orbcode/), and pulls them in ahead of time into the agent’s environment details — the model sees them as part of the workspace before it starts working. .orb/links.json is shared with the Orbital IDE extension — links written by the IDE are honored by the CLI and vice versa, so the two tools stay in sync without a manual merge. Use /link (or the IDE’s /link) to add or remove entries interactively.

Tools

Active in the CLI (schemas byte-identical to the extension’s native tools): For hook matchers, use these tool names verbatim (e.g. "execute_command", "file_edit|file_write|multi_file_edit").

Sessions

  • Stored in ~/.orbcode/sessions/<id>.json.
  • Power /resume (in-session picker) and --resume <id> / -r (from the CLI).
  • Record the conversation, tool results, task title, and cost.
  • The backend-generated task title is fetched once per task and shows in the status bar, the session file, and the terminal window title (<title> (orbcode)).

Troubleshooting