brv) is a command-line tool for managing your AI development workflow with ByteRover. Use it to authenticate, retrieve memories from your knowledge base, manage projects and spaces, and maintain your context tree.
For help with any command, run brv --help or brv <command> --help.
Installation
Install ByteRover CLI globally using npm:Prerequisites
- Node.js: Version 20.0.0 or higher
- Supported platforms: macOS, Windows, Linux
Getting Started
ByteRover CLI offers two ways to interact: Interactive REPL mode (recommended) and traditional CLI commands.Interactive REPL Mode (Recommended)
Start the interactive terminal UI by runningbrv with no arguments:
Esc at any time to skip onboarding.
Standalone CLI Commands
A few commands are also available as standalone CLI commands for scripting and quick access:CLI Commands
| Command | Description | Example |
|---|---|---|
brv | Start interactive REPL mode (recommended) | brv |
brv status [DIRECTORY] | Show CLI status and project information | brv status |
brv query <QUERY> | Query information from the context tree | brv query "How is auth implemented?" |
brv curate [CONTEXT] [--files] | Curate context to context tree | brv curate "JWT tokens expire in 24h" --files src/auth.ts |
Note: Commands likelogin,logout,init,push,pull,space,connectors,reset, andneware only available as slash commands in REPL mode. Runbrvto start REPL mode.
Important: Thebrv queryandbrv curatestandalone commands require a runningbrvinstance in the same directory. Start REPL mode withbrvfirst, then run these commands in a separate terminal.
Command Details
brv
Start the interactive REPL mode with a React/Ink-based terminal UI. This is the recommended way to use ByteRover CLI for an enhanced user experience.
Arguments
None
Flags
None
Examples
- Persistent session: Stay in the CLI and run multiple commands without restarting
- Slash commands: Use
/commandsyntax for all operations (e.g.,/login,/push,/query) - Interactive onboarding: First-time users get a guided setup flow (press
Escto skip) - Real-time feedback: See streaming responses and progress indicators
- Tab completion: Auto-complete slash commands as you type
| Command | Description |
|---|---|
/status | Show CLI status and project information |
/curate [context] [@files] | Curate context to the context tree (use @filepath for file references) |
/query <query> (alias: /q) | Query and retrieve information from context tree |
/push [-b branch] [-y] | Push context tree to ByteRover memory storage |
/pull [-b branch] | Pull context tree from ByteRover memory storage |
/space list [-a] [-j] [-l n] [-o n] | List all spaces for current team |
/space switch | Switch to a different space |
/connectors | Manage coding agent connectors (rules, hooks, mcp) |
/reset [-y] [directory] | Reset context tree to an empty state |
/new [-y] | Start a fresh session (ends current, clears conversation) |
/init [-f] | Initialize a project with ByteRover |
/login | Authenticate with ByteRover using OAuth 2.0 + PKCE |
/logout [-y] | Log out of ByteRover CLI and clear authentication |
- REPL mode is the primary way to use ByteRover CLI
- Most commands (login, init, push, pull, etc.) are only available in REPL mode
- Use
Ctrl+Cto exit REPL mode
Slash Command Details
/status
Show CLI status including authentication state, project configuration, and context tree state.
Flags: None
/curate
Curate context to the context tree using interactive or autonomous mode.
| Argument | Type | Required | Description |
|---|---|---|---|
context | string | No | Knowledge context (triggers autonomous mode if provided) |
@filepath syntax to include files as context (up to 5 files).
Examples
/query (alias: /q)
Query and retrieve information from the context tree using natural language.
| Argument | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Natural language question about your codebase |
/push
Push context tree to ByteRover memory storage.
| Flag | Description | Default |
|---|---|---|
-b, --branch <name> | ByteRover branch name (not Git branch) | main |
-y, --yes | Skip confirmation prompt | - |
/pull
Pull context tree from ByteRover memory storage.
| Flag | Description | Default |
|---|---|---|
-b, --branch <name> | ByteRover branch name (not Git branch) | main |
/space list
List all spaces for the current team.
| Flag | Description | Default |
|---|---|---|
-a, --all | Fetch all spaces (may be slow for large teams) | - |
-j, --json | Output in JSON format | - |
-l, --limit <n> | Maximum number of spaces to fetch | 50 |
-o, --offset <n> | Number of spaces to skip | 0 |
/space switch
Switch to a different space. Interactive mode only - prompts you to select from available options.
Flags: None
/connectors
Manage agent connectors for integrating ByteRover with AI coding assistants. Supports three connector types:
- MCP: Uses Model Context Protocol for direct tool integration (
brv-query,brv-curate). Default for most agents. - Rules: Generates markdown rule files that agents read for instructions
- Hook: Uses agent-specific hook systems for tighter integration (Claude Code only)
| Agent | Default | Supported | Rules File | MCP Config |
|---|---|---|---|---|
| Amp | MCP | rules, mcp | AGENTS.md | .vscode/settings.json |
| Augment Code | MCP | rules, mcp | .augment/rules/agent-context.md | Manual setup |
| Claude Code | Hook | rules, hook, mcp | CLAUDE.md | .mcp.json |
| Cline | MCP | rules, mcp | .clinerules/agent-context.md | Manual setup |
| Codex | MCP | rules, mcp | AGENTS.md | ~/.codex/config.toml |
| Cursor | MCP | rules, mcp | .cursor/rules/agent-context.mdc | .cursor/mcp.json |
| Gemini CLI | MCP | rules, mcp | GEMINI.md | .gemini/settings.json |
| GitHub Copilot | MCP | rules, mcp | .github/copilot-instructions.md | .vscode/mcp.json |
| Junie | MCP | rules, mcp | .junie/guidelines.md | .junie/mcp/mcp.json |
| Kilo Code | MCP | rules, mcp | .kilocode/rules/agent-context.md | .kilocode/mcp.json |
| Kiro | MCP | rules, mcp | .kiro/steering/agent-context.md | .kiro/settings/mcp.json |
| Qoder | MCP | rules, mcp | .qoder/rules/agent-context.md | Manual setup |
| Qwen Code | MCP | rules, mcp | QWEN.md | Manual setup |
| Roo Code | MCP | rules, mcp | .roo/rules/agent-context.md | .roo/mcp.json |
| Trae.ai | MCP | rules, mcp | project_rules.md | Manual setup |
| Warp | MCP | rules, mcp | WARP.md | Manual setup |
| Windsurf | MCP | rules, mcp | .windsurf/rules/agent-context.md | ~/.codeium/windsurf/mcp_config.json |
| Zed | MCP | rules, mcp | agent-context.rules | .zed/settings.json |
- Auto setup: ByteRover automatically writes the MCP config file (most agents)
- Manual setup: User must manually configure per agent’s documentation (Augment Code, Cline, Qoder, Qwen Code, Trae.ai, Warp)
/init
Initialize a project with ByteRover. Guides you through team and space selection and creates the context tree.
| Flag | Description |
|---|---|
-f, --force | Force re-initialization without confirmation prompt |
/login
Authenticate with ByteRover using OAuth 2.0 + PKCE. Opens your default browser for secure authentication.
Flags: None
/logout
Log out of ByteRover CLI and clear authentication credentials from the system keychain.
| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
/reset
Reset the current context tree to an empty state. This is a destructive operation.
| Argument | Type | Required | Description |
|---|---|---|---|
directory | string | No | Project directory (defaults to current directory) |
| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
/new
Start a fresh session. This ends the current session and clears conversation history but does NOT affect the context tree (use /reset for that).
| Flag | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
brv status
Show CLI status and project information. Displays local context tree managed by ByteRover CLI.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
DIRECTORY | string | No | Project directory (defaults to current directory) |
| Flag | Description | Default |
|---|---|---|
-f, --format <option> | Output format: table or json | table |
- CLI version
- Authentication status (logged in user or “Not logged in”)
- Current directory
- Project initialization status (team and space info if initialized)
- Context tree changes (git-style diff showing modified/added/deleted files)
brv query
Query and retrieve information from the context tree using natural language.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
QUERY | string | Yes | Natural language question about your project |
- Requires a running
brvinstance in the same directory (start withbrvin another terminal) - Context tree must exist (run
/initin REPL mode first) - Uses AI to search and analyze your context tree
- Best results with specific, detailed questions
- Avoid vague queries like “auth” or “show me code”
brv curate
Curate context to the context tree using interactive or autonomous mode.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
CONTEXT | string | No | Knowledge context (triggers autonomous mode if provided) |
| Flag | Description | Default |
|---|---|---|
-f, --files <paths> | Include specific file paths for critical context (max 5 files). Use multiple -f flags for multiple files | None |
- Requires a running
brvinstance in the same directory (start withbrvin another terminal) - Context tree must exist (run
/initin REPL mode first) - Interactive mode: Navigate context tree, select domain/topic, creates markdown file with descriptive name
- Autonomous mode: ByteRover agent automatically determines best location and adds content
- File references: Up to 5 files. Use
--filesor-fflag for CLI mode, or@filepathsyntax in REPL mode. Files must be text files within the project directory
Global Options
ByteRover CLI provides these global options:| Flag | Description | Example |
|---|---|---|
--help | Show help for command | brv --help, brv status --help |
--version | Show CLI version | brv --version |
File Structure
ByteRover CLI creates the following directory structure in your project:- config.json: Stores your team ID, space ID, and project metadata
- context-tree/: Hierarchical structure organizing project knowledge by domains and topics (created as you curate)
- .snapshot.json: Version control snapshot tracking context tree changes over time