@graflethq/cli
v0.3.0
Published
Precomputed knowledge graphs of versioned library docs, for AI agents. Docs as a graph, not snippets.
Downloads
1,057
Maintainers
Readme
Docs as a graph, not snippets.
Precomputed knowledge graphs of versioned library docs, for AI coding agents. One graflet = one
library at one release. graflet <slug> downloads a library's documentation Markdown plus a
pre-built knowledge graph of those docs, both pinned to the same upstream commit.
Install
npm i -g @graflethq/cli # needs Node >= 18Use
graflet login # sign in with GitHub (once) — the one action that needs an account
graflet next.js # latest tracked release -> ./next.js/
graflet next.js@16 # that release, pinned -> ./next.js@16/
graflet watch next.js # get emailed when the graph updatesA download reports each step as it happens — the two sources stream in parallel:
$ graflet next.js
graflet · next.js → ./next.js/
✔ Resolved 16 → 2f9d939 · docs and graph aligned
✔ Downloaded docs → 312 files (18 MB)
✔ Fetched graph → 1,204 nodes · 3,880 edges
Done in 24s
Saved ~6h 12m of local build · ~$0.94 in API costAll of that is on stderr. Stdout carries exactly one line — the absolute destination
path — so cd "$(graflet next.js)" works with no parsing. Piped or in CI, the same words
print as plain lines with no spinner and no escape codes.
Each download writes one directory holding both sources, kept apart:
next.js/
├── docs/… the library's own Markdown, byte-for-byte from upstream
├── LICENSE the docs' license
└── graphify-out/ the graph
├── graph.json
├── graph.html
├── GRAPH_REPORT.md
├── savings.json
└── meta.jsongraphify-out/ is the same folder name graphify
writes, so running it over the docs yourself lands in the same place. The Markdown is fetched
anonymously from the library's public repo at the pinned commit; the graph is streamed from a broker
after sign-in, so you never hold a token for the private graph repo.
For CI / headless use, skip the browser with a bearer you already hold:
export GRAFLET_TOKEN=<bearer> # authenticate without a browser, without writing the keyringBrowse the catalog at graflet.rnui.dev. Full design, ADRs and source: github.com/graflethq/graflet.
Naming
Spelled g-r-a-f-l-e-t, no p-h — from graphlet, a small induced subgraph. npm blocks the bare
name (too close to leaflet), so the package is scoped @graflethq/cli; the installed command is
graflet. PyPI keeps bare graflet.
License
MIT — © 2026 MD. MOHIBUR RAHMAN.
