CLI reference

Every fiskil command — what it does, its flags, and when it runs automatically.

CLI reference

The fiskil CLI ships with @fiskil/docs — run it as npx fiskil inside your project. fiskil help prints a summary; this page is the complete reference.

CommandPurpose
init [dir]Scaffold a new site
devValidate, fetch specs, start the dev server
buildValidate, fetch specs, production build
startServe a production build
publishDeploy through the Fiskil platform
validate [file]Check docs.json
schema [--check]Write the editor IntelliSense schema
openapi fetch [--force]Download and validate OpenAPI specs
generateRegenerate the content collection
doctorCheck project layout

fiskil init [dir]

Scaffolds a complete site into dir (which must be empty): starter docs.json, example content, and the framework files the engine expects. Pins @fiskil/docs to the CLI's own version so the scaffold and engine never drift.

fiskil dev

validateopenapi fetch → dev server with hot reload. Extra arguments pass through to the underlying server (e.g. fiskil dev -p 4000).

fiskil build / fiskil start

build runs the same validate-and-fetch preflight, then produces a production build; start serves it. Publishing through the platform runs this same build server-side — a green local fiskil build is the best predictor of a green deploy.

fiskil publish

Uploads your source to the Fiskil platform, which builds and hosts it. The full workflow has its own page.

FlagEnv fallbackDefaultNotes
--tokenFISKIL_DOCS_TOKENRequired. Site tokens need no other flags
--platformFISKIL_DOCS_PLATFORM_URLRequired. Your platform endpoint
--sitefrom tokenRequired only with org-scoped tokens
--targetproductionproduction or preview

fiskil validate [file]

Validates docs.json (or another file) against the full rule set — including the cross-field rules JSON Schema can't express — and prints precise, pathed errors. Exit code 1 on failure, so it slots into CI.

fiskil schema [--check]

Writes docs.config.schema.json, which powers editor autocomplete via the $schema line in docs.json. --check exits non-zero if the committed schema is stale — add it to CI to keep IntelliSense honest.

fiskil openapi fetch [--force]

Downloads remote specs into public/openapi/_remote/ (skipping ones already cached unless --force), validates every spec — local and remote — as parseable OpenAPI with retries and backoff on flaky networks, and prunes cached files no longer referenced by your config.

fiskil generate

Regenerates the content collection from content/ (runs automatically on npm install). Reach for it when a freshly-pulled repo shows stale or missing pages.

fiskil doctor

Verifies the project layout: every framework file init created, the correct CSS import order in global.css, the presence of content/docs, and a generated collection. Run it after upgrading @fiskil/docs or when a build fails mysteriously — it names exactly what's missing.