Skip to content

Installation

Use Node 26 and pnpm 12.23.0 when following these instructions. The package's minimum Node version is 22.13.

Install from a local package

The checked-in package version is 0.0.0. You can build a tarball and use it in another project without publishing it to npm.

From the Docskit repository root:

Shell
pnpm install --frozen-lockfile
pnpm pack:lib
node packages/docskit/bin/docskit.mjs init /path/to/project/docs

Replace /path/to/project/docs with the directory you want to create. init requires an empty directory and writes the starter config, content, and scripts.

Install the tarball in that new project. Replace /path/to/docskit with the location of this repository:

Shell
cd /path/to/project/docs
pnpm add /path/to/docskit/pinanek-docskit-0.0.0.tgz
pnpm dev

Open http://localhost:3000. The starter has a homepage, a documentation overview, and an installation page. Its package dependency is @pinanek/docskit.

Install a published version

When the package is available on npm, use the published CLI to create the same starter:

Shell
pnpm dlx @pinanek/docskit init docs
cd docs
pnpm install
pnpm dev

Set your site identity

Edit the name, description, and url fields in docskit.config.ts. Use your public origin for url, such as https://docs.example.com. The development server can still run locally; url supplies canonical and social metadata.

Run project commands from the directory containing docskit.config.ts:

CommandResult
pnpm devStart development, normally on port 3000
pnpm checkCheck configuration and TypeScript components
pnpm buildRender static pages and generate search in dist/
pnpm previewServe the completed production build

Use pnpm dev --port 3001 if port 3000 is occupied. Stop the server with Ctrl+C.

Next, write your first page and add it to the sidebar. For library development and workspace commands, use the contributor guide.