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.
The desktop app contains five editors:
- Docs —
.docxediting, comments, tracked changes, fields, notes, styles, headers/footers and section layout. - Sheets —
.xlsx,.xlsm,.csvand.tsvediting, formulas, charts, tables, formatting and workbook validation. - Slides —
.pptxediting, editable shapes and text, rendering, layout audit and incremental OOXML save. - Markdown — an independent block editor for
.mdfiles. - 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.
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.
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.
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 --jsonRepresentative 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 mcpThe 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.
DOCX supports a complete review loop without an internal agent:
- Read unresolved comments with
genoffice docs read file.docx --comments --jsonordocs_readover MCP. - Let an external agent decide on changes.
- Apply edits and
reply_comment/resolve_commentoperations in one validated batch. - Re-read comments and run
docs checkbefore 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.
| 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.
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:allTo 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/cliSheets' 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.
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.
The repository is licensed under Apache-2.0.