Engram

io.github.NickCirv由 GitHub 账号 NickCirv 发布v4.5.0更新于 Oct 24, 2026

Ranked local code-graph context for AI coding agents. Intercepts reads + greps. Apache-2.0.

发布方自己的服务:Engram

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

Engram 为项目建立本地结构化代码图,让 AI 编程助手按需检索相关代码上下文,而不必通读整个文件。

可以做什么
Engram 将源码实体、Git 关系和选定的项目记忆索引到项目本地的 SQLite 图中,查询时返回匹配的实体和估算的 token 数量。其命令行提供探索结构(query、path、gods、callers、callees、impact、stats)、维护上下文(init、watch、reindex、learn、mistakes)、生成助手文档,以及通过 MCP 或本地面板提供上下文等命令。它还提供可拦截读取与 grep 的钩子集成,以及可警告或拒绝的失误防护。
适用场景
当助手需要在大型代码库中先定位相关代码及其关系、再打开完整文件,或需要把已记录的失误带入后续会话时,适合安装。建议先使用代码图并检查其输出,再决定是否启用钩子或其他集成。
运行要求
以本地 Node.js 进程运行(包名 engramx,需 Node >= 20),通过 stdio 通信。索引会在项目内写入 .engram/ 图。可选环境变量包括 ENGRAM_ANTHROPIC_MEMORY_PATH、ENGRAM_MCP_CONFIG_PATH、ENGRAM_MISTAKE_GUARD、ENGRAM_NO_UPDATE_CHECK,以及本地 HTTP 服务器所需的密钥 ENGRAM_API_TOKEN。MCP 服务器本身未声明需要账号或认证。
安装前请注意
整个系统不保证完全不联网:更新检查、外部 Context7 包装器以及已配置的 MCP 或插件提供方都可能运行自己的进程并访问网络。HTTP 服务器绑定 127.0.0.1,并要求从 ENGRAM_API_TOKEN 或本地令牌文件解析的 bearer 令牌,请对该令牌保密。生成器、钩子安装器、缓存与数据库命令以及插件安装都可能修改本地状态;默认的 init 会安装 Sentinel 钩子,除非使用 --no-hook。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Engram,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Engram — Nicholas Ashkar repository collection]

Engram

A local structural code graph and context toolkit for AI coding agents. Engram indexes source entities, Git relationships and selected project memory, then exposes focused context through a CLI, agent hooks, MCP and an authenticated local dashboard.

Use it to find relevant code before reading full files, inspect relationships and carry recorded mistakes into a later session. Read the source returned by a query before making a behavioral claim: graph retrieval is an aid to investigation.

Quickstart

The inspected package is engramx 4.5.0 and requires Node >=20. This source-build example is source-inspected, not executed; it does not assume a currently published package or extension version.

bash
git clone https://github.com/NickCirv/engram.gitcd engramgit checkout 9fa2a4b74ca8e66560d74d1255c16c43157d32bdnpm install --ignore-scriptsnpm run buildexport ENGRAM_NO_UPDATE_CHECK=1node dist/cli.js init ../your-project --no-hooknode dist/cli.js query "authentication" --project ../your-project --budget 2000node dist/cli.js stats --project ../your-project

Replace ../your-project with a codebase you can inspect. Indexing writes the project's .engram/ graph. The --no-hook flag matters: the default CLI init also installs a Sentinel hook. Start with the graph, examine the output, then decide which integration to enable. The build includes grammar bundling; inspect package scripts and dependencies before installation.

The query returns matching graph entities and an estimated token count, or a no-matching-nodes message. Counts depend on the indexed project; no benchmark output is fabricated here.

What is implemented

WorkflowSource-backed entry points
Explore structurequery, path, gods, callers, callees, impact, stats
Maintain contextinit, watch, reindex, learn, mistakes
Generate agent documentsgen, gen-mdc, gen-aider, gen-windsurfrules, gen-ccs
Inspect hook integrationinstall-hook --dry-run, hook-preview, hook-stats, hook-disable, hook-enable
Serve contextserver, ui, engram-serve MCP executable
Review measurementsmeasure, bench, cost, package benchmark scripts
Maintain installationdoctor, setup --dry-run, update --check, database/cache/plugin commands

These entry points are declared in the pinned CLI. Consult each command's help before a write operation. Generators, hook installers, cache/database commands and plugin installation can modify local state.

Architecture

Source miners extract entities, references, Git co-change and selected mistake/session information. The graph store persists project-local SQLite using sql.js. Queries traverse the graph and render bounded context. The provider resolver combines built-in sources and optional plugins/MCP providers; integrations can add external processes and network access.

The architecture and integration guide maps these paths, documents HTTP authentication and gives a local MCP configuration. Existing design records, release notes, integration documents and the ECP draft remain linked in the documentation inventory. They retain historical context and are not all certified against this revision.

Privacy and operational boundaries

The core graph is local, but the entire system is not guaranteed to be network-free. The CLI has npm update checks, Context7 can call an external wrapper, and configured MCP/plugin providers can execute their own processes. ENGRAM_NO_UPDATE_CHECK=1 disables the update-check path; it does not disable every optional integration. Review configured providers and the agent that receives graph output.

The HTTP server binds to 127.0.0.1, validates Host/Origin and requires a bearer token or dashboard cookie for protected routes. It resolves a token from ENGRAM_API_TOKEN or a local token file. Keep that token private and retain the existing security policy.

Limits and measurement

Structural context size, estimated token reductions, session replay and actual provider billing answer different questions. A smaller packet does not by itself demonstrate equal answer quality or a lower bill. Reproduce the included benchmarks on your own representative workload and track correctness alongside cost. This documentation review did not run a build, test suite, benchmark or agent session.

Development

bash
npm run buildnpm run lintnpm test -- --run

The repository contains unit and integration test sources for graph storage, providers, hooks, HTTP security and other modules. Their presence is evidence of test coverage intent; results at this revision remain unverified here. See the preserved contribution guide before changing behavior.

License and author

Apache-2.0 license. The ECP specification carries its own attribution and licensing in its source document; this rewrite does not alter either.

Nicholas Ashkar · Applied AI, systems and consulting.

User guides

User manual covers setup, skills, troubleshooting and removal. Sentinel explains current hook behavior and guard modes. Tool authors can use the integration guide.

来源:README.md,提交 df445d3

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v4.5.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Engram 集成