Skip to main content

Bunko

A read-only file server that renders what it serves. Point it at a folder and open it in a browser: Markdown, HTML reports, Word documents, Excel workbooks, CSV and JSONL tables, images, video, PDFs, code, and logs all open in place, with the folder tree and search in a sidebar. It's a drop-in replacement for python -m http.server, with no dependencies beyond Python.

Bunko (文庫) is Japanese for a small library, or a collection of books.

A folder in Bunko

It's built for reading files where they live, usually on a remote machine:

  • Results and reports from experiments, training runs, and pipelines: plots, tables, logs, videos, and HTML reports, without copying anything back.
  • Plans, notes, and reports written by AI coding agents such as Claude Code. They render as they're written, and stay on your own machine.
  • A shared, read-only document folder for a small team, with search and personal favorites and tags.

Launch it

1. Install

Bunko needs Python 3.8 or later, and nothing else. Pick whichever fits:

uvx bunko                  # try it without installing anything (needs uv)
uv tool install bunko      # install the bunko command (or: pipx install bunko)

On a server without uv or pipx, this puts a single-file bunko in ~/.local/bin, using only Python and curl:

curl -fsSL https://github.com/ivanfarevalo/bunko/releases/latest/download/install.sh | sh

Or copy bunko.pyz from the latest release anywhere, and run it with python3 bunko.pyz.

2. Start it

bunko                  # serve the current folder on port 8000, or the next free one
bunko 8099 ~/reports   # choose the port and the folder

Bunko prints the address to open, then serves until you press Ctrl+C.

3. Open it

Where Bunko runs How to open it
Your own machine Open the printed http://localhost:8000/
A remote machine, just for you bunko 8099 ~/reports there, then ssh -L 8099:localhost:8099 server here, and open http://localhost:8099/
A remote machine, for named people on your tailnet (recommended) See Security below
A remote machine, behind a password-like token bunko 8099 ~/reports -b 0.0.0.0 --token, then open the link it prints

4. Keep it running (optional)

tmux new-session -d -s bunko 'bunko 8099 ~/reports'             # in tmux
bunko service install --name reports -- 8099 ~/reports          # as a systemd user service

docs/deployment.md covers both, plus the optional tools that add thumbnails (ffmpeg) and fast content search (ripgrep).

Features

  • Recent files, favorites, and tags pinned at the top of the sidebar, each tag with its own section. They're kept on the server, so they follow you between devices.
  • Folder tree and search. Find files by name (Ctrl+K) or search inside them (Ctrl+Shift+F, with ripgrep when installed). Content results open the file at the matching line.
  • Markdown. GitHub-flavored, with highlighted code, working relative links and images, and an optional outline beside the page.
  • HTML pages render with their own CSS, scripts, and relative assets, as under http.server.
  • Images and galleries, with thumbnails generated by ffmpeg and cached.
  • Video with review tools: frame stepping, exact frame numbers from ffprobe, speed control, and links to an exact moment (?t=12.345).
  • CSV, TSV, and JSONL tables. Virtualized, sortable, filterable, and loaded in pieces, so large files open instantly.
  • Word and Excel. .docx files open as pages, with headings, lists, tables, images, and footnotes. .xlsx sheets open as tables with Excel's row numbers and a tab per sheet. No Office or extra packages needed.
  • Code and logs with highlighting and line numbers. Large files load in steps.
  • Live reload. The open file refreshes when it changes on disk.
  • Documents, for people and AI agents. /bunko in Claude Code or Codex writes up your work (a results report, a status update, an explainer, a proposal) as an HTML page in a consistent theme and folder layout, checks it, and hands you the link. Kinds, layouts, and themes are yours to change.
  • Links from the command line. bunko link report.html prints the URL that opens it, so scripts and AI agents can hand you a clickable link.
  • Access control. Tailscale identity (recommended) or an access token.
  • Runs anywhere: foreground, tmux, or a systemd user service.
Markdown with outline A large CSV
Video review tools Search inside files

Security

Bunko never changes the folder it serves, hides dotfiles (including through symlinks), and refuses path tricks. By default it listens only on this machine (127.0.0.1). Reaching it from elsewhere is a choice you make:

Setup Who gets in Transport
Tailscale Serve + --allow-user (recommended) Named people, by Tailscale identity HTTPS
The default + an SSH port forward Whoever can SSH in SSH
-b <your Tailscale IP> Everyone on your tailnet WireGuard
-b 0.0.0.0 --token Anyone holding the token Plain HTTP unless something adds HTTPS
-b 0.0.0.0 Anyone who can reach the port, as with http.server Plain HTTP

The recommended setup takes two commands:

bunko 8100 ~/reports --allow-user you@example.com
sudo tailscale serve --bg --https=8100 http://127.0.0.1:8100
# open https://<machine>.<tailnet>.ts.net:8100/

docs/security.md explains each mode and its limits.

Documentation

The project wiki tracks what Bunko is, where it's going, how it's built, and what has been done so far, phase by phase.

License

MIT. See LICENSE. Bundled front-end libraries keep their own licenses: THIRD_PARTY_NOTICES.md.

Metadata

Release files for bunko 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bunko 0.4.1
File Size Uploaded Provenance Actions
bunko-0.4.1.tar.gz 231.4 kB With provenance Details for bunko-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bunko 0.4.1
File Interpreter ABI Platform Actions
bunko-0.4.1-py3-none-any.whl Python 3 none any Details for bunko-0.4.1-py3-none-any.whl

Total release size: 470.0 kB

Release files / bunko-0.4.1.tar.gz

Download URL bunko-0.4.1.tar.gz
Size 231.4 kB
Tags Source
SHA-256 checksum
How to use checksums
71718ea2b605b1dd47a71375518ec03e3fe3c131ba0731c074c144e8e400a364
BLAKE2b-256 checksum
How to use checksums
f5003175029ed22720dd69e139f05f806cea80f782c0c9f4d21ae913f54d89b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / bunko-0.4.1-py3-none-any.whl

Download URL bunko-0.4.1-py3-none-any.whl
Size 238.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c02016ea47eb38a6bd5ac0e75ef89d874c3afabb1134ea3ddcc23d9210d1cde6
BLAKE2b-256 checksum
How to use checksums
3e94ce0c7b84022ddb3831a6167c3883ecadab97da17e5f8c4132b3da250ee17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for bunko 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bunko-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page