{"_id":"@elea.health/lat.md","_rev":"8-9674023d69da8d14021f9123ad6c29c9","name":"@elea.health/lat.md","dist-tags":{"latest":"0.11.3"},"versions":{"0.11.0":{"name":"@elea.health/lat.md","version":"0.11.0","keywords":["markdown","knowledge-graph","documentation","agents","cli","wiki-links","codebase"],"author":{"name":"Yury Selivanov"},"license":"MIT","_id":"@elea.health/lat.md@0.11.0","maintainers":[{"name":"jkoenig134","email":"j.koenig97@web.de"}],"homepage":"https://github.com/elea.health/lat.md","bugs":{"url":"https://github.com/elea.health/lat.md/issues"},"bin":{"lat":"dist/src/cli/index.js"},"dist":{"shasum":"0bdc1b634093470cb4b943f3528b916b34da21f4","tarball":"https://registry.npmjs.org/@elea.health/lat.md/-/lat.md-0.11.0.tgz","fileCount":83,"integrity":"sha512-bm8w29Qv9hFXV1PzILSHr1mmn0INPeN4NJ/Cm7H7k7mRuG8eeLmRaw99X6nzk6sM9SYnGHdVhFOy98ayMI810g==","signatures":[{"sig":"MEYCIQDgWNBt2zcZTN4q2a1JuJexjNlUrePw0ACqJQwQDXHVpgIhAJquHNy/Yfni5ql49GSQ6b8WNW8S4hjGNE/wj+kTk7x8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":301173},"type":"module","gitHead":"0ee867dab20d35656c3890c9dbf1fe245fcf8642","scripts":{"test":"vitest run","build":"tsc","format":"prettier --write 'src/**/*.ts'","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts'","cook-test-rag":"tsx scripts/cook-test-rag.ts"},"_npmUser":{"name":"jkoenig134","email":"j.koenig97@web.de"},"repository":{"url":"git+https://github.com/elea.health/lat.md.git","type":"git"},"_npmVersion":"11.12.1","description":"A knowledge graph for your codebase, written in markdown","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^4.3.6","unified":"^11.0.0","commander":"^14.0.3","@folder/xdg":"^4.0.1","ignore-walk":"^8.0.0","remark-parse":"^11.0.0","@libsql/client":"^0.17.0","web-tree-sitter":"^0.26.6","remark-stringify":"^11.0.0","unist-util-visit":"^5.0.0","remark-frontmatter":"^5.0.0","mdast-util-to-markdown":"^2.1.0","@modelcontextprotocol/sdk":"^1.27.1","@repomix/tree-sitter-wasms":"^0.1.16"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.2","devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","prettier":"^3.8.1","typescript":"^5.7.0","@types/node":"^25.3.0","@types/mdast":"^4.0.4","micromark-util-types":"^2.0.2","mdast-util-from-markdown":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/lat.md_0.11.0_1776324140824_0.5240982920686106","host":"s3://npm-registry-packages-npm-production"}},"0.11.1":{"name":"@elea.health/lat.md","version":"0.11.1","keywords":["markdown","knowledge-graph","documentation","agents","cli","wiki-links","codebase"],"author":{"name":"Yury Selivanov"},"license":"MIT","_id":"@elea.health/lat.md@0.11.1","maintainers":[{"name":"jkoenig134","email":"j.koenig97@web.de"}],"homepage":"https://github.com/elea-ai/lat.md","bugs":{"url":"https://github.com/elea-ai/lat.md/issues"},"bin":{"lat":"dist/src/cli/index.js"},"dist":{"shasum":"66a2dcdcbf6d614ea63a20f81950a0f7d61bcb0c","tarball":"https://registry.npmjs.org/@elea.health/lat.md/-/lat.md-0.11.1.tgz","fileCount":83,"integrity":"sha512-FaxZx2E6l5CZYktH2Nz/gEep1Zqu4LU9si3KYdbGO7Bpjnmznf79R2F7AkyatyMqyxG1uNSIv1h+73i/wL1oGA==","signatures":[{"sig":"MEUCIQCh9UlBl9fjv2HIoxQCYgs8ce5Xnu9t2HQ3Sj69m/mWOgIgNi0iYJnWxNDZq80p0r74C5t6kdfv1GHErFwp2UC1vKI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":302487},"type":"module","gitHead":"0916582c73550ec1e26b2ddb4f31ce9078479758","scripts":{"test":"vitest run","build":"tsc","format":"prettier --write 'src/**/*.ts'","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts'","cook-test-rag":"tsx scripts/cook-test-rag.ts"},"_npmUser":{"name":"jkoenig134","email":"j.koenig97@web.de"},"repository":{"url":"git+https://github.com/elea-ai/lat.md.git","type":"git"},"_npmVersion":"11.12.1","description":"A knowledge graph for your codebase, written in markdown","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^4.3.6","unified":"^11.0.0","commander":"^14.0.3","@folder/xdg":"^4.0.1","ignore-walk":"^8.0.0","remark-parse":"^11.0.0","@libsql/client":"^0.17.0","web-tree-sitter":"^0.26.6","remark-stringify":"^11.0.0","unist-util-visit":"^5.0.0","remark-frontmatter":"^5.0.0","mdast-util-to-markdown":"^2.1.0","@modelcontextprotocol/sdk":"^1.27.1","@repomix/tree-sitter-wasms":"^0.1.16"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.2","devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","prettier":"^3.8.1","typescript":"^5.7.0","@types/node":"^25.3.0","@types/mdast":"^4.0.4","micromark-util-types":"^2.0.2","mdast-util-from-markdown":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/lat.md_0.11.1_1776329087301_0.15754698710620896","host":"s3://npm-registry-packages-npm-production"}},"0.11.2":{"name":"@elea.health/lat.md","version":"0.11.2","keywords":["markdown","knowledge-graph","documentation","agents","cli","wiki-links","codebase"],"author":{"name":"Yury Selivanov"},"license":"MIT","_id":"@elea.health/lat.md@0.11.2","maintainers":[{"name":"jkoenig134","email":"j.koenig97@web.de"}],"homepage":"https://github.com/elea-ai/lat.md","bugs":{"url":"https://github.com/elea-ai/lat.md/issues"},"bin":{"lat":"dist/src/cli/index.js"},"dist":{"shasum":"2cbbe57f1a94ecaf0fceca78bdb7fee97ae6018c","tarball":"https://registry.npmjs.org/@elea.health/lat.md/-/lat.md-0.11.2.tgz","fileCount":83,"integrity":"sha512-tGcBWfdBHfTPfXrpFj62aHWDN8UMGg3711JNSD9TuPO3M2o2olSoUC6tLlW0me3ewFrwVAeYuVVec7fOWyAhiQ==","signatures":[{"sig":"MEQCIBBmT4DA+S3CxN+IynAHUIE7zlrIIiMyjK1dhxZHMJFMAiAYbr2kaNI+++ZzAJehxb00PF1EbIJILPOai3bq4xqyGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":302500},"type":"module","gitHead":"a09e28a0f940a1e00486f2e9dcbc86c63f227e94","scripts":{"test":"vitest run","build":"tsc","format":"prettier --write 'src/**/*.ts'","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts'","cook-test-rag":"tsx scripts/cook-test-rag.ts"},"_npmUser":{"name":"jkoenig134","email":"j.koenig97@web.de"},"repository":{"url":"git+https://github.com/elea-ai/lat.md.git","type":"git"},"_npmVersion":"11.12.1","description":"A knowledge graph for your codebase, written in markdown","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^4.3.6","unified":"^11.0.0","commander":"^14.0.3","@folder/xdg":"^4.0.1","ignore-walk":"^8.0.0","remark-parse":"^11.0.0","@libsql/client":"^0.17.0","web-tree-sitter":"^0.26.6","remark-stringify":"^11.0.0","unist-util-visit":"^5.0.0","remark-frontmatter":"^5.0.0","mdast-util-to-markdown":"^2.1.0","@modelcontextprotocol/sdk":"^1.27.1","@repomix/tree-sitter-wasms":"^0.1.16"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.2","devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","prettier":"^3.8.1","typescript":"^5.7.0","@types/node":"^25.3.0","@types/mdast":"^4.0.4","micromark-util-types":"^2.0.2","mdast-util-from-markdown":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/lat.md_0.11.2_1776699466358_0.02162546129025067","host":"s3://npm-registry-packages-npm-production"}},"0.11.3":{"name":"@elea.health/lat.md","version":"0.11.3","keywords":["markdown","knowledge-graph","documentation","agents","cli","wiki-links","codebase"],"author":{"name":"Yury Selivanov"},"license":"MIT","_id":"@elea.health/lat.md@0.11.3","maintainers":[{"name":"jkoenig134","email":"j.koenig97@web.de"}],"homepage":"https://github.com/elea-ai/lat.md","bugs":{"url":"https://github.com/elea-ai/lat.md/issues"},"bin":{"lat":"dist/src/cli/index.js"},"dist":{"shasum":"a8cab9ba442e2e3d6e284e7aa6426ecfc4c5ff50","tarball":"https://registry.npmjs.org/@elea.health/lat.md/-/lat.md-0.11.3.tgz","fileCount":83,"integrity":"sha512-5Qp87sA3VhFLsAIV7M8LiN2YPVkMNiuo22Rdx81PUjkyXaHCuiq1F7UuG0zY0QnDoREQtyu4pwtC/cS4GQTt7w==","signatures":[{"sig":"MEYCIQDpaNnbGpUWIgRIL0jgcVaXgqvLZXvpHDXKuH3eT+ERmgIhAMORCnYYMZcVdV5v3K8KNgJVbBSDJfHFq9VxvmyuuTyx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":301178},"type":"module","gitHead":"8bbb0891c8e564774f4c32a29289e35f45ab1f0d","scripts":{"test":"vitest run","build":"tsc","format":"prettier --write 'src/**/*.ts'","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts'","cook-test-rag":"tsx scripts/cook-test-rag.ts"},"_npmUser":{"name":"jkoenig134","email":"j.koenig97@web.de"},"repository":{"url":"git+https://github.com/elea-ai/lat.md.git","type":"git"},"_npmVersion":"11.12.1","description":"A knowledge graph for your codebase, written in markdown","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"^4.3.6","unified":"^11.0.0","commander":"^14.0.3","@folder/xdg":"^4.0.1","ignore-walk":"^8.0.0","remark-parse":"^11.0.0","@libsql/client":"^0.17.0","web-tree-sitter":"^0.26.6","remark-stringify":"^11.0.0","unist-util-visit":"^5.0.0","remark-frontmatter":"^5.0.0","mdast-util-to-markdown":"^2.1.0","@modelcontextprotocol/sdk":"^1.27.1","@repomix/tree-sitter-wasms":"^0.1.17"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.30.2","devDependencies":{"tsx":"^4.21.0","vitest":"^3.0.0","prettier":"^3.8.1","typescript":"^5.7.0","@types/node":"^25.3.0","@types/mdast":"^4.0.4","micromark-util-types":"^2.0.2","mdast-util-from-markdown":"^2.0.3"},"_npmOperationalInternal":{"tmp":"tmp/lat.md_0.11.3_1776842623395_0.310888576809075","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-04-16T07:22:20.756Z","modified":"2026-09-25T09:03:19.043Z","0.11.0":"2026-04-16T07:22:20.974Z","0.11.1":"2026-04-16T08:44:47.433Z","0.11.2":"2026-04-20T15:37:46.489Z","0.11.3":"2026-04-22T07:23:43.547Z"},"bugs":{"url":"https://github.com/elea-ai/lat.md/issues"},"author":{"name":"Yury Selivanov"},"license":"MIT","homepage":"https://github.com/elea-ai/lat.md","keywords":["markdown","knowledge-graph","documentation","agents","cli","wiki-links","codebase"],"repository":{"url":"git+https://github.com/elea-ai/lat.md.git","type":"git"},"description":"A knowledge graph for your codebase, written in markdown","maintainers":[{"email":"mathis.zeiher@gmail.com","name":"mzeiher"},{"email":"j.koenig97@web.de","name":"jkoenig134"}],"readme":"<p align=\"center\">\n  <img src=\"templates/logo-dark.svg\" alt=\"lat.md\" width=\"500\">\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/1st1/lat.md/actions/workflows/ci.yml\"><img src=\"https://github.com/1st1/lat.md/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"https://www.npmjs.com/package/lat.md\"><img src=\"https://img.shields.io/npm/v/lat.md\" alt=\"npm\"></a>\n</p>\n\n<p align=\"center\">A knowledge graph for your codebase, written in markdown.</p>\n\n## The problem\n\n`AGENTS.md` doesn't scale. A single flat file can describe a small project, but as a codebase grows, maintaining one monolithic document becomes impractical. Key design decisions get buried, business logic goes undocumented, and agents hallucinate context they should be able to look up.\n\n## The idea\n\nCompress the knowledge about your program domain into a **graph** — a set of interconnected markdown files that live in a `lat.md/` directory at the root of your project. Sections link to each other with `[[wiki links]]`, markdown files link into the codebase (`[[src/auth.ts#validateToken]]`), source files link back with `// @lat: [[section-id]]` comments, and `lat check` ensures nothing drifts out of sync.\n\n- **Faster coding for agents** — instead of grepping through your codebase, agents search the knowledge graph to discover key design decisions, constraints, and domain context fast and consistently.\n\n- **Faster workflow for humans** — your agents maintain lat files for you. When you review a diff, start with the semantic changes in `lat.md/` to understand *what* changed and *why*. Reviewing code becomes the secondary task.\n\n- **Knowledge retention** — the context and reasoning behind your prompts is usually lost after a session ends. With lat, agents capture that knowledge into the graph as they work, so future sessions start with full context instead of rediscovering it from scratch.\n\n- **Test specs with enforcement** — test cases can be described as sections in `lat.md/` and marked with `require-code-mention: true`. Each spec then must be referenced by a `// @lat:` comment in test code. `lat check` flags any spec without a backlink, so you can review and maintain test coverage from the knowledge graph.\n\nThe `lat` CLI gives agents and humans a system to navigate and maintain the graph:\n\n- **`lat init`** — sets up popular coding agents with hooks and instructions to keep lat updated and correct\n- **`lat check`** — enforces referential consistency; agents call it automatically before finishing work\n- **`lat search`** and **`lat section`** — agents use these to understand your prompts and navigate the graph instead of endless `grep` calls\n\n`lat` is a workflow that comes with tools — build pre-commit hooks and GitHub bots, run CI tasks that improve the knowledge graph in the background.\n\n## Install\n\n```bash\nnpm install -g @elea.health/lat.md\n```\n\nThen run `lat init` in the repo you want to use lat in.\n\n## How it works\n\nRun `lat init` to scaffold a `lat.md/` directory, then write markdown files describing your architecture, business logic, test specs — whatever matters. Link between sections using `[[file#Section#Subsection]]` syntax. Link to source code symbols with `[[src/auth.ts#validateToken]]`. Annotate source code with `// @lat: [[section-id]]` (or `# @lat: [[section-id]]` in Python) comments to tie implementation back to concepts.\n\n```\nmy-project/\n├── lat.md/\n│   ├── architecture.md    # system design, key decisions\n│   ├── auth.md            # authentication & authorization logic\n│   └── tests.md           # test specs (require-code-mention: true)\n├── src/\n│   ├── auth.ts            # // @lat: [[auth#OAuth Flow]]\n│   └── server.ts          # // @lat: [[architecture#Request Pipeline]]\n└── ...\n```\n\n## CLI\n\n```bash\nlat init                        # scaffold a lat.md/ directory\nlat check                       # validate all wiki links and code refs\nlat locate \"OAuth Flow\"         # find sections by name (exact, fuzzy)\nlat section \"auth#OAuth Flow\"   # show a section with its links and refs\nlat refs \"auth#OAuth Flow\"      # find what references a section\nlat search \"how do we auth?\"    # semantic search via embeddings\nlat expand \"fix [[OAuth Flow]]\" # expand [[refs]] in a prompt for agents\nlat mcp                         # start MCP server for editor integration\n```\n\n## Configuration\n\nSemantic search (`lat search`) requires an OpenAI (`sk-...`) or Vercel AI Gateway (`vck_...`) API key. The key is resolved in order:\n\n1. `LAT_LLM_KEY` env var — direct value\n2. `LAT_LLM_KEY_FILE` env var — path to a file containing the key\n3. `LAT_LLM_KEY_HELPER` env var — shell command that prints the key (10s timeout)\n4. Config file — saved by `lat init`. Run `lat config` to see its location.\n\n## Development\n\nRequires Node.js 22+ and pnpm.\n\n```bash\npnpm install\npnpm build\npnpm test\n```\n","readmeFilename":"README.md"}