top | item 44934391

Show HN: Doxx – Terminal .docx viewer inspired by Glow

261 points| w108bmg | 6 months ago |github.com

I got tired of open file.docx → wait 8 seconds → close Word just to read a document, so I built a terminal-native Word viewer!

What it does:

* View `.docx` files directly in your terminal with (mostly) proper formatting

* Tables actually look like tables (with Unicode borders!)

* Nested lists work correctly with indentation

* Full-text search with highlighting

* Copy content straight to clipboard with `c`

* Export to markdown/CSV/JSON

Why I made this:

Working on servers over SSH, I constantly hit Word docs I needed to check quickly. The existing solutions I'm aware of either strip all formatting (docx2txt) or require GUI apps. Wanted something that felt as polished as [glow](https://github.com/charmbracelet/glow) but for Word documents.

The good stuff:

* 50ms startup vs Word's 8+ seconds

* Works over SSH (obviously)

* Preserves document structure and formatting

* Smart table alignment based on data types

* Interactive outline view for long docs

Built with Rust + ratatui and heavily inspired by Charm's [glow](https://github.com/charmbracelet/glow) package for viewing Markdown in the CLI (built in Go)!

    # Install
    cargo install --git https://github.com/bgreenwell/doxx
    
    # Use
    doxx quarterly-report.docx
Still early but handles most Word docs I throw at it. Always wanted a proper Word viewer in my terminal toolkit alongside `bat`, `glow`, and friends. Let me know what you think!

72 comments

order

zvr|6 months ago

Wonderful project; loved the speed and responsiveness.

But a humble request: please make sure that the planned "AI integration" is completely optional, not compiled-in, or, even better, a sister project ("aidoxx"?).

Having the functionality of sending the contents of a Word document to any external service will be a red flag and block adoption of this tool in many environments.

stavros|6 months ago

I'm usually not averse to AI in things, but I agree with you, any online functionality in a cli tool would make our security team ban a tool, and with good reason.

nirava|6 months ago

+1 to this. The AI stuff should be a different tool that I can pipe stuff into:

`doxx document.docs | doxxAI`

Even without any of the bad vibes around AI, it is just much more aesthetic and wonderful if the core doxx util was a single purpose command.

Also, it is open source so if it's sufficiently useful, someone will spin off a AI stripped down version anyways, and that'll probably gain more users/goodwill in the kind of CLI SSH dev niche market this tool is trying to fit in.

treetalker|6 months ago

Great project! Looking forward to trying it out in my law practice.

The name causes miscues and carries negative connotations, though, on account of its homonym verb (doxxing).

w108bmg|6 months ago

It's 100% intentional wordplay! "Doxxing" documents by exposing their contents in the terminal instead of keeping them locked in Microsoft Word. The whole project is about "liberation from Office" so the pun felt perfect. I'm honestly not too creative so I was bouncing around with Google Gemini on some "clever" names.

ThreatSystems|6 months ago

I am genuinely curious, as to how this would be a solution for a law practice? How many lawyers are SSH'd into servers? Or am I being ignorant?

nine_k|6 months ago

The name could rather be docc, along the lines of thicc,

Tmpod|6 months ago

Was thinking the same. Might be worth looking into renaming the project, to prevent situations like that for both maintainers and users.

ashton314|6 months ago

Very cool!

I did something like this with pandoc:

    pandoc -s -t man "$1" | groff -T utf8 -man | ${PAGER:-less}
Keeps a lot or formatting. My favorite way to read a README file in the terminal

piker|6 months ago

Hey this looks really awesome. Super helpful for those of us who are building in the document space for debugging if nothing else. Here are a couple of other projects for you to develop with / on if you aren't already using them:

- https://github.com/mikeebowen/OOXML-Validator (if you plan on making edits, you'll want to ensure they're renderable by other Word users)

- https://marketplace.visualstudio.com/items?itemName=yuenm18.... (incredible VS code extension for debugging OOXML files)

One thing that will surprise a lot of users is how common old-style Word (.doc) files are still. For that you might consider integrating Antiword (https://github.com/grobian/antiword) if you can get comfortable with the licensing.

Be aware that styles play an important role in numbering that doesn't seem to be picked up here. So you'll want to apply the styles before calculating the numbering levels.

Over all really cool. Hit me up if you ever want to swap notes on Docx and Rust. My email is in my profile.

Keep it up!

xvilka|6 months ago

Instead of Antiword, maybe using LibreOffice parsers directly would solve the problem for parsing all kinds of the documents.

shazbotter|6 months ago

Installing something named "doxx" and executing it sounds like a top ten bad idea for computer users.

Needs a new name, or a certain percentage of the audience will nope out before you even get to explain what it does.

majkinetor|6 months ago

This looks great, I hope we will have releases for Windows soon. It really does going to my nerves to install MS Office on new machine, and recently I stopped doing that and use Office 365 free version to view and edit docs instead, which is way worst regarding efficiency and privacy, but at least I don't have it on my machine. Its a shame there is no stripped down version of Word that lets me just view docx files and do most basic editing and commenting, that can be installed with winget in seconds. I use markdown for everything, but in enterprise environment when I send markdown to people they convert it to Word and return it back...

BTW, 8 seconds to start Word? What kind of computer are you using? Word is not performance beast but its not that slow either.

jbgt|6 months ago

LibreOffice is a food alternative if you just want simple Word management.

Of course it's a big install on the other hand.

_def|6 months ago

Far tangent: does anyone else feel pressured when viewing a document in google docs and it's visible that a coworker is (or could) also viewing it, and seeing your cursor etc?

sjsdaiuasgdia|6 months ago

My favorite version of this is when someone is introduced to the idea that others can see when they select a range of text by seeing their selection show up on the view of the doc being presented to the video conf.

BrouteMinou|6 months ago

It looks fantastic! That's going into my toolbox that's for sure.

It's refreshing to see something that isn't another chatbot.

zipping1549|6 months ago

Great project. I love anything TUI.

Not so good of a name.

goku12|6 months ago

True on both accounts. Doxxing is a traumatic experience for those who have been at its receiving end. A good project like this shouldn't be marred by a name like that.

politelemon|6 months ago

It would be very nice if this were in a Docker image, so we don't need a go install.

aeve890|6 months ago

I dream for the day when I can get to do anything I want without leaving the terminal. Thank you for your service.

The criticism of the project name is on point though. Horrible for searching and probably a no-no in job machine.

snthpy|6 months ago

Wonderful! Thank you. Looking forward to trying this out.

Now can you do Excel next? I'm aware of [calamine](https://github.com/tafia/calamine) but that doesn't render as beautifully as doxx. Presumably a lot of the MS XML schema ontology is shared? Ideally you could just use some of their readers and add your UI flare.

Also really nice list of tools in your previous submissions. Awesome work!

i_am_proteus|6 months ago

I have noticed many nice projects built on Rust + ratatui - many thanks to the creators and mantainers.

joshka|6 months ago

It's always nice to hear public thanks. :)

porridgeraisin|6 months ago

Is there no image support? You can use the kitty image protocol or sixel to display them inline no?

3eb7988a1663|6 months ago

Can this interact with Track Changes at all? Reviews+Comments? Probably a rat's nest of complexity, but that is something which might interest me every once and a while.

The other thing which was not obvious - can you extract document metadata and/or hidden text elements?

g0ran|6 months ago

What an unfortunate name.

leephillips|6 months ago

Thanks for making this! It seems to work great, and will be convenient to have around.

My one feature request would be to remove, or provide a version without, the “AI” stuff.

greazy|6 months ago

Very cool project. I wish something like this for pdf files.

ivanjermakov|6 months ago

You can always use pandoc to convert pdf to md/plaintext and print it to console.

adultSwim|6 months ago

Thanks for making this tool. Plenty of us have similar use case to your own.

Is .docx edit support a possibility in the future?

firesteelrain|6 months ago

Can you use this to basically cat the output and then you can grep the docx?

pandoc can do this

w108bmg|6 months ago

Maybe? I don't use Pandoc directly (fantastic program, but I only use it thorugh Quarto and Rmarkdown), but something like `doxx document.docx --export text | grep "search term"` should work just like `cat`+`grep`, but with better table structure and no intermediate conversion needed like pandoc.

bishwos|6 months ago

Interesting project. How much time did it take to build the project?

angrydingo|6 months ago

very cool, just discovered glow so I would like to build something similar too :)

acedTrex|6 months ago

> claude.md in the repo

Very unfortunate

btbuildem|6 months ago

And why is that? Because the logs were not hand-hewn? Source code was not crafted by the honest, simple, hard-working indigenous peoples of... wherever?

If you read through that claude.md, it's a well-organized summary of the project, touching on design, architecture, enumerating the functionality implemented so far, future goals, and more. It makes for a pretty great onboarding document for collaborators, tbh.

Have jetpack, will fly.

w108bmg|6 months ago

What an ignorant comment! I've been developing (statistical) software for 10+ years! This project would've taken me 6+ months at least, but I've been able to take the idea + some scratch code to production in a weekend.

Hilift|6 months ago

> Working on servers over SSH, I constantly hit Word docs

What?

pylotlight|6 months ago

Install from source with git surely cannot be your only deployment plan here?

w108bmg|6 months ago

Just added a more comprehensive release with a lot more install options!