Skip to content

Add a myst preview subcommand #2017

@agoose77

Description

@agoose77

Proposal

MyST provides a --headless argument to myst start that launches a live-updating content server. This feature makes it convenient to prototype changes to the MyST Theme, which can pull content from the content server.

Unfortunately, there is not a counterpart CLI invocation in the base MyST CLI that makes it easy to consume a --headless server's content and render it in the browser. This point was raised at the Scientific Python Dev Summit 2025, where @rossbar, @bsipocz, and @danielballan were exploring the solution space for non-Netlify PR previews. In order not to derail this issue with that context, I'll leave that discussion for another time.

I shared a "simple" Docker incantation to start the MyST Book Theme with a particular CDN (see here), but it would be nice to make this more elegant and built-in, e.g.

myst start --headless

myst preview http://localhost:3100

Right now, we don't expose the theme that was used to build the site. We might want to do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions