nyblnet/bentoGit

Bento 单文件幻灯片办公套件

生成无需额外软件即可编辑和协作的独立幻灯片文件。

使用前,准备这些

输入素材:内容大纲、素材与排版要求

  1. 在下方原始文档中确认支持的 AI 工具、模型和运行依赖。
  2. 打开原仓库,按作者的安装说明完成配置;模型 API 或外部服务可能需要单独开通。
  3. 用自己的素材试运行,再检查事实、版式与输出文件。
查看原仓库安装说明 ↗

许可证:MIT

来源快照:2026-09-15。README ↗

原项目许可证与版权声明
MIT License

Copyright (c) 2026 The Bento authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

可以这样开始

使用这个 Skill 完成「Bento 单文件幻灯片办公套件」:生成无需额外软件即可编辑和协作的独立幻灯片文件。 请先确认必要输入,再交付一份可直接使用的结果。

Bento — the office suite that fits in a file

This PowerPoint alternative is a single HTML file. A Bento deck carries its own viewer, presenter, and editor inside the document — open it in any browser, edit it, present it, send it. The person you send it to needs nothing: the file is the software.

Try it in 10 seconds: open bento.page/slides — that's the entire app, running on a starter deck that doubles as the feature tour. Or grab a designed template from the gallery and make it yours.

Download the app: grab the single Bento_Slides.bento.html from the GitHub Releases page or straight from bento.page (~560 KB, no account, no installer). Open it in any modern browser and it is the editor. Save, and it rewrites itself with your deck inside.

Why this exists

Office documents used to be things you had. Now they're things you rent — locked in someone's cloud, behind someone's login, readable only while a company keeps its servers on. Bento takes the other path:

  • One file, forever. Deck, fonts, images, charts, animations, and the full editor travel together. A copy from 2026 will open in 2036.
  • View-source honest. Your data sits in a plain, readable JSON block at the top of the file. No binary formats, no lock-in, no archaeology.
  • It saves itself. The file rewrites its own data block on save (File System Access API, with a download fallback). No app to install, ever.
  • Local-first, provably. Flip on Offline mode and nothing leaves your machine — updates and collaboration are hard-blocked, and the app says so.

What's inside

FeatureDescription
Morph presentingElements that share an id animate between slides — position, size, color, even gradients. Duplicate a slide, rearrange, and the motion designs itself.
Live collaborationE2EE (AES-GCM) with keys that live in your file, never on a server. The file itself is the invitation: anyone who opens a copy joins. Offline edits merge back precisely — our own CRDT, character-level text merging included.
A blind relayThe optional sync relay (server/sync-worker/) stores ciphertext and learns nothing. Read the source; it's about one file.
Charts, built inBar / line / pie / scatter drawn by our own dependency-free engine, live during presentations: tooltips, zoom, and data that morphs when a bar chart becomes a pie.
Designed for AIThe document is plain JSON in the file, so agents edit .bento.html files in place and chatbots round-trip the JSON (window.bento.loadDoc). See docs/agents.md.
Signed self-updatesReleases are ECDSA-signed and offered in-app. Updating writes a new file — the old one stays as your rollback. No server ever touches your documents.
Everything elseSpeaker view, comments, layouts, hidden interactive states, hover reveals, motion paths, PDF export, page sizes, 8 UI languages — in a ~560 KB shell.

Use it with AI

Because the document is plain JSON living in one plaintext block near the top of the file, any assistant that can read and write a file can edit your deck — no plugin, no API. Two ways in:

  • File harnesses edit the #bento-doc JSON in place: Claude Code, Cursor, Aider, or any agent with filesystem access. Claude Code users get a packaged bento-slides skill (installable from this repo's plugin marketplace: /plugin marketplace add nyblnet/bento) that even downloads the latest Bento app by itself.
  • Chat round-trip for any chatbot: copy the document JSON out (Save → Copy document JSON), let the assistant rewrite it, paste it back.

It works fully offline with local open-weight models — point Ollama, llama.cpp, or LM Studio at the deck and nothing leaves your machine. The agent guide is a single page you can drop into any model's context: bento.page/agents.md (also in this repo at docs/agents.md).

Architecture in one paragraph

slides/src/model.ts defines the JSON document model; one renderer (render.ts) draws it for the editor canvas, thumbnails, and present mode (Reveal.js drives navigation; morphs are computed from the model, not the DOM). Animation is an in-house engine (anim.ts), charts are in-house (charts.ts), collaboration is an in-house CRDT (sync/crdt.ts — pure data, fuzz-tested by scripts/test-sync.ts across hundreds of thousands of convergence checks). The shell compresses to ~560 KB with the document block left as plaintext so old files and outside tools can always splice it. The deep dive: docs/architecture.md.

Security model, honestly

  • Collab keys are minted client-side at document creation and live only in the file. Possession of the file = membership; "Rotate keys" = revocation.
  • The relay sees: ciphertext, connection timing, and a hash of the room key. It cannot read content, names, or structure.
  • Presence names are claims, not proofs — fine within a shared-key room; enterprise identity would need signed frames (designed, not built).
  • Update checks fetch a static manifest and send nothing about you or your document. Signature + hash + version monotonicity are verified in-app.
  • Known trade-offs: undo during live collab is snapshot-based and can revert a collaborator's concurrent edit to the same property; editing is desktop-first (phones view and present well).

Build from source

Node 20+ and npm are all you need — the app is a single-page build with no backend to stand up.

cd slides
npm install
npm run dev            # dev server (http://localhost:5173)
npm run build:single   # → dist-single/Bento_Slides.bento.html (the product)

node scripts/test-sync.ts runs the CRDT convergence rig. Releases are cut locally so the signing key never leaves the maintainer's machine — see docs/RELEASING.md.

Where to read more

  • CLAUDE.md — the deep architecture + development guide (also what AI agents read to work in this repo).
  • docs/architecture.md — how a .bento.html file is built, the on-disk format, and the runtime layout.
  • docs/format.md — the normative bento/slides document-model spec (every element type, slide/state/layout shape, and collab fields).
  • docs/collab-design.md — the CRDT, E2EE relay, and signed-write RBAC design + threat model.
  • docs/agents.md — the document format, for AI agents.
  • CHANGELOG.md — the version history.
  • Layout: slides/ is the app (source in slides/src/); server/sync-worker/ is the blind relay; docs/ and scripts/ are the guides and build tooling.

Contributions welcome — start with CONTRIBUTING.md. Found a security issue? See SECURITY.md.

Community

Planning a substantial contribution? Check the pinned What's in flight issue and the open PRs first, and say what you're planning before you build it — see CONTRIBUTING.md.

Roadmap

bento/slides is the first app — a PowerPoint alternative, shipping now. bento/spaces (notes), bento/dash (sheets & tables) and bento/vault follow, each as its own self-contained .bento.html distributable. The current release lives on bento.page and reaches every existing file through the signed update channel.

License

Bento is open source under the MIT License — all software here is MIT, © 2026 The Bento authors. Bundled runtime components (reveal.js, Moveable, Selecto) are MIT; the embedded typefaces (Fraunces, Instrument Sans) are OFL; gallery imagery is public-domain (see scripts/gallery-photos/SOURCES.md). Each component keeps its own license.