Countless tools exist to create a google doc from markdown. A few tools exist to edit google docs - but they are very limited. Either they replace the entire google doc - losing comments, formatting, images, colours or anything else that you added that markdown doesn't support. Or they are so limited that they only allow find-and-replace, or perhaps limited operations.
The core problem is that google docs' only provides a single API called batchUpdate. This is really painful to use - because the underlying model uses indexes - and it is very painful to keep track of indexes as you update the google docs.
Tools like gws and gogcli technically support batchUpdate. But because the underyling API is so painful - the agent / LLM cannot do anything more than basic updates.
My team uses google docs extensively. And these documents have their own life. Team members leave comments / feedback. Others perhaps apply formatting. Different people contribute to the document - that is the whole point of using google docs. In such a scenario, the agent must be able to play along well - it cannot mess up the document for others.
`extrasuite docs pull <url> <folder>` downloads the google docs and saves it as markdown files, one per tab in the google doc. It also saves a `comments.xml` - so that the agent can address your comments / feedback.
The agent then edits the markdown files. No special instructions - it knows how to edit markdown files. These can be simple edits, complex rewrites, adding new files, creating tables, adding images or anything that github flavoured markdown allows.
`extrasuite docs push <folder>` - then figures out what the agent changed by comparing locally. This is markdown to markdown diff. Then it figures out how to appy those exact changes to google docs and ultimately reconciles the google doc to match the markdown
ExtraSuite makes a few guarantees:
- It won't mess up formatting, images, headers/footers, styles, colours etc. They will continue to work properly
- In general, anything that cannot be represented in markdown won't be touched in the write process.
ExtraSuite has several other features:
- Leave comments in the document and ask your agent to work on them.
- Full support for tables, images, code blocks, and github flavoured markdown.
If you have either of gws or gogcli installed, you can directly start using extrasuite without any setup.
Our teams have been using this for several months now, and happy to answer any questions about it. Would love your feedback!
ksri•1h ago
The core problem is that google docs' only provides a single API called batchUpdate. This is really painful to use - because the underlying model uses indexes - and it is very painful to keep track of indexes as you update the google docs.
Tools like gws and gogcli technically support batchUpdate. But because the underyling API is so painful - the agent / LLM cannot do anything more than basic updates.
My team uses google docs extensively. And these documents have their own life. Team members leave comments / feedback. Others perhaps apply formatting. Different people contribute to the document - that is the whole point of using google docs. In such a scenario, the agent must be able to play along well - it cannot mess up the document for others.
To solve these problems, I have been working on a CLI tool - ExtraSuite. See https://github.com/think41/extrasuite
The core workflow is just two commands:
`extrasuite docs pull <url> <folder>` downloads the google docs and saves it as markdown files, one per tab in the google doc. It also saves a `comments.xml` - so that the agent can address your comments / feedback.
The agent then edits the markdown files. No special instructions - it knows how to edit markdown files. These can be simple edits, complex rewrites, adding new files, creating tables, adding images or anything that github flavoured markdown allows.
`extrasuite docs push <folder>` - then figures out what the agent changed by comparing locally. This is markdown to markdown diff. Then it figures out how to appy those exact changes to google docs and ultimately reconciles the google doc to match the markdown
ExtraSuite makes a few guarantees:
- It won't mess up formatting, images, headers/footers, styles, colours etc. They will continue to work properly - In general, anything that cannot be represented in markdown won't be touched in the write process.
ExtraSuite has several other features: - Leave comments in the document and ask your agent to work on them. - Full support for tables, images, code blocks, and github flavoured markdown.
If you have either of gws or gogcli installed, you can directly start using extrasuite without any setup.
Our teams have been using this for several months now, and happy to answer any questions about it. Would love your feedback!