logoalt Hacker News

d4rkp4tternyesterday at 12:32 PM2 repliesview on HN

Related, I often work with markdown docs (usually created via CLI agents like Claude Code) and need to collaborate with others in google docs, which is extremely markdown-unfriendly[1], so I built small quality-of-life CLI tools to convert Gdocs -> md and vice versa, called gdoc2md and md2gdoc:

https://pchalasani.github.io/claude-code-tools/integrations/...

They handle embedded images in both directions. There are similar gsheet2csv and csv2gsheet tools in the same repo.

Similar to the posted tool, there is a first time set up involving creating an app, that is documented above.

[1] in the sense there are multiple annoying clicks/steps to get a markdown doc to look good in Gdocs. You'd know the pain if you've tried it.


Replies

greymalikyesterday at 12:57 PM

Paste from markdown (Chrome only) works _really_ well for me. What are the extra steps you’re running into?

show 1 reply
ritzacoyesterday at 3:26 PM

interesting we have a very similar internal flow - we like working in markdown but our customers want to leave feedback in Google docs, so we also have an md -> gdoc tool. We don't do the reverse as we ask them to only leave comments/suggested changes and we apply those directly to the markdown and re-export.

I ran into similar issues as you for the image handling, and the work around I use is to use pandoc to convert to docx as a first step and then import that as a Google Doc using the API, as Google Docs seems to handle docx much better than markdown from what I've seen.