Codex / Claude Code solutions for Scrivener Multimarkdown/Latex Formatting and Editing

Hello. I have written several large books with Scrivener despite significant difficulty with layout and complexity. The flexibility and rich feature set available are blunted and penalized by the skill and time necessary to manage them. In the past, I wrote some largeish VBA projects and published some of the work on this forum. After working quite a bit with Codex and Claude Code on unrelated projects, I tried to manage a Scrivener NonFiction (Latex) book as if it were a software project, and the results are promising. Both Codex 5.1 and Opus 4.5 easily understood the file structure, could create new chapters and sections, and could read and edit the contents. Given Literature and Latte’s slow adoption of modern tools, e.g., generative AI, I think we should explore this topic and perhaps even create a new Community Forum Subcategory for discussing and developing tools to help manage large Scrivener projects.

1 Like

This is interesting!

But before asking more, I’ll point to this answer I got as a reminder about AI gen tools and Scrivener:

Anyways, I’m curious about what you did here: what did you feed to the tool and what did it produce for you exactly?

1 Like

Oof, a no thanks (although as a software engineer, it’s really interesting). I have… strong opinions (sorry!), and L&L have been pretty explicit about their plans not to integrate gen AI. IMO this is a very good and important thing. Is it even your book if gen AI was anywhere near it?

Just… yikes.

3 Likes

This sounds like it should be a disaster. I’m sure the LLM can understand the scrivx XML metadata and Scrivener’s project format is certainly well setup for automation already (UUIDs + folder hierarchy). But for example Scrivener uses non-standard RTF encoding markup for its documents and it seems surprising at the least that they could understand this as it certainly wouldn’t be in the training data (how many people keep scriv projects on github to be harvested for training?). I’m sure an MCP server for Scrivener’s project format would make this much more robust. But then how does it orchestrate compile, it needs a pretty deep spatial UI understanding across many dialogs? If it bypasses compile UI, then how to read the intent of the user, like I want to convert X style to a particular markup etc.

p.s. I am referring to using an LLM to help use Scrivener as software, not for content generation.

3 Likes

This seems like a good place to mention that the only supported tool for editing a Scrivener project is Scrivener itself, and the only supported interface to third party tools is via the Sync with External Folder mechanism. Any other manipulation of the structure or content of a Scrivener project – whether by a human or by software – is unsupported and entirely at your own risk.

5 Likes