
Cortex
io.github.DanielBlomma由 GitHub 账号 DanielBlomma 发布v0.4.2更新于 Oct 24, 2026
Local repo context for coding assistants with semantic search and graph relationships.
概览
Cortex 在本地为代码仓库建立代码、符号与规则的索引,让编程助手获取带引用的上下文,而不必通读整个仓库。
- 可以做什么
- 对代码、规则和架构决策做语义搜索,并从结果出发追踪符号、调用方与依赖关系。在重构前评估改动影响范围,读取生效的仓库规则与弃用标记。查看某个文件或实体的约定配置与邻近实现模式。为具体任务获取带引用的编码前指导,并对照事实来源规则和本地模式审查当前 Git 差异。刷新索引,并查看索引状态、后台同步状态与安装诊断。
- 适用场景
- 适合编程助手在较大仓库中工作、容易靠猜测或读取大量无关文件的场景。用于回答前先检索、重构前先评估影响,以及在完成改动前审查差异。
- 运行要求
- 作为本地进程运行,通过 npm 全局安装。需要 Node.js 20.9 或更高版本以及 Git。初始化命令会索引仓库、修改 AGENTS.md、安装 Git 钩子并启动后台监视进程。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Cortex,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Cortex
Give AI coding agents the right context from your repository.
Cortex builds a local map of your code, symbols, relationships, and project rules. Coding agents query that map through the CLI instead of guessing or reading the whole repository.
Your code stays on your machine. MCP is not required.
Start
Requires Node.js 20.9+ and Git.
This indexes the repository, adds Cortex instructions to AGENTS.md, installs
Git hooks, and starts the background watcher.
Check the setup:
Use
Agents can run these commands directly. cortex init adds instructions that
tell them to search before answering and check impact before refactoring. They
do not need an MCP connection.
What Cortex adds
Without Cortex, an agent often searches by filename and reads many unrelated files. Cortex gives it structured repository context:
- semantic search across code, rules, and architecture decisions;
- symbol definitions and file relationships;
- caller and dependency traversal;
- impact analysis before refactoring;
- active rules, deprecations, and source-of-truth signals;
- deterministic, subsystem-scoped convention profiles with cited reusable symbols;
- incremental updates after Git and filesystem changes.
The pipeline is local and straightforward:
Commands you will use
Run cortex help for the complete command list.
cortex conventions uses only the local index. It returns bounded, live-backed
version-1 profiles and does not call a model, planner, provider, or network
service. See Repository convention profiles
for the exact eligibility, limit, hashing, persistence, and safety contract.
Before implementing a code task, use cortex guidance as cited additive
context—not policy authority. Continue to use normal search, related, and
impact when needed, and never skip explicit active rules or conflicts. The
command is local-only and inspection-only; see the exact versioned contract in
Pre-coding guidance.
After coding and before finalization, use cortex review --diff. It separates
exact source-of-truth violations from heuristic local-pattern warnings and is
inspection-only. See Deterministic diff review.
Keep the index fresh
Git hooks and the watcher normally update Cortex automatically.
Run cortex update manually after a large change or when results look stale.
Large repositories
Make lexical and graph search available first while semantic indexing continues in the background:
This mode supports macOS, Linux, and WSL. Native Windows should use normal foreground bootstrap.
Upgrade
Project configuration and rules are preserved. See CHANGELOG.md for version-specific notes.
Optional MCP compatibility
The normal Cortex workflow uses the CLI. If a client explicitly requires MCP,
run cortex connect.
DeepSeek Harness integration
Cortex supports DeepSeek Harness through the V1 explicit tools and skills
integration. Cortex 2.6.0 contains and validates the integration source against
the pinned Harness 0.1.1-rc.2 release. Separate npm bundle distribution is
deferred and currently unavailable.
The bundle provides four agent-scoped tools (cortex_search,
cortex_related, cortex_impact, and cortex_rules) and five Cortex behavior
skills (change-impact, context-review, pattern-review, repo-research,
and using-cortex). Retrieval is local, repository-scoped, explicit, and
user-controlled. The integration does not automatically initialize, update,
or watch a repository.
V2 proactive/assistive retrieval remains planned and experimental; it is not included in Cortex 2.6.0. See the V1-to-V2 integration plan for details.
Links
License
MIT
来源:README.md,提交 0e4ff52
工具
0版本历史
1- v0.4.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。