Skip to main content
Mirror CLI is Reflection’s coding agent for the terminal. Ask it to explore a codebase, edit files, or run commands and tests. Each workspace has its own conversation and agent. For installation and a first coding task, start with the coding agent quickstart. This page covers the interactive CLI and its settings.
Mirror CLI is in early beta. Commands and behavior may change as we fix bugs and polish the release. Run /help to see the commands available in your installation, including those added by enabled extensions.

Start Mirror CLI

Start it from the directory where you want to work:
The first time, Mirror shows a Using Mirror notice. In each new directory, it asks Continue and trust this folder? [y/N] before it starts; type y and press Enter to continue. A fresh installation uses Reflection and Beam-501B-A23B. If you previously selected another provider or model, run /model reflection after Mirror starts; Mirror remembers the selection. To use Reflection for one launch without changing the saved selection:
Mirror uses a Reflection API key in this order:
  1. --api-key, if provided. Prefer the environment variable to keep the key out of shell history.
  2. REFLECTION_API_KEY in your environment.
  3. A saved key in ~/.mirror/reflection_api_key.
  4. The Connect to Reflection prompt, if no key is available. Input is masked with one * per character, and Mirror saves the key for later sessions without checking it.
/logout removes the saved key and, if REFLECTION_API_KEY isn’t set, reopens the Connect to Reflection prompt so you can replace a wrong key. It doesn’t affect REFLECTION_API_KEY. See API-key setup.
  • Run mirror --help for launch options.
  • Enter your task after Mirror starts. The interactive CLI does not accept a prompt as a positional argument.

Send prompts and interrupt turns

Slash commands

  1. Type / to browse commands.
  2. Use the arrow keys to choose one.
  3. Press Enter to select it.
Some commands need the current turn to finish before they can run.

Conversations and workspaces

Settings and tools

Model, credential, context, editor, connection, memory, and feedback commands come from bundled extensions. They are available while the corresponding extension is enabled.

Keyboard shortcuts

These are the default bindings. Menus and approval prompts use some keys for their own navigation, but Escape at an approval prompt interrupts the whole turn. User shortcut overrides live in ~/.mirror/keybindings.json. Project directories do not supply shortcut overrides.

Resume or branch a conversation

Inside Mirror, use /resume to open the searchable picker:
  • Type to filter the list.
  • Press Tab to cycle between the current directory, the repository, and all directories.
  • Pass a full ID or unique prefix to /resume to select a conversation directly. A prefix must identify exactly one conversation.
  • Resuming from a different directory asks for confirmation. Files and the working directory may differ from the earlier session.
To branch from an earlier turn with /rewind:
  1. Choose an earlier user turn.
  2. Edit its prompt.
  3. Confirm the new conversation branch. The original conversation keeps its later turns.
Rewinding changes conversation history only. It does not restore or undo files the agent edited.

Work on parallel tasks

Use /worktree [name] to create a separate checkout, then /workspaces to select it. Each workspace has its own agent and conversation. See workspaces for creation, switching, status indicators, saved settings, parallel-task examples, and removing completed checkouts.

Choose a model and reasoning effort

  • Use /model to choose a provider or model.
  • Mirror remembers a model selected with /model. A model or provider set with launch flags applies to that launch only.
  • Each workspace remembers its model and reasoning effort.
  • Run /status to check the model and reasoning effort. The status bar below the prompt shows the approval mode, model, and reasoning effort.
To choose settings at launch:
  • Launch default: xhigh. A workspace’s saved reasoning effort takes precedence over the default and --reasoning-effort. Use /reasoning after launch to change it.
  • Effort levels: The /reasoning picker offers provider default, minimal, low, medium, high, xhigh, and max. --reasoning-effort and /reasoning <effort> also accept none.
  • Supported levels: These depend on the provider and model. With Beam-501B-A23B, use low through max; requests with minimal fail with 400. See Reasoning.

Model picker configuration

~/.mirror/models.json contains a JSON array of model entries:
  • Required fields: id and label.
  • Optional fields: description, api, and base_url.
For example:
  • Set MIRROR_MODELS_CONFIG to select a different file.
  • Explicit --api and --base-url flags override values from the selected entry.
  • Keep API keys in the provider’s environment variable rather than this file.

Other providers

Exporting a key does not select its provider. Choose the matching --api value or use /model. For a custom endpoint, supply its model ID and base URL:
  • Custom endpoints can work without an API key.
  • --api reflection uses Reflection’s endpoint and does not accept an alternative base URL.

Tool approvals

Mirror’s default is manual approval: it asks before running tools that require approval, and the status bar shows manual. To approve tool calls automatically:
  • Saved mode: Use /permissions or F2 after launch to switch between automatic and manual approval. Mirror remembers the choice, including one made with --approval-mode, for every directory in ~/.mirror/config.json.
  • Calls needing review: Manual mode asks before tools marked as requiring approval. By default, these include shell commands, even read-only ones such as ls or cat, file writes and edits, and connected-service tools.
  • Approve or reject: Press 1 or Enter to approve, and 2 to reject. Use the arrow keys to choose another option.
  • Interrupt: Escape at an approval prompt interrupts the whole turn.
  • Local permissions: Tools, external extensions, and local MCP servers execute with your account’s permissions. Approval mode controls review and does not create an operating-system sandbox.

Project instructions and skills

Instructions

Put project guidance in AGENTS.md or CLAUDE.md. When both exist in a directory, Mirror uses AGENTS.md. Mirror loads instructions from:
  1. ~/.mirror/AGENTS.md or ~/.mirror/CLAUDE.md for global guidance.
  2. Directories along the path from the repository root to your working directory.
  • Outside a repository, it loads global instructions and those in the current directory.
  • Run /context to inspect the sources used for the latest model request.

Skills

A skill is a directory containing a SKILL.md file with YAML metadata and task instructions. For example, .agents/skills/review-tests/SKILL.md:
A closer skill with the same name replaces an earlier one.
  • Type $ in the composer to browse skills.
  • Include a whitespace-separated mention such as $review-tests in your prompt to request one.
  • The model can also load a skill when its description matches the task.

MCP servers

MCP connects Mirror to additional tools and services:
  • /connect opens a picker of services: Datadog, Linear, Notion, and Slack, which you sign in to, and Add a custom server…, which shows how to define your own.
  • /connections shows connected services. If it says the Mirror server is unavailable, it lists the services connected on your machine, which work without it.
  • /disconnect disconnects a service.
Custom server rules:
  • Save each server in ~/.mirror/mcp/<server-name>.json, then run /connect <server-name>. Names use letters, numbers, -, and _.
  • Custom servers stay on your machine.
  • Set MIRROR_MCP_DIR to use another directory. Project-local definitions are not loaded.
  • Each file describes one server, without an mcpServers wrapper.
  • Provide exactly one of url or command.
For an HTTP server that uses a bearer credential:
  • Export MY_MCP_KEY in the shell that launches Mirror.
  • Authenticated HTTP servers need HTTPS, except for loopback addresses.
For a trusted local stdio server:
  • In env, each right-hand value names an existing environment variable, not a literal credential. This example passes Mirror’s MY_MCP_KEY value to the server as API_KEY.
  • Optional enabledTools limits exposed tools: omit it for all tools, or use [] for none.
  • After editing a definition, run /connect <server-name> to load it again. Mirror also loads definitions when it starts.
  • Tool names use mcp__<server-name>__<tool-name>.

Extensions

Use /extensions to enable or disable commands, tools, and widgets. Mirror includes bundled features and can load external Python extensions. See extensions for discovery and trust, bundled features, a working reminder widget, and the extension API.

Launch options

These options apply to the interactive CLI. --model and --api apply to that launch only; /model changes the saved selection. --approval-mode is remembered for later launches. /status and the status bar show the active values.

Local files and diagnostics

  • Database paths: The agent and CLI databases must use different paths.
  • Conversation state: Keep it when troubleshooting a failed launch. Changing the executable does not reset these files.
  • Model requests: They include conversation context, relevant file contents, and tool results.
  • Shared diagnostics: Logs can contain sensitive information. Review them and remove API keys or private code before sharing.
For authentication, model, or rate-limit errors, see troubleshooting.

Report a bug

  1. Run /feedback to open the GitHub feedback form.
  2. Sign in to GitHub and choose a report type.
  3. Include your operating system, installed wheel version, reproduction steps, and the error message.
  4. Review the public issue and remove API keys or private code before submitting it.
/feedback does not attach session data or diagnostics automatically.