Skip to content
项目

关于

The one place for the skills, keys and memory of every agent you use. Formerly OMNI.

人工智能与机器学习

这些数字如何统计

可以做什么

  • Reads a file the agent already read: sends one line with a handle instead of the file again.
  • Runs a noisy build or test: keeps the result and the failures, drops the progress noise.
  • Prints a token or password in output it rewrites: replaces it with [REDACTED] before the model sees it.
  • Fails a command: passes it through as printed, so the real error reaches the agent. A credential printed by a failing command reaches the agent too.

实测星标增长

24小时
0
7天
-1
15天
+1
1个月
-1

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

i18n/README-zh.md

原文
Contexere 标志

Contexere

你的 AI 智能体,在任何环境中都一样:工作流程、工具和访问权限随之而来,密钥永远不会到达智能体。这是我们的方向。目前它压缩嘈杂的工具输出,折叠智能体已经读过的内容,并对它改写的输出中的凭据进行脱敏。什么都不会丢失。

🇺🇸 English | 🇯🇵 日本語 | 🇨🇳 简体中文 | 🇸🇦 العربية | 🇮🇩 Bahasa Indonesia | 🇻🇳 Tiếng Việt | 🇰🇷 한국어

CI Release License: Apache 2.0

Contexere 作为一层,把 Claude Code、Codex、Cursor、Gemini CLI、OpenClaw、Hermes、Pi 和 VS Code 编织在一起。Reduce 已提供,技能、密钥和记忆正在开发。

OMNI 现在叫 Contexere,拉丁语意为“编织在一起”,也是“context”的词根。0.9.0 移除了 omni 命令和其他旧名称;如果还有智能体调用 omni,为它运行 contexere init --<host>。你的数据会自动移到 ~/.contexere。

方向

目标是:把 Contexere 带到新的 VPS 或笔记本上,智能体一到就了解自己的工作流程,访问 MCP 服务器和 API 也照常可用。支撑这些访问的密钥从不展示给智能体,所以永远不会泄露。围绕它的,是只需配置一次就对所有智能体生效的技能,以及跨智能体、跨机器延续的记忆。这部分正在开发中。现在提供的是第一部分,也就是下文介绍的上下文与 token 层。

为什么需要它

编码智能体会读取命令打印的一切:进度条、层哈希、十分钟前刚读过的文件。每个字节都要计费,还会占用智能体做正事所需的空间。

Contexere 在模型读取之前,去掉模型不需要的内容。没有任何东西被删除:被去掉的内容仍保留在你的机器上,一条命令即可找回。

功能

  • 智能体读取已经读过的文件:只发送一行带句柄的内容,而不是再发一遍文件。
  • 运行嘈杂的构建或测试:保留结果和失败信息,丢掉进度噪音。
  • 在它改写的输出中出现 token 或密码:在模型看到之前替换为 [REDACTED]。
  • 命令失败:按原样透传,真正的错误会送达智能体。失败命令打印出的凭据也会原样送达智能体。
  • 读取 JSON、YAML 或 CSV:逐字节原样保留。
  • contexere doctor 会检查每个智能体的 Hook 是否触发并完成脱敏。

每条命令约增加 21 ms。节省多少取决于智能体做什么;运行 contexere stats 查看你自己的数字。方法和完整数据见基准测试页面。

安装

brew install fajarhide/tap/contexere
平台 命令
macOS, Linux, WSL curl -fsSL omni.weekndlabs.com/install | bash
Windows (PowerShell) irm omni.weekndlabs.com/install.ps1 | iex

0.9.0 不再安装 omni 命令。钩子仍调用它的智能体需要运行 contexere init --<host>。

在 Claude Code 中,先运行 /plugin marketplace add fajarhide/contexere,再运行 /plugin install contexere@omni,即可添加一个帮你安装和检查它的技能。

使用

contexere init      # 选择你的智能体:Claude Code、Codex、Cursor、VS Code 等
contexere doctor    # 检查是否已接好,或使用 `contexere doctor --fix`
contexere stats     # Contexere 在你自己的历史记录上节省了多少
contexere doctor: each agent's hooks are run with a canary credential to prove they fire and redact

运行 init 之后,Hook 会自动工作,不需要给命令加任何前缀。

支持的智能体

层级 智能体
Full (在模型读取之前重写工具输出) Claude Code, Codex CLI, Gemini CLI, OpenClaw, Hermes, Pi, Aider(通过 cmd | contexere)
Handoff-first (缩短智能体经由 contexere_run 执行的内容) Cursor, Windsurf
MCP-only (记忆与召回,外加 contexere_run) Cline, Roo, OpenCode, VS Code, Zed, Copilot, Antigravity

Codex 只运行它信任的 Hook:执行 contexere init --codex 之后,启动一次 codex 并批准它们 (#359).

文档

贡献

欢迎提交 Issue 和 Pull Request。请先阅读 CONTRIBUTING.md。

安全

请不要公开提交 Issue。请私下报告;详情见 SECURITY.md。

许可证

Apache License 2.0.

探索相关项目

加载中…