Explore a `pmndrs-docs browse` terminal reader
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 100
- Avg merge
- 35m
- Merged PRs (30d)
- 2
Description
Question
Should the generator grow a browse mode — land in a menu of pmndrs libraries, then navigate one library's documentation without leaving the terminal?
Verdict: viable, shape undecided
Prototyped in three shapes on prototype/cli-browse (off npm-cli, #574). Throwaway by construction — do not merge. pnpm browse runs it; < and > cycle the variants. Every run is against the real published corpus: 196 pages across react-three-fiber, drei and zustand.
| A | Selects + less |
Hierarchical, no TUI toolkit at all, shippable as-is. The list disappears while you read. |
| B | Two-pane reader | Sidebar + content following the page cursor. Context never leaves; you redraw a design system in cells. |
| C | Palette | No menu: one fuzzy query over all 196 pages. Crosses library boundaries, which a menu structurally cannot. |
Commits: 6cf61b3 the OpenTUI cut, c394edc the Ink port.
What the prototype settled
- OpenTUI is bun-only.
@opentui/core@0.5.4ships anindex.node.jsand per-platform native packages, and still throwsOpenTUI native FFI is not available for this runtime yetoutside bun. It cannot ship insidenpx @pmndrs/docswithout abun build --compilestandalone binary per platform. B and C were ported to Ink, which runs on plain node. - The data layer is nearly free. One
GETofllms-full.txtper library returns everything — 200 KB for drei — as<page path title><![CDATA[…]]></page>. Parsing is three lines, and it caches to disk. - The registry cannot leave Next. Blocks any implementation — #580.
- Sandpack collapses to a marker. The live r3f demos have no terminal form; they render as
▶ live demo — <folder> [o] open in browser, andohands the page to the browser. Same answer in all three shapes, and it reads better than expected. - Ink gives you a renderer, not widgets.
Box,Text,useInput, flexbox — no select, no text input, no scroll container.browse.prototype.list.tsxis a hand-written windowed list, and each pane slices its own lines; about sixty lines in total. Third-party components exist (ink-select-input,ink-text-input) but sit outside the package and are peered toink >=5, with no statement about 7.
Reusable vs throwaway
Two modules are validated and independent of whichever shape wins — these are the ones that would move into real code:
src/cli/browse.prototype.corpus.ts— fetch, parse, disk cachesrc/cli/browse.prototype.markdown.ts— MDX → styled lines
Everything else (the three UIs, the switcher, the --snapshot / --query / --open capture flags) is decision material, not product.
Open before any implementation
- Which shape. A is the only one shippable today with no further work. B and C both need Ink and a hand-written list and scroll pane (~60 lines, already written).
- Ranking in C. Subsequence matching is noisy —
scrollstill surfacessubscribeWithSelector. Real ranking is the work that shape adds. Note that the matching itself is ~15 lines of plain JS over 196 in-memory entries; it needs no toolkit and no full screen, so asearchverb can be built on A's mechanics.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/cli/browse.prototype.corpus.ts and src/cli/browse.prototype.markdown.ts, then review the prototype shapes on prototype/cli-browse and the Ink constraints described here. The work is not ready for implementation until a browse shape and, for the palette option, ranking approach are decided; completion would require those decisions and a defined product implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, nextjs, node.js, typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100