A Go port of doxx - Lightning-fast, terminal-native document viewer for Microsoft Word files
doxx-go brings the power of the original Rust doxx to the Go ecosystem, providing beautiful terminal-based viewing of Microsoft Word documents with zero dependencies on Microsoft Office.
Complete feature parity with the original Rust implementation:
- π¨ Beautiful terminal rendering with syntax highlighting and formatting
- π Professional table display with smart alignment and Unicode borders
- π Nested list support with proper indentation and multi-level hierarchy
- π Full-text search with highlighting and context
- π Document outline for quick navigation
- π― Multiple view modes β document, outline, search, and help
- π Copy to clipboard - Copy rendered content directly from the terminal UI
- π Multiple export formats - Markdown, CSV, JSON, and plain text
- β‘ XML-based parsing - Robust text extraction from DOCX internal structure
# Clone the repository
git clone https://github.com/keskinonur/doxx-go.git
cd doxx-go
# Build the binary
go build -o doxx cmd/doxx/main.go
# Or install directly
go install ./cmd/doxxDownload the latest release for your platform from the releases page.
make build # Build the binary
make install # Install to $GOPATH/bin
make run FILE=document.docx # Run with a file./quickstart.sh # Automated setup and dependencies# View a document interactively
doxx quarterly-report.docx
# Start with outline view
doxx document.docx --outline
# Search for specific content
doxx contract.docx --search "payment terms"
# Force interactive UI mode
doxx document.docx --force-ui# Export to different formats
doxx spreadsheet.docx --export csv > data.csv # Tables only
doxx report.docx --export markdown > report.md # Full document
doxx document.docx --export json > structure.json # Complete structure
doxx document.docx --export text > plain.txt # Plain textImportant: CSV export only outputs table data. For documents without tables, use text, markdown, or json formats.
# Search without UI (for scripting)
doxx document.docx --search "error" --no-ui
# Combine search with export
doxx document.docx --search "quarterly" --export json
# Process multiple files
for file in *.docx; do doxx "$file" --export text > "${file%.docx}.txt"; done| Key | Action |
|---|---|
β/k or mouse wheel up |
Scroll up |
β/j or mouse wheel down |
Scroll down |
Page Up/Page Down |
Page navigation |
Home/End |
Jump to start/end |
o |
Toggle outline view |
s |
Open search |
c |
Copy content to clipboard |
F2 |
Copy content (in search view) |
n/p |
Next/previous search result |
h/F1 |
Toggle help |
q |
Quit |
The project includes comprehensive test fixtures from the original doxx repository:
# Test with original doxx fixtures
ls test-fixtures/
# minimal.docx - Basic parsing test
# tables-heavy.docx - Complex table parsing
# headings-hierarchy.docx - Outline generation
# formatting-showcase.docx - Text formatting
# lists-comprehensive.docx - List structures
# unicode-special.docx - International characters
# business-report.docx - Real-world document
# export-test.docx - Export validation# Basic document parsing
./build/doxx test-fixtures/minimal.docx --export text
# Table extraction and CSV export
./build/doxx test-fixtures/tables-heavy.docx --export csv
# Heading detection and outline
./build/doxx test-fixtures/headings-hierarchy.docx --export markdown
# Search functionality
./build/doxx test-fixtures/business-report.docx --search "revenue"
# Unicode and special characters
./build/doxx test-fixtures/unicode-special.docx --export json
# Comprehensive format testing
./build/doxx test-fixtures/export-test.docx --export markdownmake test # Run unit tests
make test-coverage # Generate coverage report
make benchmark # Performance benchmarksdoxx-go/
βββ cmd/
β βββ doxx/
β βββ main.go # CLI entry point with Cobra
βββ internal/
β βββ document/
β β βββ parser.go # DOCX parsing with XML extraction
β β βββ parser_test.go # Unit tests
β βββ ui/
β β βββ app.go # Terminal UI with Bubble Tea
β βββ export/
β βββ export.go # Multi-format export (MD, CSV, JSON, Text)
βββ test-fixtures/ # Original doxx test files
βββ build/ # Compiled binaries
βββ go.mod # Go module definition
βββ Makefile # Build automation
βββ README.md
This Go port maintains the same architecture as the original Rust implementation:
- Document Parsing: Uses
nguyenthenguyen/docxfor DOCX file access with custom XML parsing for robust text extraction - Terminal UI: Built with
charmbracelet/bubbleteafor beautiful cross-platform interfaces - Smart Tables: Intelligent data type detection and alignment (numbers right-aligned, booleans centered)
- Export Pipeline: Clean separation of concerns for different export formats
- Parses Word document XML structure directly
- Extracts clean text from
<w:t>tags - Preserves formatting and style information
- Handles complex document structures
- Automatically detects data types (numbers, currency, percentages, dates, booleans)
- Applies intelligent alignment based on content type
- Unicode borders for professional rendering
- Proper CSV export with data type preservation
- Case-insensitive full-text search across paragraphs and tables
- Context-aware result highlighting with
**bold**markup - Navigate between results with n/p keys
- Location information for precise navigation
- Markdown: Preserves formatting with proper table alignment indicators
- CSV: Extracts only tables for data analysis workflows (empty if no tables)
- JSON: Complete document structure with metadata and typing information
- Text: Clean plain text output suitable for piping and automation
| Feature | Original (Rust) | Go Port | Status |
|---|---|---|---|
| DOCX Parsing | β | β | Complete with XML extraction |
| Terminal UI | β | β | Complete with Bubble Tea |
| Table Rendering | β | β | Complete with smart alignment |
| Search | β | β | Complete with highlighting |
| Outline View | β | β | Complete with navigation |
| Export Formats | β | β | Complete (MD, CSV, JSON, Text) |
| Clipboard | β | β | Complete with ANSI stripping |
| Mouse Support | β | β | Complete with wheel scrolling |
| Test Fixtures | β | β | All original test files included |
Following the original doxx roadmap:
- AI integration for document summarization
- Hyperlink support and navigation
- Image descriptions and alt-text
- Themes and color customization
- Web interface for browser viewing
- Plugin system for extensions
MIT License - See LICENSE file for details
- Original doxx by @bgreenwell
- Built with Bubble Tea by Charm
- Test fixtures from the original doxx repository
- Inspired by the terminal-first development philosophy
Contributions are welcome! This project maintains compatibility with the original doxx.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Add tests for new functionality
- Ensure all tests pass (
make test) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
git clone https://github.com/keskinonur/doxx-go.git
cd doxx-go
make deps # Download dependencies
make test # Run tests
make build # Build binary
./build/doxx test-fixtures/minimal.docx # Test with sample fileMade with β€οΈ for developers who live in the terminal