byterover-cli-memory-layer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseByteRover CLI Memory Layer
ByteRover CLI 内存层
Skill by ara.so — Devtools Skills collection.
ByteRover CLI () provides AI coding agents with persistent, structured memory. It creates a context tree for project knowledge, supports version control for context, syncs to the cloud, and enables sharing across tools and teammates. This skill teaches you to use ByteRover as a memory layer for autonomous coding workflows.
brv由ara.so提供的技能——开发工具技能合集。
ByteRover CLI()为AI编码代理提供持久化的结构化内存。它为项目知识创建上下文树,支持上下文的版本控制,可同步至云端,并能在工具和团队成员间共享。本技能将教你如何把ByteRover作为自主编码工作流的内存层使用。
brvWhat ByteRover Does
ByteRover 的功能
ByteRover gives AI agents:
- Persistent memory across sessions via a local context tree
- Knowledge curation — store decisions, patterns, and domain knowledge
- Context retrieval — semantic search over project knowledge
- Version control — branch, commit, merge, and sync context like code
- Cloud sync — share context across machines and teammates
- Multi-LLM support — works with 20+ providers (Anthropic, OpenAI, Google, etc.)
- Agent tools — 24 built-in tools for file ops, code exec, memory management
- MCP integration — Model Context Protocol server for agent interop
ByteRover 为AI代理提供:
- 跨会话持久化内存:通过本地上下文树实现
- 知识整理——存储决策、模式和领域知识
- 上下文检索——对项目知识进行语义搜索
- 版本控制——像代码一样对上下文进行分支、提交、合并和同步
- 云同步——在多台设备和团队成员间共享上下文
- 多LLM支持——兼容20+提供商(Anthropic、OpenAI、Google等)
- 代理工具——24个内置工具,用于文件操作、代码执行、内存管理
- MCP集成——用于代理互操作的Model Context Protocol服务器
Installation
安装
Shell Script (macOS & Linux)
Shell脚本(macOS & Linux)
No Node.js required:
bash
curl -fsSL https://byterover.dev/install.sh | sh无需Node.js:
bash
curl -fsSL https://byterover.dev/install.sh | shnpm (All Platforms)
npm(全平台)
Requires Node.js >= 20:
bash
npm install -g byterover-cli要求Node.js >= 20:
bash
npm install -g byterover-cliVerify Installation
验证安装
bash
brv --versionbash
brv --versionQuick Start
快速开始
Initialize in a Project
在项目中初始化
Navigate to your project directory and start the REPL:
bash
cd ~/my-project
brvOn first run, ByteRover auto-configures. You'll see an interactive REPL. Type to list commands.
/导航到你的项目目录并启动REPL:
bash
cd ~/my-project
brv首次运行时,ByteRover会自动配置。你将看到一个交互式REPL,输入可列出命令。
/Open the Web Dashboard
打开Web控制台
The primary UI is the web dashboard:
bash
brv webuiThis opens a browser interface for curating context, querying knowledge, reviewing changes, and managing sync.
主要UI是Web控制台:
bash
brv webui这会打开一个浏览器界面,用于整理上下文、查询知识、查看变更和管理同步。
Core Commands
核心命令
Curate Context (Add Knowledge)
整理上下文(添加知识)
Add project knowledge from the REPL:
/curate "Authentication uses JWT with 24h expiry and refresh tokens" @src/auth/jwt.tsOr from the CLI:
bash
brv curate -m "API rate limiting: 100 req/min per IP, enforced in middleware" -f src/middleware/ratelimit.tsCurate operations are pending by default and require review.
从REPL添加项目知识:
/curate "认证使用JWT,有效期24小时并支持刷新令牌" @src/auth/jwt.ts或通过CLI:
bash
brv curate -m "API限流规则:每个IP每分钟100次请求,由中间件强制执行" -f src/middleware/ratelimit.ts整理操作默认处于待处理状态,需要审核。
Query Knowledge
查询知识
Search the context tree:
/query How is authentication implemented?Or:
bash
brv query "What rate limiting rules are in place?"搜索上下文树:
/query 认证是如何实现的?或:
bash
brv query "当前有哪些限流规则?"Review Pending Changes
审核待处理变更
List pending curate operations:
bash
brv review pendingApprove a specific operation:
bash
brv review approve <operation-id>Reject an operation:
bash
brv review reject <operation-id>列出待处理的整理操作:
bash
brv review pending批准特定操作:
bash
brv review approve <operation-id>拒绝操作:
bash
brv review reject <operation-id>View Curate History
查看整理历史
bash
brv curate viewbash
brv curate viewCheck Status
检查状态
bash
brv statusShows project location, daemon status, active model, and sync state.
bash
brv status显示项目位置、守护进程状态、活跃模型和同步状态。
Version Control for Context
上下文版本控制
ByteRover supports Git-like version control for the context tree.
ByteRover支持类Git的上下文树版本控制。
Initialize Version Control
初始化版本控制
bash
brv vc initThis creates and sets up version tracking.
.brv/vc/bash
brv vc init这会创建并设置版本跟踪。
.brv/vc/Stage and Commit Changes
暂存并提交变更
bash
brv vc add . # Stage all changes
brv vc commit -m "Add auth context" # Commit staged changesbash
brv vc add . # 暂存所有变更
brv vc commit -m "添加认证上下文" # 提交暂存的变更View Commit History
查看提交历史
bash
brv vc logbash
brv vc logBranching
分支管理
bash
brv vc branch feature-auth # Create a branch
brv vc checkout feature-auth # Switch to it
brv vc branch # List branchesbash
brv vc branch feature-auth # 创建分支
brv vc checkout feature-auth # 切换分支
brv vc branch # 列出分支Merge Branches
合并分支
bash
brv vc checkout main
brv vc merge feature-authbash
brv vc checkout main
brv vc merge feature-authPush and Pull from Cloud
向云端推送和拉取
Push commits to ByteRover Cloud:
bash
brv vc pushPull commits from cloud:
bash
brv vc pullClone a shared space repository:
bash
brv vc clone <space-id>将提交推送到ByteRover Cloud:
bash
brv vc push从云端拉取提交:
bash
brv vc pull克隆共享空间仓库:
bash
brv vc clone <space-id>Cloud Sync (Legacy)
云同步(旧版)
The original push/pull commands create snapshots (not version-controlled):
bash
brv push # Snapshot context to cloud
brv pull # Restore context from cloudPrefer / for version-controlled sync.
brv vc pushbrv vc pull原始的push/pull命令用于创建快照(无版本控制):
bash
brv push # 将上下文快照上传至云端
brv pull # 从云端恢复上下文推荐使用 / 进行带版本控制的同步。
brv vc pushbrv vc pullLLM Provider Configuration
LLM提供商配置
List Available Providers
列出可用提供商
bash
brv providers listSupported: Anthropic, OpenAI, Google, Groq, Mistral, xAI, Cerebras, Cohere, DeepInfra, DeepSeek, OpenRouter, Perplexity, TogetherAI, Vercel, Minimax, Moonshot, GLM, OpenAI-Compatible, ByteRover.
bash
brv providers list支持的提供商:Anthropic、OpenAI、Google、Groq、Mistral、xAI、Cerebras、Cohere、DeepInfra、DeepSeek、OpenRouter、Perplexity、TogetherAI、Vercel、Minimax、Moonshot、GLM、OpenAI-Compatible、ByteRover。
Connect a Provider
连接提供商
bash
brv providers connectFollow the prompts to enter your API key (stored securely in ).
.brv/config.jsonOr set environment variables:
bash
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...bash
brv providers connect按照提示输入API密钥(安全存储在中)。
.brv/config.json或设置环境变量:
bash
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...Switch Active Provider
切换活跃提供商
bash
brv providers switchbash
brv providers switchList and Switch Models
列出并切换模型
bash
brv model list
brv model switchbash
brv model list
brv model switchReal-World Usage Patterns
实际使用模式
Pattern 1: Curate API Design Decisions
模式1:整理API设计决策
When you make a design decision, record it immediately:
bash
brv curate -m "User endpoints: POST /users (create), GET /users/:id (read), PATCH /users/:id (update). All require JWT auth except public profile GET /users/:id/profile." -f src/routes/users.tsThen query later:
bash
brv query "What are the user endpoints and their auth requirements?"当你做出设计决策时,立即记录:
bash
brv curate -m "用户端点:POST /users(创建)、GET /users/:id(读取)、PATCH /users/:id(更新)。除公开资料接口GET /users/:id/profile外,所有接口都需要JWT认证。" -f src/routes/users.ts之后可查询:
bash
brv query "用户端点有哪些,各自的认证要求是什么?"Pattern 2: Document Complex Business Logic
模式2:记录复杂业务逻辑
bash
brv curate -m "Order processing: validate inventory -> reserve stock -> charge payment -> fulfill. Rollback if payment fails. Stock reservation expires after 15 minutes." -f src/services/orders.tsbash
brv curate -m "订单处理流程:验证库存 -> 预留库存 -> 收取款项 -> 发货。如果付款失败则回滚。库存预留15分钟后过期。" -f src/services/orders.tsPattern 3: Record Configuration Patterns
模式3:记录配置模式
bash
brv curate -m "Database: Postgres 14, connection pool max 20, timeout 30s. Migrations via Prisma. Replica for read-heavy queries in production." -f prisma/schema.prismabash
brv curate -m "数据库:Postgres 14,连接池最大20个连接,超时30秒。通过Prisma执行迁移。生产环境中读密集型查询使用副本。" -f prisma/schema.prismaPattern 4: Share Context with Team
模式4:与团队共享上下文
After curating knowledge locally:
bash
brv vc add .
brv vc commit -m "Add order processing and DB config context"
brv vc pushTeammate pulls:
bash
brv vc pullThey now have the same context tree.
在本地整理知识后:
bash
brv vc add .
brv vc commit -m "添加订单处理和数据库配置上下文"
brv vc push团队成员拉取:
bash
brv vc pull他们现在拥有相同的上下文树。
Pattern 5: Query Before Implementing
模式5:实现前先查询
Before writing new code, check existing patterns:
bash
brv query "How do we handle error logging and monitoring?"Use the answer to stay consistent with established patterns.
编写新代码前,检查现有模式:
bash
brv query "我们如何处理错误日志和监控?"使用查询结果保持与现有模式一致。
Worktrees and Knowledge Sources
工作树与知识源
What Are Worktrees?
什么是工作树?
A worktree is a subdirectory link to a parent project. It avoids creating nested directories.
.brv/Use case: Monorepo with multiple packages, each needs ByteRover but should share one context tree.
工作树是指向父项目的子目录链接。它避免创建嵌套的目录。
.brv/使用场景:包含多个包的单体仓库,每个包需要ByteRover但应共享同一个上下文树。
Add a Worktree
添加工作树
From the project root:
bash
brv worktree add ./packages/apiThis creates pointer file in that redirects to the parent .
.brv./packages/api.brv/从项目根目录执行:
bash
brv worktree add ./packages/api这会在中创建指针文件,指向父目录的。
./packages/api.brv.brv/List Worktrees
列出工作树
bash
brv worktree listbash
brv worktree listRemove a Worktree
删除工作树
bash
brv worktree remove ./packages/apibash
brv worktree remove ./packages/apiWhat Are Sources?
什么是知识源?
A source is a read-only reference to another project's knowledge.
Use case: Frontend app wants to query the backend's context tree without duplicating it.
知识源是对另一个项目知识的只读引用。
使用场景:前端应用想要查询后端的上下文树但不想重复复制。
Add a Source
添加知识源
bash
brv source add ../backend-projectNow searches both local and source knowledge.
brv querybash
brv source add ../backend-project现在会同时搜索本地和知识源的知识。
brv queryList and Remove Sources
列出并删除知识源
bash
brv source list
brv source remove ../backend-projectbash
brv source list
brv source remove ../backend-projectMCP Server (Model Context Protocol)
MCP服务器(Model Context Protocol)
ByteRover implements MCP for agent interop.
ByteRover实现了MCP以支持代理互操作。
Start the MCP Server
启动MCP服务器
bash
brv mcpThis runs a JSON-RPC server that exposes ByteRover tools (curate, query, file ops, etc.) to MCP clients.
bash
brv mcp这会运行一个JSON-RPC服务器,向MCP客户端暴露ByteRover工具(整理、查询、文件操作等)。
Configure MCP Client
配置MCP客户端
Example :
claude_desktop_config.jsonjson
{
"mcpServers": {
"byterover": {
"command": "brv",
"args": ["mcp"]
}
}
}Claude Desktop can now call ByteRover tools directly.
示例:
claude_desktop_config.jsonjson
{
"mcpServers": {
"byterover": {
"command": "brv",
"args": ["mcp"]
}
}
}Claude Desktop现在可以直接调用ByteRover工具。
Hub and Connectors
Hub与连接器
ByteRover Hub hosts reusable skills and bundles.
ByteRover Hub托管可复用的技能和包。
List Available Packages
列出可用包
bash
brv hub listbash
brv hub listInstall a Package
安装包
bash
brv hub install <package-name>bash
brv hub install <package-name>Add a Custom Registry
添加自定义注册表
bash
brv hub registry add my-registry https://registry.example.combash
brv hub registry add my-registry https://registry.example.comList and Remove Registries
列出并删除注册表
bash
brv hub registry list
brv hub registry remove my-registrybash
brv hub registry list
brv hub registry remove my-registryConnectors
连接器
Connectors extend ByteRover with integrations (e.g., GitHub, Slack).
bash
brv connectors list
brv connectors install github-connector连接器为ByteRover扩展集成功能(如GitHub、Slack)。
bash
brv connectors list
brv connectors install github-connectorConfiguration
配置
ByteRover stores config in at the project root.
.brv/config.jsonByteRover将配置存储在项目根目录的中。
.brv/config.jsonTypical Config Structure
典型配置结构
json
{
"projectId": "abc123",
"spaceId": "space-xyz",
"providers": {
"anthropic": {
"apiKey": "sk-ant-..."
},
"openai": {
"apiKey": "sk-..."
}
},
"activeProvider": "anthropic",
"activeModel": "claude-3-5-sonnet-20241022",
"reviewEnabled": true
}json
{
"projectId": "abc123",
"spaceId": "space-xyz",
"providers": {
"anthropic": {
"apiKey": "sk-ant-..."
},
"openai": {
"apiKey": "sk-..."
}
},
"activeProvider": "anthropic",
"activeModel": "claude-3-5-sonnet-20241022",
"reviewEnabled": true
}Environment Variables
环境变量
Override config with env vars:
bash
export BRV_ANTHROPIC_API_KEY=sk-ant-...
export BRV_OPENAI_API_KEY=sk-...
export BRV_ACTIVE_PROVIDER=openai
export BRV_ACTIVE_MODEL=gpt-4o使用环境变量覆盖配置:
bash
export BRV_ANTHROPIC_API_KEY=sk-ant-...
export BRV_OPENAI_API_KEY=sk-...
export BRV_ACTIVE_PROVIDER=openai
export BRV_ACTIVE_MODEL=gpt-4oEnable/Disable Review Workflow
启用/禁用审核工作流
By default, curate operations are pending. Disable review to auto-approve:
bash
undefined默认情况下,整理操作处于待处理状态。禁用审核可自动批准:
bash
undefinedEdit .brv/config.json
编辑.brv/config.json
{
"reviewEnabled": false
}
Or via env:
```bash
export BRV_REVIEW_ENABLED=false{
"reviewEnabled": false
}
或通过环境变量:
```bash
export BRV_REVIEW_ENABLED=falseAuthentication to ByteRover Cloud
ByteRover Cloud认证
Login
登录
Get an API key from app.byterover.dev/settings/keys, then:
bash
brv loginEnter your API key when prompted.
Logout
登出
bash
brv logoutbash
brv logoutTroubleshooting
故障排除
Daemon Not Running
守护进程未运行
If shows "Daemon not running":
brv statusbash
brv restart如果显示“Daemon not running”:
brv statusbash
brv restartAPI Key Not Recognized
API密钥未被识别
Ensure the key is set:
bash
brv providers list # Check if provider is connected
brv providers connect # Re-enter API keyOr verify env var:
bash
echo $ANTHROPIC_API_KEY确保密钥已设置:
bash
brv providers list # 检查提供商是否已连接
brv providers connect # 重新输入API密钥或验证环境变量:
bash
echo $ANTHROPIC_API_KEYCurate Operations Not Appearing
整理操作未显示
Check if review is enabled. If so, operations are pending:
bash
brv review pending
brv review approve <operation-id>检查是否启用了审核。如果启用,操作处于待处理状态:
bash
brv review pending
brv review approve <operation-id>Query Returns No Results
查询无结果返回
- Ensure you've curated knowledge first
- Check that files are indexed:
brv status - Verify active model supports embeddings
- 确保已先整理知识
- 检查文件是否已索引:
brv status - 验证活跃模型支持嵌入功能
Version Control Conflicts
版本控制冲突
If fails due to conflicts:
brv vc pullbash
brv vc status # See conflicting files如果因冲突失败:
brv vc pullbash
brv vc status # 查看冲突文件Manually resolve conflicts in .brv/vc/
手动解决.brv/vc/中的冲突
brv vc add .
brv vc commit -m "Resolve merge conflicts"
undefinedbrv vc add .
brv vc commit -m "解决合并冲突"
undefinedPush Fails (Not Authenticated)
推送失败(未认证)
bash
brv login
brv vc pushbash
brv login
brv vc pushWorktree Not Recognized
工作树未被识别
Ensure pointer file exists in the worktree directory and points to the correct parent:
.brvbash
cat packages/api/.brv确保工作树目录中存在指针文件,且指向正确的父目录:
.brvbash
cat packages/api/.brvShould contain: gitdir: ../../.brv
应包含:gitdir: ../../.brv
If missing, re-add:
```bash
brv worktree add ./packages/api
如果缺失,重新添加:
```bash
brv worktree add ./packages/apiTypeScript API Usage (Advanced)
TypeScript API使用(进阶)
ByteRover is primarily a CLI, but you can use its internal APIs in TypeScript projects.
ByteRover主要是CLI工具,但你也可以在TypeScript项目中使用其内部API。
Install as Dependency
安装为依赖
bash
npm install byterover-clibash
npm install byterover-cliExample: Programmatic Curate
示例:程序化整理
typescript
import { BrvClient } from 'byterover-cli';
const client = new BrvClient({
projectRoot: process.cwd(),
});
await client.curate({
message: "User service uses bcrypt for password hashing, cost factor 12",
files: ['src/services/user.ts'],
});
console.log('Context curated');typescript
import { BrvClient } from 'byterover-cli';
const client = new BrvClient({
projectRoot: process.cwd(),
});
await client.curate({
message: "用户服务使用bcrypt进行密码哈希,成本因子为12",
files: ['src/services/user.ts'],
});
console.log('上下文已整理');Example: Programmatic Query
示例:程序化查询
typescript
import { BrvClient } from 'byterover-cli';
const client = new BrvClient({
projectRoot: process.cwd(),
});
const results = await client.query({
query: "How is password hashing implemented?",
});
console.log(results.answer);typescript
import { BrvClient } from 'byterover-cli';
const client = new BrvClient({
projectRoot: process.cwd(),
});
const results = await client.query({
query: "密码哈希是如何实现的?",
});
console.log(results.answer);Example: Start REPL Programmatically
示例:程序化启动REPL
typescript
import { startRepl } from 'byterover-cli';
await startRepl({
projectRoot: process.cwd(),
provider: 'anthropic',
model: 'claude-3-5-sonnet-20241022',
});typescript
import { startRepl } from 'byterover-cli';
await startRepl({
projectRoot: process.cwd(),
provider: 'anthropic',
model: 'claude-3-5-sonnet-20241022',
});Best Practices
最佳实践
- Curate Early and Often — Don't wait until the end of a feature. Curate decisions as you make them.
- Use Specific File References — Always attach relevant files to curate operations for better context linking.
- Enable Review in Team Settings — Prevent accidental or low-quality context pollution.
- Commit Context Like Code — Use with meaningful messages for traceability.
brv vc commit - Sync Regularly — Push and pull context changes daily in team environments.
- Query Before Coding — Check existing patterns and decisions before implementing new features.
- Use Worktrees for Monorepos — Avoid nested directories by linking packages to a single root.
.brv/ - Add Sources for Cross-Project References — Link related projects to search their knowledge without duplication.
- Leverage MCP for Agent Interop — Let other AI tools (Claude Desktop, etc.) access ByteRover's memory.
- Document Configuration in Context — Curate environment setup, deployment steps, and config patterns so agents can reproduce them.
- 尽早且经常整理 — 不要等到功能开发完成再整理,做出决策后立即记录。
- 使用特定文件引用 — 始终为整理操作关联相关文件,以实现更好的上下文链接。
- 团队环境启用审核 — 防止意外或低质量的上下文污染。
- 像代码一样提交上下文 — 使用并添加有意义的消息,便于追溯。
brv vc commit - 定期同步 — 在团队环境中,每天推送和拉取上下文变更。
- 编码前先查询 — 实现新功能前,检查现有模式和决策。
- 单体仓库使用工作树 — 通过链接包到单个根目录,避免嵌套目录。
.brv/ - 添加跨项目知识源 — 关联相关项目,无需复制即可搜索其知识。
- 利用MCP实现代理互操作 — 让其他AI工具(如Claude Desktop)访问ByteRover的内存。
- 在上下文中记录配置 — 整理环境设置、部署步骤和配置模式,以便代理可以重现。
Common Workflows
常见工作流
Workflow 1: Solo Developer, Daily Usage
工作流1:独立开发者日常使用
bash
cd ~/my-project
brv # Start REPLbash
cd ~/my-project
brv # 启动REPLIn REPL:
在REPL中:
/curate "Redis caching: 1h TTL for user sessions, 5m for API responses" @src/cache.ts
/query "What are the caching rules?"
/curate "Redis缓存:用户会话TTL为1小时,API响应TTL为5分钟" @src/cache.ts
/query "缓存规则是什么?"
Exit REPL
退出REPL
brv vc add .
brv vc commit -m "Add caching context"
brv vc push # Backup to cloud
undefinedbrv vc add .
brv vc commit -m "添加缓存上下文"
brv vc push # 备份到云端
undefinedWorkflow 2: Team Collaboration
工作流2:团队协作
Developer A:
bash
brv curate -m "API versioning: v1 in /api/v1, v2 in /api/v2. Deprecate v1 endpoints after 6 months." -f src/routes/index.ts
brv review approve $(brv review pending --json | jq -r '.[0].id')
brv vc add .
brv vc commit -m "Document API versioning policy"
brv vc pushDeveloper B:
bash
brv vc pull
brv query "What is the API versioning policy?"开发者A:
bash
brv curate -m "API版本控制:v1在/api/v1,v2在/api/v2。v1端点将在6个月后弃用。" -f src/routes/index.ts
brv review approve $(brv review pending --json | jq -r '.[0].id')
brv vc add .
brv vc commit -m "记录API版本控制策略"
brv vc push开发者B:
bash
brv vc pull
brv query "API版本控制策略是什么?"Gets the answer immediately
立即得到答案
undefinedundefinedWorkflow 3: Onboarding New Team Members
工作流3:新团队成员入职
New developer clones the repo and context:
bash
git clone https://github.com/myteam/myproject.git
cd myproject
brv vc clone <space-id> # Clone shared context
brv query "How do I set up the development environment?"新开发者克隆仓库和上下文:
bash
git clone https://github.com/myteam/myproject.git
cd myproject
brv vc clone <space-id> # 克隆共享上下文
brv query "如何搭建开发环境?"ByteRover returns curated setup instructions
ByteRover返回整理好的安装说明
undefinedundefinedWorkflow 4: Multi-Project Reference
工作流4:跨项目引用
Frontend project references backend context:
bash
cd ~/frontend-app
brv source add ../backend-api
brv query "What are the available API endpoints?"前端项目引用后端上下文:
bash
cd ~/frontend-app
brv source add ../backend-api
brv query "有哪些可用的API端点?"Searches both frontend and backend context
同时搜索前端和后端上下文
undefinedundefinedIntegration with AI Coding Agents
与AI编码代理集成
ByteRover works with 22+ AI coding agents. Here's how to integrate:
ByteRover兼容22+AI编码代理。以下是集成方法:
Cursor
Cursor
Add to or workspace settings:
.cursorrulesWhen working on this project, use ByteRover CLI (brv) to query and curate context.
Before implementing features, run: brv query "relevant question"
After making architectural decisions, run: brv curate -m "decision" -f <files>添加到或工作区设置:
.cursorrules处理此项目时,使用ByteRover CLI(brv)查询和整理上下文。
实现功能前,运行:brv query "相关问题"
做出架构决策后,运行:brv curate -m "决策内容" -f <文件路径>Claude Code / Cline
Claude Code / Cline
In system prompt or project instructions:
This project uses ByteRover for persistent memory. Use `brv query` to search project knowledge before coding. Use `brv curate` to record important decisions and patterns.在系统提示或项目说明中添加:
本项目使用ByteRover作为持久化内存。编码前使用`brv query`搜索项目知识。使用`brv curate`记录重要决策和模式。Windsurf
Windsurf
Add to project docs or cascade rules:
undefined添加到项目文档或级联规则:
undefinedByteRover Memory Layer
ByteRover内存层
- Query context:
brv query "<question>" - Add context:
brv curate -m "<knowledge>" -f <files> - Sync with team: after curating
brv vc push
undefined- 查询上下文:
brv query "<问题>" - 添加上下文:
brv curate -m "<知识内容>" -f <文件路径> - 与团队同步:整理后运行
brv vc push
undefinedMCP-Compatible Agents
MCP兼容代理
Configure MCP client (e.g., Claude Desktop):
json
{
"mcpServers": {
"byterover": {
"command": "brv",
"args": ["mcp"]
}
}
}Agent can now call ByteRover tools directly without shell commands.
配置MCP客户端(如Claude Desktop):
json
{
"mcpServers": {
"byterover": {
"command": "brv",
"args": ["mcp"]
}
}
}代理现在无需shell命令即可直接调用ByteRover工具。
Summary
总结
ByteRover CLI is a memory layer for AI coding agents. It stores project knowledge in a version-controlled context tree, syncs to the cloud, and enables semantic search across team and project boundaries. Use to add knowledge, to retrieve it, and to collaborate. Integrate with AI agents via shell commands or MCP for autonomous, context-aware coding workflows.
brv curatebrv querybrv vc push/pullByteRover CLI是AI编码代理的内存层。它将项目知识存储在带版本控制的上下文树中,可同步至云端,并支持跨团队和项目边界的语义搜索。使用添加知识,检索知识,进行协作。通过shell命令或MCP与AI代理集成,实现自主的上下文感知编码工作流。
brv curatebrv querybrv vc push/pull