Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

OfficeIMO CLI Documentation

Edit on GitHub

Task guides for the officeimo CLI: install it, convert and batch documents, extract content, work with PDFs and invoices, script it in CI and run MCP.

officeimo is the command-line tool from the OfficeIMO.Tool NuGet package. It runs the same OfficeIMO engines as the .NET libraries, without Microsoft Office, from a shell script, a CI job, a scheduled task or an MCP client. These guides are organised by task. Each command also prints its own contract with officeimo <area> --help.

dotnet tool install --global OfficeIMO.Tool
officeimo convert report.docx
officeimo read report.docx --format markdown
officeimo hidden-data remove proposal.docx

Guides

GuideCovers
Install and pin the toolGlobal install, a repository tool manifest, updates and version checks
Convert documentsOne file at a time: Office, OpenDocument, Apple, email, HTML, text, spreadsheet and structured-data routes
Batch conversion and saved jobsFolders, checkpoints, reusable job files, run reports and structured-data conversion
Extract and inspectMarkdown and JSON extraction, compact inspection, workbook schemas and the JSON contracts
PDF workflowsPage copies, splits, decryption, OCR, page images, assembly, comparison, printing and redaction
Before sharingHidden data, Content Credentials and AI labels, and provenance checks in CI
InvoicesInspect, validate, edit, convert and render CII and UBL invoices
HTML to PDF and imagesRender HTML, MHTML and ZIP site bundles with explicit resources, fonts and limits
OfficeIMO MarkupValidate markup, generate C# or PowerShell, and export Word, Excel and PowerPoint files
Scripting and CIExit codes, --force, standard output versus files, path rules, secrets, limits and GitHub Actions and Azure DevOps recipes
MCP and agentsThe STDIO MCP server, allowed roots and the compact agent commands

Command areas

AreaWhat it does
convertConverts one file; the input and output extensions select the route
read, extract, readerExtract documents or folders as Markdown or JSON
inspect, agentReturn compact, bounded JSON for inspection, search and fetch
tabularList worksheets, report column schemas and convert CSV, TSV and workbooks
workflowBatch conversion, saved jobs, page images, assembly, comparison, print plans and printing
pdfSeparate PDF copies, splits, OCR, PDF/A conversion and source-bound redaction
htmlRender HTML, MHTML and ZIP site bundles to PDF or page images
hidden-data, provenanceClean documents before sharing and check them in CI
invoiceElectronic invoice workflows
markupParse, validate and preview OfficeIMO Markup, emit C# or PowerShell, and export Office files
mcpStart the MCP server over standard input and output

officeimo help --format json lists every area, subcommand, option and exit code of the installed version as JSON; see Discover commands from the tool.

Safe by default

  • No silent overwrites. Commands refuse to replace an existing output unless you pass --force; batches use --conflict. Inputs are never modified. The exceptions are listed under overwrite rules.
  • Bounded work. Input size, output size, page counts and file counts have limits, so an unexpected file fails fast. Raise them per command only for trusted input; see resource limits.
  • Bounded output. Results are one JSON object or NDJSON stream on standard output, with diagnostics on standard error. The agent and inspect commands cap their JSON with --max-output-characters.
  • No secrets on the command line. Passwords are read from environment variables you name.
  • Exit codes you can branch on. 0 success, 1 validation found errors, 2 usage, 3 input not found, 4 unsupported input, 5 operation failed, 6 output failed, 130 cancelled. See exit codes.

The command line covers the workflows listed here. The .NET libraries and PSWriteOffice expose more of each engine; Studio features are not automatically CLI commands.

Example source