postdoc init


Creates a new project with example pages, layouts and tests.

Options:

  • --name <name> - the project's name and directory, which must not exist yet. Use . to set up the current directory, which has to be empty. Without this option, PostDoc asks for a name, or, when there's no terminal to ask in, as in CI or for an AI agent, stops with an error.
  • --template <template> - the template to start from. Only default is available.

The new project's package.json has start, build, preview and test scripts, and its AGENTS.md tells AI agents how to work on it and check their changes. Its CLAUDE.md imports it, for Claude Code.

The command exits with 1 when it can't create the project.

Example

sh
npx postdoc init --name my-docs