genoffice — GenOffice from the terminal
genoffice is installed with GenOffice. Run genoffice --version first. If the command is not found, GenOffice writes the launcher directory to ~/.genoffice/launcher (Windows: %USERPROFILE%\.genoffice\launcher) on every start: read that one line and run "<dir>/genoffice" from bash or "<dir>\genoffice.cmd" from PowerShell / cmd, quoted, in place of genoffice below. Default locations when that file is missing: macOS /Applications/GenOffice.app/Contents/Resources/cli, Windows %LOCALAPPDATA%\Programs\GenOffice\resources\cli, Linux /opt/GenOffice/resources/cli. Every command runs headless on the app's own engines; only search, image and media send data off the machine, to the provider configured in GenOffice.
Always add --json when a program reads the output: one JSON object on stdout, { "status": "ok" | "partial", "command", "summary", "output_path"?, "warnings"?, "detail"? } (partial: an apply with --best-effort / --stop-on-error wrote the file but lost ops) or { "status": "error", "code", "error", "message", "suggestion"?, "detail"? }. Exit codes: 0 ok, 1 usage or rejected ops, 2 file not found / output exists / file open in GenOffice, 3 conversion failed, 4 app not available. error is the machine-readable reason (table under "When a command fails"), suggestion the next step in one sentence, including did you mean "…"? when a command, option, op name, element id or sheet name is one typo away. detail carries facts as fields (failures[] with index, op, error, reason, valid_range, available, supported, usage; sheets, options, commands); never parse message.
Commands
| Command | What it does |
|---|---|
genoffice info <file> [--password <pw>] |
Metadata and structure summary (docx blocks and headings, pptx slides, xlsx sheets, pdf pages) |
genoffice convert <file> --to <fmt> [--out <path>] [--force] |
pdf→docx/pptx/xlsx, csv→xlsx, xls/xlsb/ods→xlsx, md→docx/html, docx→html/md, html→docx, xlsx→csv (--sheet), and docx/xlsx/pptx/md/html→pdf |
genoffice create --type pptx --ops <file> --out <path> |
New deck from a list of slide ops |
genoffice create --type pptx --spec <dir|file> [--outline <file>] --out <path> |
New deck from page spec files (one per slide, name order) or one deck spec file: px-positioned text, shapes and images (the designed-deck path, see below) |
genoffice create --type xlsx --from <data.csv | table.json> [--header] [--decimal ,] --out <path> |
New workbook from CSV or a 2-D array / {sheets:[{name,rows}]}; "=..." cells are formulas; --header freezes row 1 and filters the range |
genoffice create --type docx --from <text.md | fragment.html> --out <path> |
New Word document from Markdown or a restricted-HTML fragment |
genoffice create --type pdf --from <document> --out <path> |
PDF printed by the GenOffice renderer from any md/html/docx/xlsx/pptx file |
genoffice slides read <pptx> [--slide n] [--full | --max-chars n] [--layouts] / genoffice slides apply <pptx> --ops <file> [--dry-run] |
Inspect ids, geometry and text previews (clipped to 300 characters, ending in …(+n chars) with truncated: true; --max-chars moves the cap, --full: whole text, every table row, speaker notes), then edit with ops Text elements carry effective (first run's font size/family/color/bold/italic and paragraph align) with src naming where each value comes from: run, paragraph defRPr, shape lstStyle, layout placeholder, master placeholder, master titleStyle/bodyStyle, presentation defaultTextStyle, theme major/minor; setFont writes the run level and overrides all of them, applyTheme changes the theme fonts and colors. Elements with a hyperlink carry link (url, slide jump or a PowerPoint action: nextslide / previousslide / firstslide / lastslide / lastslideviewed / endshow); setLink and setText run link fields write the same three kinds. |
genoffice slides audit <pptx> [--slide n] / genoffice slides render <pptx> --out <dir> [--scale 2] |
Geometry audit (out of bounds, text overflow, overlap): issues[] with a code, level, path (s_n/e_*) and, for bounds and overflow, a suggest setTransform op you can pass to slides apply as is; one PNG per slide to look at |
genoffice render <file> --out <dir> [--page n] [--scale 2] [--el e_12 [--pad px]] [--grid [--cols 4] [--tile 320]] |
One PNG per page of a docx, xlsx, pptx, md, html or pdf file, laid out by the GenOffice renderer: look at it before reporting a document or workbook as done; --el (pptx) also writes the page cropped to one element (<stem>-NN-e_12.png, ids from slides read) so a small box is legible; --grid also writes every page onto one contact sheet (<stem>-grid.png, row-major, tile positions in grid.tiles) to see a whole deck at once |
genoffice slides check <outline.json|page.json> / genoffice slides replace <pptx> --slide n --spec <page.json> |
Validate a deck outline (exit 1 on errors) or build-and-audit one page file and check it against its outline entry and style.md; rebuild one slide from its page file, other slides untouched |
genoffice sheet read <xlsx> [--sheet name] [--range A1:D20] [--cols A,C:E] [--max-rows n] [--where formula|error|empty|number|text] [--stats] [--formats] / genoffice sheet apply <xlsx> --ops <file> | --cells <file> / genoffice sheet check <xlsx> |
Read a range plus features (panes, filter, charts, tables, rule counts for the sheet; merges and links in the range; --formats adds cell formats, widths, heights); keep the output small with --cols (only those columns, named in columns), --max-rows (rowsShown / rowsTotal and a note with the --range to continue), --where (only cells of one kind as {ref, value, formula}, no grid) or --stats (counts, used range and the sheet list, no cells); edit with the workbook DSL or by cell address; check lists formula errors, references to missing sheets, broken defined names, chart ranges off the data, ### columns (with a set_col_width suggestion), placeholder text and existing rules |
genoffice docs read <docx> [--range a-b] [--html] [--full | --max-chars n] [--comments] [--revisions] [--header-footer] [--sections] [--fields] [--notes] / genoffice docs apply <docx> --ops <file> [--dry-run] / genoffice docs check <docx> |
Read blocks by index (previews are clipped to 200 characters and end in …(+n chars) with truncated: true; --max-chars moves the cap, --full lifts it; plus comment threads, tracked changes, header/footer text, page setup per section, fields with their cached results, footnotes/endnotes), then edit with ops (incl. applyStyle, insertField for SEQ / REF / DATE / PAGE… fields, insertBookmark, updateFields), restricted HTML, insert_image / insert_picture (sized, floating) / insert_text_box, insert_chart / edit_chart, set_header_footer, set_watermark (text, or a washed-out picture via image), define_style, set_page_setup / insert_section_break, add_comment / reply_comment / resolve_comment / delete_comment, accept_changes / reject_changes (selector: all, ids from --revisions, author, type, blockIndex, blockRange, before; apply --track [--author name] records the batch's own edits as tracked changes), insert_footnote / insert_endnote / delete_note; --styles lists style ids; check lists fields without results (a fresh TOC), references to missing bookmarks, a TOC that no longer matches the headings, missing images, empty charts or headings, level skips, placeholder text, pending tracked changes and open comments |
genoffice guide <slides|docs|sheets> [group|op|design|spec] [--json] [--index] [--fingerprint] |
The op reference for each domain, generated from the same definitions apply validates against (read this before writing ops); one group or one op with its JSON schema on request; slides design / slides spec for building a deck |
genoffice search <query> [--images] [--max n] |
Web / image search via the provider configured in GenOffice; detail.results[] {title,url,snippet} |
genoffice image <prompt> [--out f.png] [--aspect 16:9] [--ref a.png,b.png] [--model <name>] |
Generate an image with the configured provider and save it; detail.mime, output_path |
genoffice media <file|url> [--ask <question>] |
Describe / question an image, video or audio file; answer in summary and detail.text |
genoffice capabilities |
Which cloud features are configured in GenOffice (search, image search, image generation, media analysis) and whether the app is installed; no network call |
genoffice open <file> [--slide n [--el e_12] | --block n | --range [Sheet!]B2:D5 | --page n] |
Open the file in the GenOffice app (only when the user asks to see it there); with a target, also scroll to and select that slide element / block / range / page so the user is looking at the same spot you are (target_not_found / out_of_range come back with the valid ids or range) |
genoffice selection <file> --json |
What the user has selected in the editor showing the file: {slide, elements[], types[]}, {blocks:[a,b], text, collapsed}, {sheet, range, values?} or {page, text?} — resolve "this one" / "here" from it before editing; file_not_open_in_gui when no tab shows the file |
genoffice skill list / genoffice skill install <agent|all> [--dir <path>] [--force] / genoffice skill path |
Coding agents found on this machine (Claude Code, Codex, Cursor, Gemini CLI, Copilot, OpenCode, Windsurf) with the skill version each has; copy or update this skill into their skills directory, or print the bundled SKILL.md; nothing is installed without this command or a click in Settings → Integrations |
--ops - and --cells - read stdin. --out defaults to the input file's folder with the new extension (convert) or edits in place (apply). Unknown options are rejected (exit 1). The mcp server runs on stdio by default; mcp [--http <port> [--host <addr>] [--token <secret>]] serves Streamable HTTP instead.
Which command
| Task | Command path | Not for |
|---|---|---|
| A presentation from a brief, however short | guide slides design → style.md + outline.json → slides check per page → create --type pptx --spec → render --grid → slides audit |
editing a deck that exists (slides apply); a fixture deck (create --type pptx --ops) |
| Change text, a picture or one slide of an existing deck | slides read → slides apply --ops → slides audit → render --page |
restyling the whole deck (applyTheme op, or rebuild through the staged path) |
| A workbook from data | create --type xlsx --from data.csv | table.json → sheet apply --ops for formats/charts → sheet check |
one cell fix in an existing file (sheet apply --cells) |
| Edit cells, formats, charts, rules of an existing workbook | sheet read → guide sheets <op> → sheet apply --ops → sheet check |
refresh_pivot, session tables and shapes (refused: needs the editor) |
| A Word document from text | create --type docx --from report.md | fragment.html → docs check → render |
…(truncated)