Skip to main content
ByteRover CLI (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.

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. Start the interactive terminal UI by running brv with no arguments:
brv
This launches a persistent session with a React/Ink-based terminal interface where you can use slash commands:
/login                  # Authenticate with ByteRover
/init [-f]              # Initialize project (select team/space)
/status                 # Show auth, config, and context tree state
/curate [context] [@files]  # Add content to context tree
/query <query>          # Query information from context tree (alias: /q)
/push [-b branch] [-y]  # Push context tree to cloud
/pull [-b branch]       # Pull context tree from cloud
/space list [-a] [-j]   # List all spaces
/space switch           # Switch team or space
/gen-rules              # Generate agent rule files
/clear [-y] [directory] # Reset context tree
/logout [-y]            # Log out
First-time users will see an interactive onboarding flow. Press 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:
brv status                              # Show CLI and project status
brv query "How is auth implemented?"    # Query context tree
brv curate "JWT tokens expire in 24h"   # Add content to context tree

CLI Commands

CommandDescriptionExample
brvStart interactive REPL mode (recommended)brv
brv status [DIRECTORY]Show CLI status and project informationbrv status
brv query <QUERY>Query information from the context treebrv query "How is auth implemented?"
brv curate [CONTEXT] [--files]Add content to context treebrv curate "JWT tokens expire in 24h" --files src/auth.ts
Note: Commands like login, logout, init, push, pull, space, gen-rules, and clear are only available as slash commands in REPL mode. Run brv to start REPL mode.
Important: The brv query and brv curate standalone commands require a running brv instance in the same directory. Start REPL mode with brv first, 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
# Start interactive REPL mode
brv
Features
  • Persistent session: Stay in the CLI and run multiple commands without restarting
  • Slash commands: Use /command syntax for all operations (e.g., /login, /push, /query)
  • Interactive onboarding: First-time users get a guided setup flow (press Esc to skip)
  • Real-time feedback: See streaming responses and progress indicators
  • Tab completion: Auto-complete slash commands as you type
Available Slash Commands
CommandDescription
/loginAuthenticate with ByteRover
/logout [-y]Log out and clear authentication
/init [-f]Initialize project with team/space selection
/statusShow auth, config, and context tree state
/curate [context] [@files]Add content to context tree (use @filepath for file references)
/query <query> (alias: /q)Query information from context tree
/push [-b branch] [-y]Push context tree to cloud
/pull [-b branch]Pull context tree from cloud
/space list [-a] [-j] [-l n] [-o n]List all spaces for current team
/space switchSwitch to different team or space
/gen-rulesGenerate agent-specific rule files
/clear [-y] [directory]Reset context tree to default domains
Notes
  • 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+C to exit REPL mode

Slash Command Details

/login

Authenticate with ByteRover using OAuth 2.0 + PKCE. Opens your default browser for secure authentication. Flags: None

/logout

Log out and clear authentication credentials from the system keychain.
FlagDescription
-y, --yesSkip confirmation prompt

/init

Initialize a project with ByteRover. Guides you through team and space selection and creates the context tree.
FlagDescription
-f, --forceForce re-initialization without confirmation

/status

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

/curate

Add content to the context tree using interactive or autonomous mode.
ArgumentTypeRequiredDescription
contextstringNoContent to add (triggers autonomous mode if provided)
File References: Use @filepath syntax to include files as context (up to 5 files). Examples
# Interactive mode (manually choose domain/topic)
/curate

# Autonomous mode with AI classification
/curate "Authentication uses JWT with 24h expiry"

# Include file references
/curate "Session handling logic" @src/auth/session.ts @src/middleware/auth.ts

/query (alias: /q)

Query and retrieve information from the context tree using natural language.
ArgumentTypeRequiredDescription
querystringYesNatural language question about your project
Examples
/query "How is user authentication implemented?"
/q "What testing strategies are used?"

/push

Push context tree to ByteRover cloud storage.
FlagDescriptionDefault
-b, --branch <name>Branch name for cloud storagemain
-y, --yesSkip confirmation prompt-
Examples
/push                    # Push to main branch
/push -b feature-auth    # Push to feature-auth branch
/push -y                 # Push without confirmation

/pull

Pull context tree from ByteRover cloud storage.
FlagDescriptionDefault
-b, --branch <name>Branch name to pull frommain
Examples
/pull                    # Pull from main branch
/pull -b feature-auth    # Pull from feature-auth branch

/space list

List all spaces for the current team.
FlagDescriptionDefault
-a, --allFetch all spaces (may be slow for large teams)-
-j, --jsonOutput in JSON format-
-l, --limit <n>Maximum spaces to fetch50
-o, --offset <n>Number of spaces to skip0

/space switch

Switch to a different team or space. Interactive mode only - prompts you to select from available options. Flags: None

/gen-rules

Generate rule instruction files for coding agents. Creates configuration files for:
  • Claude Code (.claude/CLAUDE.md)
  • Cursor (.cursorrules)
  • Windsurf (.windsurfrules)
  • GitHub Copilot (.github/copilot-instructions.md)
Flags: None

/clear

Reset context tree to the 6 default domains. This is a destructive operation.
ArgumentTypeRequiredDescription
directorystringNoProject directory (defaults to current directory)
FlagDescription
-y, --yesSkip confirmation prompt
Examples
/clear                       # Reset with confirmation
/clear -y                    # Reset without confirmation
/clear -y /path/to/project   # Reset specific project

brv status

Show CLI status and project information. Displays local context tree managed by ByteRover CLI. Arguments
ArgumentTypeRequiredDescription
DIRECTORYstringNoProject directory (defaults to current directory)
Flags
FlagDescriptionDefault
-f, --format <option>Output format: table or jsontable
Examples
# Show status for current directory
brv status

# Show status for a specific directory
brv status /path/to/project

# Output status as JSON
brv status --format json
Output The status command displays:
  • 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
ArgumentTypeRequiredDescription
QUERYstringYesNatural language question about your project
Flags None Examples
# Query about implementation details
brv query "How is user authentication implemented?"
brv query "What are the API rate limits and where are they enforced?"

# Query about project structure
brv query "What testing strategies are used?"
Notes
  • Requires a running brv instance in the same directory (start with brv in another terminal)
  • Context tree must exist (run /init in 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

Add content to the context tree using interactive or autonomous mode. Arguments
ArgumentTypeRequiredDescription
CONTEXTstringNoContent to add (triggers autonomous mode if provided)
Flags
FlagDescriptionDefault
-f, --files <paths>Include file references (max 5 files). Use comma-separated paths or multiple -f flagsNone
Examples
# Interactive mode (manually choose domain/topic)
brv curate

# Autonomous mode with AI classification
brv curate "User authentication uses JWT tokens with 24h expiry"
brv curate "React components follow atomic design pattern"

# Include file references for context
brv curate "This module handles user sessions" -f src/auth/session.ts
brv curate "API rate limiting" --files src/middleware/rate-limit.ts,src/config/limits.ts
brv curate "Auth logic" -f src/auth.ts -f src/middleware/auth.ts
Notes
  • Requires a running brv instance in the same directory (start with brv in another terminal)
  • Context tree must exist (run /init in REPL mode first)
  • Interactive mode: Navigate context tree, select domain/topic, creates context.md file
  • Autonomous mode: ByteRover agent automatically determines best location and adds content
  • File references: Up to 5 files. Use --files or -f flag for CLI mode, or @filepath syntax in REPL mode. Files must be text files within the project directory

Global Options

ByteRover CLI provides these global options:
FlagDescriptionExample
--helpShow help for commandbrv --help, brv status --help
--versionShow CLI versionbrv --version

File Structure

ByteRover CLI creates the following directory structure in your project:
.brv/
├── config.json                # Project configuration (team/space)
└── context-tree/              # Your knowledge base
    ├── .snapshot.json         # Latest context tree snapshot
    ├── code_style/            # Style guidelines and quality standards
    ├── design/                # UI libraries and design guidelines
    ├── structure/             # Project structure and components
    ├── compliance/            # Security and compliance
    ├── testing/               # Testing implementation context
    └── bug_fixes/             # Bug fixing logic and procedures
Key Files and Directories
  • config.json: Stores your team ID, space ID, and project metadata
  • context-tree/: Hierarchical structure organizing project knowledge by domains and topics
  • .snapshot.json: Version control snapshot tracking context tree changes over time
  • Each domain can contain multiple topics, and each topic has a context.md file with actual content