Scripts2026年7月22日·1 分钟阅读

Doxx — Render Word Documents in the Terminal

A fast Rust CLI tool that renders .docx files directly in the terminal with formatting, tables, and images. No Microsoft Office or LibreOffice required.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Doxx
直接安装命令
npx -y tokrepo@latest install 4b84b214-85aa-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Doxx is a lightweight Rust CLI that renders Microsoft Word (.docx) files directly in your terminal. It preserves formatting, tables, lists, and embedded images without requiring Microsoft Office, LibreOffice, or any other office suite.

What Doxx Does

  • Renders .docx files with formatted text output in the terminal
  • Preserves headings, bold, italic, and other text styling
  • Displays tables with aligned columns and borders
  • Shows embedded images as terminal-compatible output
  • Supports piping output for integration with other CLI tools

Architecture Overview

Doxx parses the OOXML format (ZIP archive containing XML) directly in Rust. It walks the document XML tree, extracts text runs with their formatting properties, and renders them using terminal escape codes. Table layout uses a constraint-based algorithm to compute column widths within terminal dimensions.

Self-Hosting & Configuration

  • Install via cargo: cargo install doxx
  • Or download prebuilt binaries from GitHub releases
  • No configuration needed; it works out of the box
  • Set DOXX_THEME to switch between light and dark output styles
  • Supports reading from stdin for pipeline integration

Key Features

  • Zero-dependency single binary written in Rust
  • Preserves document structure including headers, lists, and tables
  • Fast startup and rendering even for large documents
  • Terminal-aware output that adapts to your window width
  • Integrates with pipes, less, grep, and other CLI tools

Comparison with Similar Tools

  • LibreOffice CLI — Full office suite; Doxx is a focused single binary for viewing
  • pandoc — Document converter; Doxx focuses on terminal rendering, not conversion
  • catdoc — Legacy .doc viewer; Doxx supports modern .docx with rich formatting
  • Antiword — Plain text extraction; Doxx preserves formatting and table layout

FAQ

Q: Does it support .doc files? A: No, Doxx supports the modern .docx (OOXML) format only. For legacy .doc files, use catdoc or antiword.

Q: Can I extract just the text without formatting? A: Yes, use doxx --plain document.docx for plain text output.

Q: How are images handled? A: Images are rendered using terminal graphics protocols where supported, or shown as placeholder text otherwise.

Q: What platforms are supported? A: Linux, macOS, and Windows. Any terminal with ANSI color support works.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产