Skip to main content
ByteRover CLI (brv) manages your AI development workflow — context curation, querying, version control, LLM provider and model management, cloud sync, and coding agent integration. With the daemon-first architecture, every command works standalone without requiring an interactive session.
v3.0.0 migration: brv push, brv pull, brv space switch, and /reset are deprecated. Use Git-Semantic version control commands (brv vc push, brv vc pull, brv vc remote set-url, brv vc reset) instead. See Git-Semantic Version Control for the full guide and Command Reference for all brv vc commands.
For help with any command, run brv --help or brv <command> --help.

Getting Started

ByteRover CLI offers two ways to interact: the interactive TUI and standalone CLI commands.

Interactive TUI

Start the terminal UI by running brv with no arguments:
This launches a persistent session with a React/Ink-based interface where you can use slash commands (e.g., /curate, /query, /providers). First-time users get an interactive onboarding flow. Press Esc to cancel streaming responses or skip onboarding.

Standalone CLI Commands

In v2.0.0, every brv command auto-starts the background daemon if needed. No TUI session required. Use --format json for structured output in scripts and CI/CD pipelines.

Command Overview

Environment Variables

ByteRover CLI auto-detects API keys from environment variables (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY). The following additional environment variables configure network and proxy behavior:
Proxy support requires ByteRover CLI v2.4.0 or later. See Troubleshooting — Proxy Configuration for setup details.

CLI Command Reference

brv

Start the interactive TUI with a React/Ink-based terminal interface. Arguments: None Flags: None Examples
Press Esc to cancel streaming responses. Press Ctrl+C to exit.

brv login

Authenticate with ByteRover for cloud sync features. By default, opens your browser for OAuth sign-in. On CI, SSH, or other non-interactive shells (auto-detected), pass --api-key <key> instead. Authentication is optional for local-only usage. Arguments: None Flags Examples
Get an API key from app.byterover.dev/settings/keys. SSH and non-interactive shells are detected automatically and skip the browser step — if you see a “not an interactive terminal” message, use --api-key.

brv logout

Disconnect from ByteRover cloud and clear stored credentials. This is the non-interactive counterpart to the /logout TUI slash command. Arguments: None Flags Examples
You can log back in at any time with brv login (browser OAuth) or brv login --api-key <key> on CI / SSH. Logging out does not delete your local context tree — it only clears cloud credentials.

brv locations

List all registered projects and their context tree status — which are initialized, which is current, and which have active connections. Arguments: None Flags Examples
Notes
  • Projects are sorted: current first, then active, then initialized, then the rest
  • The [current] label marks the project you’re running from; [active] marks projects with connected clients

brv status

Show CLI version, authentication state, project configuration, and context tree status. Arguments: None Flags Examples

brv restart

Restart ByteRover — stop everything and start fresh. Run this when ByteRover is unresponsive, stuck, or after installing an update. All open sessions and background processes are stopped. The daemon will restart automatically on the next brv command. Also use it when the REPL header shows [outdated, daemon vX.Y.Z] after an upgrade — that tag means the background daemon is still on the previous CLI version. Arguments: None Flags: None Examples

brv query

Query the context tree using natural language. Auto-starts the daemon if not already running. Arguments Flags Examples
Notes
  • Uses a multi-tier retrieval strategy: exact cache, fuzzy cache, direct search, then LLM synthesis
  • Best results with specific, detailed questions
  • With --format json, emits streaming JSON lines — see Headless Mode for the output format
  • Cancelling a running task: in the foreground, press Ctrl+C once to gracefully cancel the running task (stderr shows Cancelling task... (Ctrl-C again to force exit)). A second press hard-exits with code 130. To cancel a task started elsewhere (other terminal, --detach, REPL), run brv query --cancel <taskId>.

brv curate

Curate knowledge into the context tree. When context, --files, or --folder is provided, runs in autonomous mode with AI classification. Arguments Flags Examples
Notes
  • Autonomous mode (with context): The AI agent determines the best domain/topic and writes structured markdown to the context tree
  • Interactive mode (without context): Available in the TUI only — navigate the context tree and select where to curate
  • File references: Up to 5 files with -f / --files. Files must be text files within the project directory
  • Folder pack: The -d / --folder flag packs a single folder’s contents (code, config, docs, PDFs, Office files) into a structured format for analysis
  • Detached mode: Use --detach in CI/CD pipelines to queue curation and exit immediately
  • Cancelling a running task: in the foreground, press Ctrl+C once to gracefully cancel the running task (stderr shows Cancelling task... (Ctrl-C again to force exit)). A second press hard-exits with code 130. To cancel a task started elsewhere (other terminal, --detach, REPL), run brv curate --cancel <taskId>.

brv curate view

View curate operation history and detailed logs. Useful for auditing curations and debugging failures. Arguments Flags Examples

brv review

Show or toggle the project-scoped HITL (human-in-the-loop) review log. With no flags, prints whether the log is currently enabled or disabled. Pass --disable or --enable to change it. Persists across CLI and daemon restarts. See Review Changes for the full review workflow. Arguments: None Flags Examples
Notes
  • When disabled: brv curate skips the “N operations require review” prompt, --detach curate-log entries omit the per-operation review marker, brv dream no longer surfaces needsReview operations, and no review backups are written.
  • Pending reviews created before the log was disabled remain visible in brv review pending and can still be approved or rejected.
  • See Disable the review log for the full behavior.

brv review pending

List all pending review operations for the current project, grouped by task. Arguments: None Flags Examples

brv review approve

Approve pending review operations for a curate task. The current file content becomes the new baseline and the pre-change backup is deleted. Arguments Flags Examples

brv review reject

Reject pending review operations for a curate task. Files are restored from the pre-change backup, deleted files are restored to disk, and the change is discarded. Arguments Flags Examples
Notes
  • DELETE rejection restores the deleted file (or folder contents) to disk.
  • MERGE rejection restores both the target file and the deleted source file.

brv swarm onboard

Interactive setup wizard for Memory Swarm. Detects available providers, guides configuration, sets enrichment topology, and writes .brv/swarm/config.yaml. Arguments: None Examples
See Memory Swarm Setup for full details.

brv swarm status

Check Memory Swarm provider health, write targets, and configuration status. Arguments: None Flags Examples

brv swarm query

Search across all active memory providers. Results are ranked using Reciprocal Rank Fusion (RRF). No LLM call — pure algorithmic search. Arguments Flags Examples
See Memory Swarm Query for full details.

brv swarm curate

Store knowledge in the best available external memory provider. Falls back to ByteRover context tree if no writable providers are available. Arguments Flags Examples
See Memory Swarm Curate for full details.

brv push

Deprecated in v3.0.0. Use brv vc push instead. See Git-Semantic Remote Sync and Command Reference. If Git-Semantic version control is initialized, this command is blocked with a VC_GIT_INITIALIZED error.
Push the local context tree to ByteRover cloud storage. Requires authentication. Arguments: None Flags Examples

brv pull

Deprecated in v3.0.0. Use brv vc pull instead. See Git-Semantic Remote Sync and Command Reference. If Git-Semantic version control is initialized, this command is blocked with a VC_GIT_INITIALIZED error.
Pull the context tree from ByteRover cloud storage. Requires authentication. Arguments: None Flags Examples

brv providers

Show the currently active LLM provider and model. Use sub-commands to list, connect, disconnect, or switch providers. Arguments: None Flags Examples

brv providers list

List all available LLM providers with their connection status. Each provider is shown with a short description (e.g., what its models are known for) so you can pick by capability rather than brand recognition. Connected providers display [OAuth] or [API Key] badges indicating their authentication method. Arguments: None Flags Examples

brv providers connect

Connect to an LLM provider and optionally set the active model. Arguments Flags Examples
Notes
  • API keys are stored securely.
  • OpenAI supports OAuth authentication. Use --oauth to sign in via your browser instead of providing an API key. Cannot be combined with --api-key.
  • The ByteRover built-in provider requires a logged-in ByteRover account. Run brv login before connecting. Third-party providers only require an API key — no ByteRover login needed.
  • --team <name> is only supported for byterover. Passing it to any other provider fails with --team is only supported for the "byterover" provider. Matching is case-insensitive against team name first, then slug. On success the CLI prints ByteRover usage on this project will be billed to <team>.
  • ByteRover CLI auto-detects API keys from environment variables (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY)
  • If the server rejects the connection (e.g., missing authentication), the error is displayed in the command output.
  • See LLM Providers for the full list of supported providers and environment variables

brv providers disconnect

Disconnect an LLM provider and remove its stored API key. Arguments Flags Examples

brv providers switch

Switch the active provider. The provider must already be connected. Arguments Flags Examples
Switching to the ByteRover built-in provider requires authentication. Run brv login first if you haven’t already. If authentication fails, the error is displayed in the command output.

brv model

Show the currently active model and provider. Arguments: None Flags Examples

brv model list

List available models from all connected providers. Arguments: None Flags Examples

brv model switch

Switch the active model. Arguments Flags Examples

brv connectors

List installed coding agent connectors. Arguments: None Flags Examples

brv connectors install

Install or switch a connector for a coding agent. Creates the appropriate config files, rule files, or skill files for the selected agent. Arguments Flags Examples
Notes
  • Skill: Writes SKILL.md and workflow files to agent-specific skill directories. Default for Claude Code and Cursor.
  • MCP: Configures the MCP server (brv mcp) for direct tool integration. Default for most agents.
  • Rules: Generates markdown rule files that agents read for instructions.
  • Hook: Uses agent-specific hook systems (Claude Code only, legacy).
  • See Coding Agent Connectors for the full supported agents table with default connector types.

brv hub

Browse skills and bundles from the BRV Hub. Delegates to brv hub list. Arguments: None Flags: None (delegates to brv hub list, which accepts --format) Examples

brv hub list

List all available skills and bundles from configured registries. Arguments: None Flags Examples

brv hub install

Install a skill or bundle from the hub. Arguments Flags Examples
Notes
  • Skills are agent-specific workflows installed to the agent’s skill directory
  • Bundles are context packs installed directly to .brv/context-tree/
  • See BRV Hub for the full list of available skills and bundles

brv hub registry

Manage hub registries. Delegates to brv hub registry list. Arguments: None Flags: None Examples

brv hub registry list

List all configured hub registries with connection status. Arguments: None Flags Examples

brv hub registry add

Add a custom hub registry for private skills and bundles. Arguments Flags Examples
See Custom Registries for the full guide on hosting your own registry.

brv hub registry remove

Remove a custom registry and its stored credentials. Arguments Flags Examples

brv space list

Deprecated in v3.0.0. Space management is being replaced by Git-Semantic version control. Use brv vc remote to manage remote connections.
List all available teams and spaces. Requires authentication. Arguments: None Flags Examples

brv space switch

Deprecated in v3.0.0. Use brv vc remote set-url origin <url> instead. See Git-Semantic Remote Sync and Command Reference.
Switch to a different team and space. Requires authentication. Arguments: None Flags Examples

TUI Slash Commands

These commands are available inside the interactive TUI session (start with brv). Slash commands provide interactive UI elements like selection prompts and real-time feedback that are not available via standalone CLI commands.

Slash Command Details

/status

Show CLI status including authentication state, project configuration, and context tree state. Flags: None

/locations

List all registered projects and their context tree status. Flags: None

/curate

Curate context to the context tree. Without arguments, opens interactive mode for navigating the context tree and selecting where to curate. With a context argument, runs in autonomous mode. Use @path syntax to include file or folder references (up to 5 total):
Press Ctrl+Q to cancel the active curate or query task. The footer shows ctrl+q cancel task exactly while a cancellable task is in flight. With multiple tasks in flight, Ctrl+Q targets the oldest running task (then the oldest queued) so the agent slot drains in FIFO order.

/query

Query the context tree using natural language.
Press Ctrl+Q to cancel the active query (or curate) task — same FIFO behaviour and footer hint as /curate.

/connectors

Manage coding agent connectors. Opens an interactive UI for selecting an agent and choosing a connector type (skill, MCP, rules, or hook). Flags: None

/hub list

Browse available skills and bundles from the hub. Opens an interactive browser with search and one-click install. Flags: None

/hub registry list

List all configured hub registries. Flags: None

/hub registry add

Add a custom hub registry.

/hub registry remove

Remove a custom hub registry.

/push

Deprecated in v3.0.0. Use /vc push instead. See Git-Semantic Remote Sync.
Push context tree to ByteRover cloud storage.

/pull

Deprecated in v3.0.0. Use /vc pull instead. See Git-Semantic Remote Sync.
Pull context tree from ByteRover cloud storage.

/providers

Connect to an LLM provider. Opens an interactive selection prompt listing all available providers with connection status indicators. Providers that support OAuth (currently OpenAI) present an auth method choice — “Sign in with OAuth” or “API Key”. Other providers prompt for an API key directly. Already-connected OAuth providers show a “Reconnect OAuth” option. Selecting the ByteRover built-in provider when not logged in triggers an inline login prompt. Flags: None

/model

Select a model from the currently active LLM provider. Displays models with pricing, context window size, and status indicators. Flags: None
Requires an active external provider. If the active provider is ByteRover (built-in), run /providers first to connect an external provider.

/space list

Deprecated in v3.0.0. Space management is being replaced by Git-Semantic version control.
List all spaces for the current team.

/space switch

Deprecated in v3.0.0. Use /vc remote set-url origin <url> instead. See Git-Semantic Remote Sync.
Switch to a different space. Opens an interactive selection prompt. Flags: None

/reset

Deprecated in v3.0.0. Use /vc reset instead. See Git-Semantic Command Reference.
Reset the context tree to an empty state. This is a destructive operation.
This permanently deletes all curated context in the local context tree. Use brv vc push to back up first.

/new

Start a fresh session. Ends the current session and clears conversation history. Does not affect the context tree.

/login

Authenticate with ByteRover using OAuth 2.0 + PKCE. Opens your default browser for secure authentication. This is the TUI slash-command equivalent of running brv login in the shell, which also defaults to browser OAuth. Flags: None
For non-interactive authentication (CI, SSH, or other non-TTY shells), use brv login --api-key <key> instead.

/logout

Log out of ByteRover and clear authentication credentials.

/exit

Exit the ByteRover REPL. Alternative to Ctrl+C for gracefully closing the session. Flags: None

Agent Integration

These internal commands are used by coding agents and the connector system. You do not need to run them directly — they are managed automatically by brv connectors install.

brv mcp

Start an MCP (Model Context Protocol) server for coding agent integration. This command is spawned automatically by agents that use the MCP connector type. It communicates over stdio and connects to the running daemon via Socket.IO. MCP Tools The MCP server exposes two tools to coding agents: Notes on brv-curate:
  • At least one of context, files, or folder must be provided
  • When folder is provided, it takes precedence — any supplied files are ignored
Daemon-version drift. When the running daemon was started by a different brv build than the one spawning brv mcp, every brv-query / brv-curate text response ends with a short footer naming both versions, and brv mcp writes a one-line drift notice to stderr on connect and on every reconnect. Run brv restart (and restart the agent’s host IDE so it respawns brv mcp) to clear it.

brv hook-prompt-submit

Pre-prompt hook command for agents that use the hook connector type (Claude Code legacy). Outputs ByteRover workflow instructions to stdout before each prompt submission.
Both commands are hidden from brv --help. Install them via brv connectors install <agent> rather than running manually. See Coding Agent Connectors for setup instructions.

Global Options

Project File Structure

ByteRover CLI creates the following directory structure in your project:
Key files:
  • config.json: Stores team ID, space ID, and project metadata. Created during project initialization.
  • context-tree/: Hierarchical structure organizing project knowledge by domains and topics.
  • .git/: Internal Git repository for git-semantic version control. Created when you run brv vc init.
Example after curating:
Each file contains YAML frontmatter (title, tags, keywords, related) and structured content sections.