WritedocsWritedocs

Quickstart

Install

Install Writedocs globally, once, on your machine:

npm install -g writedocs

That’s it — no per-project dependency, no package.json needed in your docs folder at all. writedocs is now a command available in any folder you cd into. Prefer not to install anything? Every command below also works prefixed with npx instead (npx writedocs dev), which downloads and runs it on the fly without a global install.

Scaffold a project

cd my-docs   # any folder — new or existing
writedocs init

This creates writedocs.json and a starter docs/ folder (index.mdx and getting-started.mdx) in the current directory. Pass a path to scaffold somewhere else without cd-ing first: writedocs init ./my-docs.

Preview locally

writedocs dev

Run from inside your docs project’s own folder — the same one writedocs.json lives in. Starts a local dev server with hot reload. Open the printed URL (http://localhost:4321 by default) to see your site.

Ship it

writedocs dev is for writing and previewing — building the static site and deploying it is handled separately, not run by every contributor locally. Push your changes and it’s picked up from there.

Next steps