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 ACE playbook.
For help with any command, run brv --help or brv <command> --help.
Getting Started
Before using ByteRover CLI, you need to authenticate and initialize your project:brv init command creates a .brv/ directory in your project with configuration and ACE playbook structure.
CLI Commands
| Command | Description | Example |
|---|---|---|
brv login | Authenticate with ByteRover using OAuth 2.0 | brv login |
brv status [DIRECTORY] | Show CLI status and project information | brv status |
brv init | Initialize a project with ByteRover | brv init |
brv space list | List all spaces for the current team | brv space list --all |
brv space switch | Switch to a different team or space | brv space switch |
brv retrieve -q <query> | Retrieve memories from ByteRover | brv retrieve -q "auth flow" |
brv push | Push playbook to ByteRover memory storage | brv push |
brv add | Add or update a bullet in the playbook | brv add --interactive |
brv clear [DIRECTORY] | Clear local ACE playbook | brv clear |
brv complete <hint> <reasoning> <finalAnswer> | Complete ACE workflow in one command | brv complete "fix" "..." "..." -t "..." -f "..." |
brv gen-rules | Generate rule instructions for coding agents | brv gen-rules |
Command Details
brv login
Authenticate with ByteRover using OAuth 2.0 with PKCE flow. Opens your browser for secure authentication and stores tokens in your system’s keychain.
Arguments
None
Flags
None
Examples
- First command you should run when setting up ByteRover
- Opens your default browser for authentication
- Tokens are stored securely in system keychain (macOS Keychain, Windows Credential Manager, Linux libsecret)
- If authentication expires, simply run
brv loginagain
brv status
Show CLI status and project information. Displays local ACE context (playbook) 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)
- Playbook contents (sections and bullets) or empty state
brv init
Initialize a project with ByteRover. Creates .brv/config.json with team and space selection, and initializes the ACE playbook structure.
Arguments
None
Flags
None
Examples
- Requires
brv loginfirst - Interactive prompts guide you through team and space selection
- Creates
.brv/directory with configuration and playbook structure - Automatically runs
brv gen-rulesafter initialization - If project is already initialized, displays current configuration and exits
brv space list
List all spaces for the current team. Requires project initialization to determine which team to query.
Arguments
None
Flags
| Flag | Description | Default |
|---|---|---|
-a, --all | Fetch all spaces (may be slow for large teams) | false |
-j, --json | Output in JSON format | false |
-l, --limit <value> | Maximum number of spaces to fetch | 50 |
-o, --offset <value> | Number of spaces to skip | 0 |
- Requires
brv initfirst (reads team ID from config) - Default limit is 50 spaces
- Use
--allto fetch all spaces (internally paginates at 100 items per page) - Use
--limitand--offsetfor manual pagination control
brv space switch
Switch to a different team or space. Updates .brv/config.json with new selection.
Arguments
None
Flags
None
Examples
- Requires
brv initfirst (project must be initialized) - Displays current team and space configuration
- Interactive prompts guide you through new team and space selection
- Updates configuration but does NOT initialize playbook
brv retrieve
Retrieve memories from ByteRover Memora service and output as JSON. Searches your team’s knowledge base and returns relevant memories with related context.
Arguments
None
Flags
| Flag | Description | Required |
|---|---|---|
-q, --query <value> | Search query string | Yes |
-n, --node-keys <value> | Comma-separated list of file paths to filter results | No |
--compact | Output compact JSON (single line) | No |
- Requires
brv loginandbrv initfirst - Returns JSON with
memories(primary results with scores) andrelatedMemories(additional context) - Each memory includes: content, section, tags, metadata type, timestamp, related files
- Use
--node-keysto scope search to specific files in your codebase
brv push
Push playbook to ByteRover memory storage and clean up local ACE files. Uploads your accumulated knowledge to the cloud.
Arguments
None
Flags
| Flag | Description | Default |
|---|---|---|
-b, --branch <value> | ByteRover branch name (not Git branch) | main |
-y, --yes | Skip confirmation prompt | false |
- Requires
brv loginandbrv initfirst - Playbook must exist with content to push
- Branch concept is ByteRover-internal, NOT related to Git branches
- Shows confirmation dialog unless
--yesflag is used - After successful push, automatically cleans up:
- Playbook content (resets to empty)
- Bullet files (
.brv/ace/bullets/) - Executor outputs (
.brv/ace/executor-outputs/) - Reflections (
.brv/ace/reflections/) - Deltas (
.brv/ace/deltas/)
brv add
Add or update a bullet in the playbook. Provides direct access to modify playbook content, bypassing the full ACE workflow.
Arguments
None
Flags
| Flag | Description | Required |
|---|---|---|
-i, --interactive | Run in interactive mode | No |
-s, --section <value> | Section name for the bullet | No* |
-c, --content <value> | Content of the bullet | No* |
-b, --bullet-id <value> | Bullet ID to update (creates new if not provided) | No |
- Playbook must exist (run
brv initfirst) - Interactive mode: prompts for section (with search), content, and confirmation
- Non-interactive mode: requires both
--sectionand--contentflags - Suggested sections: Common Errors, Best Practices, Strategies, Lessons Learned, Architecture, Testing
- If
--bullet-idis not provided, creates a new bullet with auto-generated ID
brv clear
Clear local ACE context (playbook) managed by ByteRover CLI. Resets playbook to empty structure.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
DIRECTORY | string | No | Project directory (defaults to current directory) |
| Flag | Description | Default |
|---|---|---|
-y, --yes | Skip confirmation prompt | false |
- Playbook must exist
- Shows confirmation prompt unless
--yesflag is used - This action cannot be undone
- Resets playbook to empty structure with no bullets
- Does not affect
.brv/config.jsonor project initialization
brv complete
Complete ACE workflow: save executor output, generate reflection, and update playbook in one command. This is the primary command for coding agents to complete the ACE workflow efficiently.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
HINT | string | Yes | Short hint for naming output files (e.g., “user-auth”, “bug-fix”) |
REASONING | string | Yes | Detailed reasoning and approach for completing the task |
FINALANSWER | string | Yes | The final answer/solution to the task |
| Flag | Description | Required |
|---|---|---|
-t, --tool-usage <value> | Comma-separated list of tool calls with arguments (format: “ToolName:argument”) | Yes |
-f, --feedback <value> | Environment feedback about task execution | Yes |
-b, --bullet-ids <value> | Comma-separated list of playbook bullet IDs referenced | No |
-u, --update-bullet <value> | Bullet ID to update with new knowledge (creates new if not provided) | No |
--tool-usage flag accepts comma-separated tool calls:
ToolName:argument- e.g.,Read:src/file.tsToolName:pattern:"search"- e.g.,Grep:pattern:"validate"- Multiple tools:
Read:file1.ts,Edit:file1.ts,Bash:npm test
- Phase 1: Saves executor output to
.brv/ace/executor-outputs/ - Phase 2: Generates reflection with tags and saves to
.brv/ace/reflections/ - Phase 3: Generates delta and applies to playbook
- Playbook must exist (run
brv initfirst) - This is the primary command for coding agents to complete the ACE workflow
- Combines three separate operations (executor output, reflection, delta) into one
- If
--update-bulletis not provided, adds new bullet to playbook - Use
--bullet-idsto reference bullets that informed your approach
brv gen-rules
Generate rule instructions for coding agents to work with ByteRover correctly. Creates agent-specific rule files with instructions for using ByteRover CLI in their workflow.
Arguments
None
Flags
None
Examples
- Interactive search prompt for agent selection
- Prompts for overwrite confirmation if rule file already exists
- Automatically called by
brv initcommand - Generated rules help coding agents understand ByteRover workflow
- Rules include commands, workflows, and best practices for the selected agent
Global Options
ByteRover CLI provides these global options that work with any command:| Flag | Description | Example |
|---|---|---|
--help | Show help for command | brv --help, brv init --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
- playbook.json: Your living knowledge base containing accumulated learnings organized by sections
- bullets/: Individual bullet content referenced by the playbook
- executor-outputs/: Records of task executions (created by
brv complete) - reflections/: Generated reflections on completed tasks
- deltas/: Operations that modify the playbook structure