8000 GitHub - lml2468/office-suite: Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux. · GitHub
[go: up one dir, main page]

Skip to content

About

Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

692 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GenOffice

GenOffice is a cross-platform desktop office suite and deterministic document automation toolkit. It edits real Office files while preserving untouched OOXML parts whenever possible, and exposes the same document engines through a CLI and Model Context Protocol (MCP) server.

GenOffice deliberately does not contain a model runtime, chat panel, web search, image generation, or an autonomous agent loop. Bring your own external agent—Codex, Claude Code, Cursor, or another MCP client—and use GenOffice as the local, inspectable execution layer.

Product scope

The desktop app contains five editors:

  • Docs — .docx editing, comments, tracked changes, fields, notes, styles, headers/footers and section layout.
  • Sheets — .xlsx, .xlsm, .csv and .tsv editing, formulas, charts, tables, formatting and workbook validation.
  • Slides — .pptx editing, editable shapes and text, rendering, layout audit and incremental OOXML save.
  • Markdown — an independent block editor for .md files.
  • HTML — an independent source editor with live Chromium preview.

PDF is an output format, not an editor or input format. GenOffice can export supported documents to PDF and render Office documents to PNG for visual verification. It does not read, edit, annotate, OCR, or convert PDF files into Office formats.

Architecture

Electron Shell
├── Docs ─────── docx-engine ─────────── DOCX
├── Sheets ───── xlsx-gateway + Rust ─── XLSX/XLSM/CSV/TSV
├── Slides ───── pptx-engine/render ──── PPTX
├── Markdown ─── Tiptap ──────────────── MD
└── HTML ─────── CodeMirror + Chromium ─ HTML

CLI / MCP
├── deterministic read and edit operations
├── comments, revisions and validation
├── conversion between supported source formats
└── PDF export and PNG visual verification

The Electron shell uses WebContentsView for document tabs. Each editor retains its own main, preload and renderer boundary. Renderer processes use sandboxing and context isolation; privileged operations cross validated IPC bridges.

Narrow-patch saving

The Office engines favor targeted package updates over regenerating a whole document. Untouched ZIP entries and unrelated XML are preserved whenever the requested edit allows it. This is central to compatibility: a small edit should not silently discard an unknown Office feature elsewhere in the file.

  • DOCX operations address blocks, comments, revisions, fields and section structures and patch the affected OOXML.
  • PPTX operations target stable slide and element identities and rewrite only affected presentation parts.
  • XLSX operations use the OOXML gateway for targeted workbook changes, with a Rust sidecar for import and calculation paths.

CLI and MCP

Build the CLI, then inspect the live command surface:

npm run build -w @genoffice/cli
node packages/cli/dist/genoffice.cjs --help
node packages/cli/dist/genoffice.cjs capabilities --json

Representative commands:

genoffice docs read report.docx --comments --revisions --json
genoffice docs apply report.docx --ops edits.json --json
genoffice sheet read model.xlsx --range A1:H100 --json
genoffice sheet apply model.xlsx --ops edits.json --json
genoffice slides read deck.pptx --full --json
genoffice slides audit deck.pptx --json
genoffice render report.docx --out previews --json
genoffice convert report.docx --to pdf --out report.pdf --json
genoffice mcp

The CLI never invokes a model. It validates arguments, executes deterministic operations, reports structured failures, and writes only the requested document changes. The MCP server exposes the same operations over stdio or token-protected Streamable HTTP.

Use genoffice guide docs|sheets|slides for the current operation schemas. See packages/cli/README.md for the supported conversion matrix and MCP setup.

Comments as an external-agent workflow

DOCX supports a complete review loop without an internal agent:

  1. Read unresolved comments with genoffice docs read file.docx --comments --json or docs_read over MCP.
  2. Let an external agent decide on changes.
  3. Apply edits and reply_comment / resolve_comment operations in one validated batch.
  4. Re-read comments and run docs check before handing the document back.

Sheets supports cell notes. Slides preserves and edits its supported comment structures through the presentation engine; use genoffice guide slides to inspect the exact automation operations available in the installed version.

Repository layout

Path Purpose
apps/shell Home, local file search, tabs, settings, updates and application dispatch
apps/docs DOCX desktop editor
apps/sheets Spreadsheet editor and Rust sidecar
apps/slides PPTX editor
apps/markdown Markdown editor
apps/html HTML source editor and preview
packages/docx-engine DOCX parsing and narrow OOXML patching
packages/xlsx-gateway Workbook operations and OOXML updates
packages/pptx-engine, pptx-render, pptx-ops Presentation model, rendering and deterministic operations
packages/cli CLI, MCP server, conversion and render orchestration
packages/ui, i18n, electron-utils Shared editor infrastructure
packages/zip-gate Archive safety limits and validation
skills/genoffice Instructions for coding agents using the CLI/MCP
e2e Electron and visual integration tests

There is no PDF application and no built-in AI/provider/search/project-chat package.

Development

Requirements:

  • Node.js 22.12 or newer
  • npm
  • Rust toolchain for the Sheets native sidecar and its native tests
npm install
npm run fixtures
npm run dev
npm run typecheck
npm test
npm run lint
npm run build:all

To build a single workspace:

npm run build -w @genoffice/docs
npm run build -w @genoffice/sheets
npm run build -w @genoffice/slides
npm run build -w @genoffice/markdown
npm run build -w @genoffice/html
npm run build -w @genoffice/shell
npm run build -w @genoffice/cli

Sheets' full build runs Cargo first. When diagnosing only the Electron layer, run npx electron-vite build from apps/sheets; this does not replace the required native build for a release.

Privacy and network boundary

Document reading, editing, conversion and rendering are local. GenOffice has no built-in model credentials or cloud content provider. External MCP clients control their own model and network behavior independently of GenOffice.

Optional update checks, anonymous product telemetry in official builds, remote HTTP MCP access, external links, and remote images explicitly inserted into a document are separate network surfaces. See PRIVACY.md and SECURITY.md.

License

The repository is licensed under Apache-2.0.

About

Free, open-source AI Office suite: Docs, Sheets, Slides, PDF, Markdown and HTML editors with a built-in AI agent, plus a `genoffice` CLI and agent skill so Claude Code, Codex and Cursor can create and edit real .docx/.xlsx/.pptx files locally. Bring your own key. macOS, Windows & Linux.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0