Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
31–37 of 37 posts
Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#32Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#33Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#34Is there a generalizable approach that you have found for finding ways to be more efficient with the models, or is it case-by-case?
That being said:
- every single command you write MUST have a help text. that help text should also tell agents what the easiest path forward it. for example, the locator system in this CLI relies on the positions on paragraphs. these can change after an edit. so I prompt in the help text to use batch edits.
- errors must be clearly marked. for example, if an agent is doing a replace, but the replace comes back with "0 edits made", that's an error. otherwise the agents carry on going on obliviously.
- a lot of the CLI tools decide to use JSON as the default output. I started out that way as well. for agents, that immediately means having to invoke jq or a similar other tool to get it to be understood. the weaker the model, the worse they do on that. I found that providing markdown with annotations beats JSON on most tasks.
- use image reading as a last resort. if it's possible to give the model the information it needs as text, it will do a better job working with it than it will thinking through an image. thus, for this CLI, i do have a render command, but explicitly prompt in the help texts to use it for things that are not obvious from the markdown like layout.
Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#35For A while I was expecting that MCP will dominate, but we seem to be going in the direction of CLI being more prevalent. Can’t wrap my mind around it.
Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#36Is there a generalizable approach that you have found for finding ways to be more efficient with the models, or is it case-by-case?
Re: Show HN: Docx-CLI: agents read/edit Word docs using 1/2 the time and tokens
#37I've done many custom low token output CLIs like this for my day job and it's something I expect to see much more of.
How would you compare that approach to spawning sub agents to operate high-token tools?
Generally, they will have to use more tokens to reach the same outcome, per some research: https://arxiv.org/abs/2604.02460