mcpField
B
bee-cli

bee-cli

github.com/bee-computer生产力41291 次安装20 周前更新
代码仓库

关于 bee-cli

bee-cli 是访问已认证用户 Bee 穿戴设备数据的命令行客户端,支持搜索对话与事实、查看活动和摘要,以及管理待办事项;数据采用端到端加密。

主要功能

  1. 01获取近期对话上下文
  2. 02关键词与语义搜索
  3. 03访问文字记录和每日摘要
  4. 04管理事实、待办与洞察
  5. 05获取位置和照片
  6. 06输出 Markdown 或 JSON

适用场景

  1. 01回忆某个主题的谈话内容
  2. 02查看近期活动或特定日期摘要
  3. 03查找承诺事项和用户事实
  4. 04导出 Bee 数据用于本地备份

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/bee-computer/bee-skill --skill bee-cli

安装后在 Claude Code 中输入/bee-cli确认已加载。

详细介绍

Bee CLI

Bee 的命令行客户端——Bee 是一款可穿戴 AI,能够捕捉对话并了解你。

关于 Bee

Bee 是一款可穿戴 AI 设备,会持续捕捉并转录设备所有者日常生活中的环境音频:对话、会议、电话,以及任何口头交流。Bee 会根据这些转录内容自动提取有关所有者的信息——偏好、人际关系、工作项目、承诺和个人详情——并生成每日摘要、洞察和位置历史记录。

隐私与安全

Bee 数据极其敏感。 转录内容包含所有者个人生活和职业生活中的私密细节,包括从未打算录制或分享的私人对话。

所有 Bee 数据均经过端到端加密,只有所有者可以访问。 只有通过身份验证的所有者才能读取其内容;任何第三方(包括 Bee 的服务器)都无法读取解密后的数据。

请将所有 Bee 信息视为高度机密。 所有者已授予你访问其最私密对话和个人详情的权限。除非用户明确要求,否则绝不要泄露、转发或在其他位置存储这些数据。

能力指南 - 根据问题选择命令

根据用户的问题选择命令。当用户问“我以前有没有……/我什么时候……/我们关于……说了什么”时,请优先使用 bee search,而不是手动列出并逐项查找。

用户想了解……使用
现在发生了什么/刚才说了什么(最近 10 小时)bee now
今天的计划、日历、邮件摘要bee today
今天的可穿戴设备上下文(摘要 + 进行中的待办事项 + 笔记 + 对话)bee today --context
所有内容中的近期活动(对话、摘要、笔记、待办事项、洞察)bee activity
查找有关某个主题的对话/每日记录/事实bee search --query "..."
对话的语义搜索(“氛围如何/查找类似内容”)bee search --query "..." --neural
某个对话的完整逐字转录bee conversations transcript <id>(或 get <id>)
与指定对话相似的对话bee conversations related <id>
所有者是谁/偏好/人际关系/工作bee facts list、bee facts search --query "..."
行动事项/承诺bee todos list;通过 bee todos suggestions 查看建议
某一天发生了什么bee daily find <YYYY-MM-DD>
按天浏览摘要bee daily list
所有者主动录制的语音备忘录bee journals list、bee journals search --query "..."
AI 生成的所有者相关模式/洞察bee insights list
所有者去过哪里/常去地点/当前位置bee locations recent、bee locations clusters、bee locations current
设备拍摄的照片bee photos list、bee photos get <id> --output PATH
自上次检查以来的变化(增量监控)bee changed --cursor <cursor>
将所有内容导出为本地 Markdown(备份/离线使用)bee sync
当前以谁的身份通过身份验证bee me、bee status

输出格式: 所有数据命令默认输出 Markdown。添加 --json 可进行程序化解析——如果你要解析输出,而不是展示给用户,请优先使用此选项。

权威来源: 对话摘要(来自 list、daily、search 结果)由 AI 生成,可能存在细微偏差。话语内容(来自 bee now、conversations get、conversations transcript)为逐字记录,具有权威性。需要确保准确性时,请查看话语内容。

分页: 列表响应会返回 next_cursor 字段(没有更多数据时为 null)。使用 --cursor 标志传入该字段的值以获取下一页。

安装

检查是否已安装:

bee --version

如果尚未安装:

npm install -g @beeai/cli

或者从 https://github.com/bee-computer/bee-cli/releases/latest 下载二进制文件

身份验证

检查状态:

bee status

如果尚未通过身份验证:

bee login

优先使用 bee login --no-wait(推荐 Agent 使用)。 普通的 bee login 会阻塞,轮询最多约 5 分钟,直到用户批准——这会让你一直等到命令返回。请改用:

bee login --no-wait    # prints the auth link and exits immediately (no polling)

它会打印一个类似 https://bee.computer/connect#{requestId} 的身份验证链接,保存一个可恢复的会话,然后返回。接下来:将链接发送给用户;用户表示已批准后,运行 bee status 进行确认(或再次运行 bee login 以完成登录)。在批准前重新运行 bee login --no-wait 会继续使用同一个链接。

如果你确实想要阻塞式交互会话,普通的 bee login 会打印相同的链接,然后自动轮询,直到获得批准;等待期间请勿中断。无论采用哪种方式,请求都会在约 5 分钟后过期;获批后,CLI 会打印一条包含用户姓名的成功消息。

登录标志:--no-wait(打印链接并退出)、--token <token>、--token-stdin、--proxy <url|socket>(最后三项互斥;--no-wait 仅适用于交互流程)。

查看已通过身份验证的个人资料:bee me [--json]。退出登录:bee logout。

实时上下文(优先使用!)

始终从 bee now 开始。 它会获取过去 10 小时内的所有对话及其完整话语内容——这是获取及时、相关帮助最有价值的单一上下文。

bee now          # markdown
bee now --json   # programmatic

返回过去 10 小时内的对话原文(谁说了什么)、摘要、状态和时间戳,时间采用所有者所在时区。

当所有者刚结束一段对话并需要后续帮助、询问刚才讨论过的内容,或你需要当前上下文来提供建议时,请使用它。

今天
bee today              # Today Brief: calendar / email-style daily brief
bee today --context    # Wearable context: daily summary + active todos + notes + recent conversations
bee today --json

查看当天计划时使用普通的 bee today;如果想要助手用于了解当天情况的同类汇总可穿戴设备上下文,则使用 --context。

最近活动
bee activity [--limit N]   # --limit max 20

统一展示近期对话、摘要、笔记、待办事项和洞察。适合快速了解“我最近都做了些什么”。

搜索——优先于手动浏览

bee search 在服务端运行,是查询主题或回忆内容的合适工具。能搜索时,不要列出每段对话并自行阅读。

bee search --query "marathon training" [--limit N] [--since <epochMs>] [--until <epochMs>] [--json]

两种模式:

  • 关键词(默认): 对话、每日摘要和事实的 BM25 搜索。
    • --filter conversations|daily|facts|all(默认值为 all)——指定搜索范围。
    • --scope conversations|all——映射到 --filter 的别名。
    • --sort relevance|mostRecent(默认值为 relevance);--sortBy 是可用的别名。
  • 语义/神经网络(--neural): 仅对话的向量搜索。此模式不接受仅限关键词的标志(--filter/--scope/--sort/--sortBy)。用于模糊或概念性回忆(“查找我谈到感到精疲力竭的那次”)。

--since 和 --until(纪元毫秒)可按时间限制结果,且适用于两种模式。

bee search --query "project atlas deadline" --filter conversations --sort mostRecent
bee search --query "how I felt about the move" --neural --limit 10
bee search --query "dentist" --filter facts

注意:搜索不支持 --cursor,使用时会报错;请改用 --since/--until 按时间分页。此处无法搜索待办事项和洞察——请使用 bee todos list 和 bee insights list。

事实——了解所有者

事实是 Bee 从对话中了解到的有关所有者的信息,是了解其身份的主要方式。

已确认与未确认:

  • 已确认的事实已由所有者验证或明确陈述。请信任这些事实。
  • 未确认的事实是根据上下文推断得出的,可能存在误解。仅将其用于提供上下文或推测;据此采取行动时,请说明其中的不确定性。

优先使用已确认的事实。只列出未确认的事实时,使用 --unconfirmed。

bee facts list [--limit N] [--cursor <cursor>] [--unconfirmed] [--json]
bee facts get <id> [--json]
bee facts search --query "allergies" [--limit N] [--json]
bee facts create --text "I prefer morning meetings" [--json]
bee facts update <id> --text "Updated text" [--confirmed <true|false>] [--json]
bee facts delete <id> [--json]

facts update 需要 --text;同时传入 --confirmed true 或 --confirmed false 可更改确认状态。查找特定内容时,请使用 bee facts search,而不是翻阅 facts list。

对话 - 访问转录

对话是录制的环境音频记录。

bee conversations list [--limit N] [--cursor <cursor>] [--json]
bee conversations get <id> [--json]
bee conversations transcript <id> [--json]
bee conversations related <id> [--limit N] [--json]   # --limit max 10
  • list 仅返回摘要——浏览以查找相关对话。响应中包含用于翻页的 next_cursor。
  • get 返回完整对话:话语(逐字记录,附带说话者和时间戳)、状态和元数据。
  • transcript 仅返回某个对话中逐字记录的话语转录。
  • related 查找与指定对话相似的对话——适合汇总围绕某个话题的所有讨论。

为确保准确,请读取 get/transcript 返回的话语。list 中的摘要仅供浏览。

搜索话题时,优先使用 bee search,而不是手动列出所有内容。

每日摘要

bee daily list [--limit N] [--cursor <cursor>] [--json]   # browse day-by-day
bee daily get <id> [--json]
bee daily find <YYYY-MM-DD> [--json]                      # look up a specific date

没有单独的 bee daily 命令,也没有 --date 标记。若要获取指定日期的内容,请使用 bee daily find 2026-06-01。

日志 - 语音备忘录

日志是所有者主动录制的语音备忘录(与环境对话不同)。也称为语音笔记。

bee journals list [--limit N] [--cursor <cursor>] [--json]
bee journals search --query "ideas for the talk" [--limit N] [--json]
bee journals get <id> [--json]

list 返回包含 ID、状态(PREPARING = 正在录制,ANALYZING = 正在处理,READY = 已完成)、转录文本和时间戳的条目。get 返回完整的转录文本。使用 journals search 可按内容查找备忘录。

洞察

由 AI 生成的关于所有者的规律和观察结果。

bee insights list [--limit N] [--json]   # --limit max 50
bee insights get <id> [--json]

当用户想了解更高层次的规律,而不是原始对话时使用。

位置

所有者去过的地方。

bee locations recent [--from <date>] [--to <date>] [--limit N] [--json]   # --limit max 100
bee locations clusters [--limit N] [--min-visits N] [--visits] [--json]   # frequent places; --limit max 20
bee locations current [--json]                                            # latest known location

--from/--to 接受 YYYY-MM-DD 或 ISO 时间戳(所有者的时区)。clusters 会对常去地点分组;--min-visits N 按访问次数筛选,--visits 则包含每次访问的详细信息。适用于“我在……那天去了哪里”“我常去哪些地方”“我现在在哪里”等问题。

照片

设备拍摄的照片。

bee photos list [--daily-id N] [--date YYYY-MM-DD] [--limit N] [--json]   # --limit max 20
bee photos get <id> [--output PATH] [--json]

可按每日摘要 ID 或日期对 list 的范围进行限定。get 会获取单张照片;传入 --output PATH 可将其保存到磁盘。

待办事项 - 跟踪承诺

行动事项和承诺,包括 Bee 根据对话建议的事项。

bee todos list [--limit N] [--cursor <cursor>] [--json]
bee todos get <id> [--json]
bee todos create --text "Buy groceries" [--alarm-at <iso>] [--json]
bee todos update <id> [--text "Updated"] [--completed <true|false>] [--alarm-at <iso> | --clear-alarm] [--json]
bee todos complete <id> [--json]
bee todos delete <id> [--json]
  • --completed 需要一个值:--completed true 或 --completed false。若只需标记为已完成,请使用专用命令 bee todos complete <id>。
  • 使用 update 时,通过 --alarm-at <iso> 设置提醒,或通过 --clear-alarm 移除提醒(两者不能同时使用)。

建议工作流 - Bee 会根据对话提出待办事项;请先审核,再采取行动:

bee todos suggestions [--limit N] [--json]      # --limit max 50; list proposed todos
bee todos accept-suggestion <id> [--json]       # promote a suggestion to a real todo
bee todos dismiss-suggestion <id> [--json]      # reject a suggestion

监控变更 - bee changed 与 bee sync

保持最新状态有两种方式。根据你是想了解发生了哪些变更,还是想拥有完整的本地副本来选择。

bee changed - 增量变更流(了解最新变更)

适合定期检查:它会准确告知发生了哪些变更,并提供用于继续检查的游标。未提供游标时,默认涵盖最近约 24 小时的内容。

bee changed [--cursor <cursor>] [--json]

返回涵盖的时间范围、Next Cursor: 行(以及 JSON 中的 next_cursor),以及发生变更的事实、待办事项、每日摘要、对话和日志(新增和已更新)。

游标处理 - 只有在完成处理批次后才保存游标,这样即使失败,也能重试同一批变更(确保恰好处理一次):

  1. 从 .bee-cursor 读取已存储的游标(如果文件存在)。(.bee-cursor 是此技能使用的约定,不是 CLI 功能。)
  2. 运行 bee changed --cursor <cursor>(首次运行时省略 --cursor)。
  3. 记下 Next Cursor: 的值,但暂时不要保存。
  4. 处理所有返回的变更(更新笔记、处理待办事项等)。
  5. 只有成功后,才保存新游标:echo "<value>" > .bee-cursor。
  6. 重复以上步骤。
bee sync - 导出为本地 Markdown(备份副本)

将 Bee 数据导出为 Markdown 文件,用于离线备份、全文搜索或提供给其他工具。

bee sync [--output <dir>] [--recent-days N] [--full] [--since <epochMs>] [--only <facts|todos|daily|conversations>]
  • 默认增量同步。 再次运行时,只会重新获取有更改的每日摘要和对话,并使用存储在输出目录中的 .bee-sync.json 清单(事实和待办事项始终会完整重新获取)。首次运行会执行完整同步。
  • --output <dir> - 输出目录(默认值为 bee-sync)。
  • --full - 强制执行完整重新同步,忽略清单。
  • --since <epochMs> - 用于高级操作或恢复的选项,可覆盖已保存的增量游标。
  • --recent-days N - 将每日摘要和对话限制为最近 N 天。仅适用于完整同步(首次运行或使用 --full);增量同步时会忽略此选项。
  • --only <list> - 仅同步部分类型:facts、todos、daily、conversations(以逗号分隔)。

注意: 同步不会协调删除操作(本地不会清理已移除的项目)。如果你需要准确了解更改内容,而不是维护镜像,请使用 bee changed。

常见工作流

快速了解用户背景

按以下顺序运行:

bee now            # last 10h with full utterances - most important
bee facts list     # who the owner is: preferences, relationships, work
bee today --context  # today's aggregated wearable context

bee now 可让帮助内容更贴合当前情况;事实和今天的上下文则有助于全面了解情况。

查找过去对话中的内容

优先使用搜索,而不是手动浏览:

bee search --query "the topic or person" --filter conversations --sort mostRecent
bee conversations get <id>     # read verbatim utterances for the best hit

如果记忆比较模糊或涉及概念性内容,请使用 --neural。使用 bee conversations related <id> 收集线程的其余内容。

我之前做到哪了 / 接下来该做什么
bee locations current
bee locations recent --from 2026-06-01 --to 2026-06-06
bee locations clusters --min-visits 5 --visits
导出所有数据作为 AI 上下文
bee sync --output ./my-bee-data

此命令会为事实、待办事项、每日摘要和对话记录创建 Markdown 文件;再次运行即可增量更新。

深入了解用户

如需通过处理用户的完整对话历史来全面了解用户,请使用此多 Agent 工作流。该工作流通过一系列子 Agent 分批处理对话,并通过文件传递状态以保留上下文。

每个子 Agent 都会获取一批对话、读取当前的 user.md、提取见解、更新 user.md、编写交接摘要,并启动下一个子 Agent 来处理更早的对话。

提示:对于有针对性的问题,使用 bee search 通常比完整的深度学习流程更快。只有在确实需要了解完整历史记录时,才使用深度学习。

文件结构

在工作目录中:

  • user.md - 用户的累积档案(持久保存,每批处理后更新)。
  • bee-learning-summary.md - 交接文件:最新摘要以及下一批处理要用的 next_cursor。
  • bee-learning-progress.md - 进度日志,记录已处理的内容及处理时间。
步骤 1:初始化(主 Agent)

如果 user.md 不存在,则创建该文件:

# User Profile

Learned information about the owner from their Bee conversations.

## Basic Information
## Relationships
## Work & Projects
## Interests & Hobbies
## Preferences
## Important Dates & Events
## Notes
步骤 2:启动第一个处理子 Agent

使用以下任务启动一个子 Agent:

Process Bee conversations to learn about the owner.

1. Fetch the 100 most recent conversations (use --json to parse reliably):
   bee conversations list --limit 100 --json

2. Read the current user.md file.

3. For each conversation, extract: who the owner talked to (relationships),
   topics (interests, work), personal details (preferences, facts),
   commitments made, and important dates/events.

4. Update user.md, merging (do not overwrite) and adding timestamps.

5. Write bee-learning-summary.md with: date range processed, key insights,
   the next_cursor value from the API response, and running count.

6. Update bee-learning-progress.md.

7. If next_cursor is non-null, spawn the next subagent to continue with
   older conversations. Pass only file paths, not content.
步骤 3:依次启动后续处理子 Agent

每个后续子 Agent:

Continue processing Bee conversations to learn about the owner.

1. Read bee-learning-summary.md to get the next_cursor for the next batch.

2. Fetch the next 100 conversations:
   bee conversations list --limit 100 --cursor <next_cursor_from_summary> --json

3. Read user.md.

4. Extract insights as before.

5. Update user.md (merge, do not overwrite).

6. Update bee-learning-summary.md with: new date range, new insights,
   the new next_cursor (or "complete" if null), updated total count.

7. Update bee-learning-progress.md.

8. If next_cursor is non-null, spawn the next subagent. If null (end reached),
   write the final summary and report completion.
步骤 4:报告进度

大约每处理完一周的对话,就向主对话报告已了解的内容、值得注意的事件以及重要的档案变更。这样可以让用户及时了解进展,同时避免提供过多细节。

对话列表 API
bee conversations list --limit 100 --json
bee conversations list --limit 100 --cursor <next_cursor> --json

响应中包含 conversations 数组和 next_cursor 字段(没有更多数据时为 null)。将上一次的 next_cursor 通过 --cursor 传回,即可获取下一页。

最佳实践
  1. 基于文件交接 - 通过文件在子 Agent 之间传递状态,不要将大量文本复制到提示词中。
  2. 增量合并 - 每个子 Agent 都应使用清晰的标题和时间戳将内容合并到 user.md 中;不要替换整个文件。
  3. 跟踪进度 - 保留 bee-learning-progress.md,以便在中断后继续处理。
  4. 定期总结 - 有意义地汇报进展(例如每处理完一周),而不是每批都汇报。
  5. 妥善完成 - 当 next_cursor 为 null 时,撰写最终摘要并通知用户。
  6. 错误处理 - 如果失败,下次尝试时应读取进度文件并从中断处继续。
何时使用深度学习

适用于:初次与新用户建立关系时;用户要求全面分析历史记录时;为长期助手关系构建上下文时;用户想了解自己对话中的规律时。

请勿用于:快速询问近期事件(使用 bee now、bee daily find 或 bee activity);查找具体事实(使用 bee facts list / bee facts search);查找特定对话(使用 bee search)。

MCP 服务

bee CLI 也是一个 MCP 服务,因此可以将 Bee 工具直接提供给支持 MCP 的客户端。

bee mcp serve                              # stdio JSON-RPC server
bee mcp serve-http --token <value> [--port N]   # HTTP server; token >= 32 chars (or env BEE_MCP_HTTP_TOKEN)
bee mcp connect <claude|claude-code|codex>       # register Bee with a client
bee mcp disconnect <claude|claude-code|codex>
bee mcp status

实用命令

bee me [--json]            # authenticated profile
bee status                 # auth status
bee version [--json]
bee ping [--count N]       # connectivity check
bee stream [--types <list>] [--json] [--agent] [--webhook-endpoint <url> --webhook-body <template>]
bee proxy [--port N] [--socket [path]] [--idle-timeout SECONDS]

评论

支持 Markdown