Graft Public API (src/index.ts)

Graft · src/index.ts · typescript · MIT
ai, dev-tools, integration, lang:typescript, tag:exports, tag:codebase-graph

Barrel export for Graft, a library that builds a linked markdown context graph from code and checks it for drift. Reuse as the entrypoint when integrating Graft into tooling.

// Source: https://github.com/trailhq/Graft | License: MIT | Copyright 2026 Context Graph Engine contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Graft — public API.
 *
 * The graph is a folder of linked markdown files (`.context/`) committed to the
 * repo. Build it from code, then check it stays in sync.
 *
 * @example
 * ```ts
 * import { Graft } from "@nanonets/graft";
 *
 * const engine = new Graft();
 * await engine.init(".");             // writes .context/*.md + manifest.json
 *
 * const result = engine.check(".");   // { ok: boolean, ...drift }
 * if (!result.ok) process.exitCode = 1;
 * ```
 */
export { Graft, CODE_EXTENSIONS } from "./engine.js";
export type { InitOptions, CheckRunOptions, BuildResult, BuildProgress, CheckResult } from "./engi

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key