@wundercorp/doku
v0.1.31
Published
Doku turns docs.json and llms-full.txt into a Bloomberg-terminal-style documentation portal.
Maintainers
Readme
Doku.sh
Doku turns docs.json, llms-full.txt, and Doku packed JSON into an instant documentation portal via https://doku.sh
Fast path
Install the CLI:
npm install -g @wundercorp/dokuGenerate docs metadata and an LLM-readable project file from the current project:
doku genThis writes both docs.json and llms-full.txt. The generated output stays high-level: it uses selected package.json metadata, script names, dependencies, a summarized top-level project structure, and hand-written documentation. It does not embed source or configuration file contents.
Pack the project docs, including generated pages and Markdown/MDX page bodies:
doku pack . --output doku.docs.jsonOpen the packed docs in Doku:
doku open ./doku.docs.json --site https://doku.shYou can also generate and pack a project directly from outside the project directory:
doku gen ./ --output docs.json --llms-output llms-full.txt
doku pack ./ --output doku.docs.jsonIf docs.json does not exist, doku pack generates the docs config in memory instead of failing.
What doku gen does
doku gen creates a Doku-ready docs.json and llms-full.txt without requiring BuilderStudio or any other generator.
By default, it scans the current directory and writes ./docs.json plus ./llms-full.txt:
doku genGenerate docs metadata for another project:
doku gen ./gameWhen the source directory is not the current directory, relative --output and --llms-output paths are resolved inside that source directory. This writes ./game/docs.json and ./game/llms-full.txt:
doku gen ./ --output docs.json --llms-output llms-full.txtUse absolute output paths when you want to write somewhere else.
Set a custom docs title:
doku gen ./ --title "Game Docs"Print the generated docs.json instead of writing files:
doku gen ./ --stdoutThe generator looks for common documentation files such as root README.md, index.md, quickstart.md, and Markdown/MDX/TXT files under directories like docs/, guides/, reference/, api/, content/, pages/, and examples/.
When no hand-written docs are present, doku gen does not write an empty navigation. It creates generated pages for:
- project overview
- getting started
- commands and scripts
- dependencies
- project structure
llms-full.txtpreview
The llms-full.txt created by doku gen includes project metadata, script names, dependencies, a summarized top-level structure, and existing documentation. It does not embed source or configuration file contents. Environment files, hidden files, credential files, operating-system metadata such as .DS_Store and Thumbs.db, editor metadata, caches, lock files, generated artifacts, and temporary files are excluded from discovery and reporting. You can tune the maximum size of included hand-written documentation with:
doku gen --max-file-bytes 120000 --max-total-bytes 1800000Generate a detailed LLM source-context file explicitly:
doku llms ./ --output llms-full.txtUnlike doku gen, doku llms includes selected source and configuration file contents. The same sensitive-file, hidden-file, system-file, cache, generated-file, binary-file, and size filters still apply.
What doku pack does
doku pack creates a Doku packed JSON file. This is the file you upload or open in the Doku portal when you want navigation plus page content.
If the target directory already has a docs.json, Doku uses it:
doku pack ./builderstudio-docs --output doku.docs.jsonIf the target directory does not have a docs.json, Doku generates one in memory, creates llms-full.txt in the packed payload, and packs the discovered documentation files:
doku pack ./ --output doku.docs.jsonThis means this old flow is no longer required for normal use:
npm install -g @wundercorp/bs
bs docs gen --output ./builderstudio-docs
doku pack ./builderstudio-docs --output doku.docs.jsonBuilderStudio output is still supported, but Doku does not depend on it.
Manual upload
The homepage supports manual upload, paste, and remote URL import for:
- Mintlify-style
docs.json - raw
llms-full.txt - Doku packed JSON with docs navigation and page bodies
After a portal is generated, the top of the portal still includes controls to upload or import a new docs file. The app does not hide upload behind deploy instructions.
Open a remote docs URL
If a docs.json or llms-full.txt file is already hosted somewhere, open it directly:
https://doku.sh/?url=https%3A%2F%2Fexample.com%2Fdocs.json
https://doku.sh/?url=https%3A%2F%2Fexample.com%2Fllms-full.txtThe browser first tries a direct fetch. If the remote server does not allow browser CORS, the deployed Terraform stack exposes /api/fetch?url=... as a fetch bridge.
Doku CLI
doku gen [source-directory] --output docs.json --llms-output llms-full.txt
doku llms [source-directory] --output llms-full.txt
doku pack [docs-or-project-directory] --output doku.docs.json
doku open <docs-file-or-url> --site https://doku.sh
doku url <docs-json-or-llms-url> --site https://doku.sh
doku sudoku --site https://su.doku.shServe the Doku app locally from a source checkout:
npm run serve -- --port 4173The published npm package is CLI-only and does not include the static site bundle.
One-shot AWS deploy
The source deployer still exists, but it is intentionally not shown inside the generated portal UI and is not shipped in the published npm package.
It creates:
- S3 static site bucket
- S3 private imports bucket
- CloudFront distribution
- ACM certificate
- Route53 DNS validation
- Route53 A/AAAA records for
doku.shandwww.doku.sh - API Gateway
/api/importsand/api/fetch - Lambda import/fetch handler
- CloudFront invalidation
Deploy:
bash scripts/deploy.sh --domain doku.sh --hosted-zone doku.shTerraform assumes the hosted zone already exists in Route53.
Hidden easter egg
The AWS deployer also provisions su.<domain> as a hidden solo Sudoku terminal. For the default domain this is:
https://su.doku.shThe same static bundle powers the docs portal and the hidden Sudoku route. The browser detects the su. host and renders the mini-game instead of the documentation importer. For local testing, open:
http://127.0.0.1:4173/?egg=sudokuUsers install the CLI with:
npm install -g @wundercorp/dokuThen they can run:
doku gen
doku pack . --output doku.docs.json
doku open ./doku.docs.json --site https://doku.sh
doku open https://example.com/llms-full.txt --site https://doku.sh
doku sudokuLicense
Apache-2.0
