Expand description
bynk book — the Bynk Book as this toolchain documents it (#2463).
The editor’s bynk_search_book language-model tool (and bynk mcp) need Book
text that matches the bynk the user runs, not the live site (which may
describe features this build lacks) and not the extension’s own version. The
driver embeds the whole Book at build time (build.rs: the llms-full.txt
bundle, every page in sidebar order) and serves it two ways:
bynk bookprints the whole Book under a first line naming the toolchain version;bynk book --search <query>returns the best-matching sections, as Markdown or (--format json) as data.searchis the ranking, shared by every caller inside the driver.
A build made without the bundle (a plain cargo build) carries none: both
forms then say “no Book bundled in this build” and exit non-zero, so a source
build never silently returns nothing. The editor falls back to the hosted
Book, ranked by a small TypeScript copy of search.
Structs§
Enums§
- Format
- How
bynk book --searchprints.
Constants§
- RESULTS
- How many sections a search returns.
Functions§
- embedded
- The embedded Book, or
Nonefor a build made without the bundle. - parse
- Split a Book text (the layout
site/scripts/build-llms-full.mjswrites: each page between# ──rules, headed# Source: book/<page>) into sections. - render_
markdown bynk book --searchas Markdown. Also what the MCP server’sbynk_search_bookreturns, so both surfaces print one text.- run
- Run
bynk book: print the whole Book, or with aquerythe matching sections. Exits0on success (including a search with no match) and1when this build carries no Book. - search
- The best
limitsections forquery: a word in a heading counts more than one in the body, a section holding every word beats one holding some, and a verbatim phrase beats both. Ties keep the Book’s reading order.