View Office files in the terminal
Project description
officecat 🐱
A CLI tool to view Office files in the terminal. Think cat but for .docx, .pptx, .xlsx, .csv, and .tsv files.
Every supported format is converted to markdown internally, then rendered through a single unified pipeline.
Installation
pip install officecat
Or install from source:
git clone https://github.com/mubbie/officecat.git
cd officecat
pip install -e .
Usage
officecat report.docx # colored formatted output (default)
officecat budget.xlsx # spreadsheet as markdown table
officecat slides.pptx # presentation content
officecat data.csv # CSV and TSV
officecat report.docx --tui # interactive full-screen viewer
officecat budget.xlsx | head # plain text (auto-detected pipe)
officecat slides.pptx --json # JSON output
officecat --version # show version
officecat update # update to latest version
Files must be local. OneDrive/SharePoint files that are "cloud-only" (not synced) will fail to open. Right-click the file and choose "Always keep on this device" to sync it first.
Output Modes
- Rich (default): Colored, formatted output to stdout. Works with
less -R. - TUI (
--tui): Full-screen interactive viewer with scrolling. - Plain (auto when piped, or
--plain): Raw markdown for piping togrep,head,awk. - JSON (
--json):{"source": "...", "markdown": "..."}for scripting.
Options
| Flag | Short | Description |
|---|---|---|
--tui |
-t |
Interactive full-screen viewer |
--plain |
-p |
Raw markdown text, no colors |
--json |
-j |
JSON output |
--head N |
-n N |
Show first N lines |
--sheet S |
-s S |
Select sheet by name or 1-based index (xlsx only) |
--slide N |
Show only slide N (pptx only) | |
--headers N |
-h N |
Promote row N as headers (xlsx/csv, default: 1, 0 to disable) |
--all |
-a |
Disable the default 500-row cap |
--version |
-v |
Show version |
TUI Key Bindings
| Key | Action |
|---|---|
q |
Quit |
Up / Down |
Scroll |
PgUp / PgDn |
Page scroll |
Home / End |
Jump to top/bottom |
Examples
# Quick view of a document
officecat report.docx
# Browse interactively
officecat report.docx --tui
# Specific sheet
officecat budget.xlsx --sheet "Q4 Summary"
# Specific slide
officecat deck.pptx --slide 3
# First 10 lines
officecat budget.xlsx --head 10
# JSON output
officecat report.docx --json | jq '.markdown'
# Pipe to grep
officecat data.xlsx --plain | grep "revenue"
# Self-update
officecat update
Supported Formats
- Word (.docx): headings, paragraphs, lists, tables in document order
- PowerPoint (.pptx): slides, shapes, images, speaker notes, hidden slides
- Excel (.xlsx): all sheets, row cap, header promotion
- CSV (.csv): auto-delimited
- TSV (.tsv): tab-delimited
Legacy binary formats (.doc, .ppt, .xls) show a conversion hint.
Known Limitations
- Files must be local. Remote/cloud-only files (OneDrive, SharePoint) need to be synced first.
- All content is rendered as markdown. Spreadsheet tables are markdown tables, not interactive grids.
- DOCX list detection is style-name-based and may miss custom list styles.
- PPTX grouped shapes and embedded tables show as placeholders.
- PPTX charts and SmartArt are not extracted.
- XLSX formulas show cached/computed values, not formula strings.
- Large spreadsheets are capped at 500 rows by default. Use
--allto show everything. - TUI enforces a 1000-line cap with
--allfor performance. Use--plainfor full output. - No decryption of password-protected files.
- Legacy binary formats (.doc, .ppt, .xls) are not supported.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file officecat-0.2.1.tar.gz.
File metadata
- Download URL: officecat-0.2.1.tar.gz
- Upload date:
- Size: 142.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab93f8508380851faadc5ab2f34f022b8a15c0229896616340a2fd5409238eb
|
|
| MD5 |
59cb2decb38a2e941812517d06655568
|
|
| BLAKE2b-256 |
aac8393f072a25095796e15037c61cdbfb384db624ff617203f887eea54e4ea2
|
Provenance
The following attestation bundles were made for officecat-0.2.1.tar.gz:
Publisher:
release.yml on mubbie/officecat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
officecat-0.2.1.tar.gz -
Subject digest:
5ab93f8508380851faadc5ab2f34f022b8a15c0229896616340a2fd5409238eb - Sigstore transparency entry: 1252526788
- Sigstore integration time:
-
Permalink:
mubbie/officecat@74bc0f06a7cf7555010ccd5292af39004da2a549 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mubbie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74bc0f06a7cf7555010ccd5292af39004da2a549 -
Trigger Event:
push
-
Statement type:
File details
Details for the file officecat-0.2.1-py3-none-any.whl.
File metadata
- Download URL: officecat-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc990e47a61d225721c092064da33f6df77d62f0458e2c127f01b1f5407159f3
|
|
| MD5 |
9e6d1047d59a45b3e1b43ac0026f476d
|
|
| BLAKE2b-256 |
172d24deabc4c5133730fc08424b87a304b9803904fa3034cca654ceb019d7c0
|
Provenance
The following attestation bundles were made for officecat-0.2.1-py3-none-any.whl:
Publisher:
release.yml on mubbie/officecat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
officecat-0.2.1-py3-none-any.whl -
Subject digest:
cc990e47a61d225721c092064da33f6df77d62f0458e2c127f01b1f5407159f3 - Sigstore transparency entry: 1252526800
- Sigstore integration time:
-
Permalink:
mubbie/officecat@74bc0f06a7cf7555010ccd5292af39004da2a549 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mubbie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@74bc0f06a7cf7555010ccd5292af39004da2a549 -
Trigger Event:
push
-
Statement type: