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.
| Command | Purpose |
|---|---|
init [dir] | Scaffold a new site |
dev | Validate, fetch specs, start the dev server |
build | Validate, fetch specs, production build |
start | Serve a production build |
publish | Deploy through the Fiskil platform |
validate [file] | Check docs.json |
schema [--check] | Write the editor IntelliSense schema |
openapi fetch [--force] | Download and validate OpenAPI specs |
generate | Regenerate the content collection |
doctor | Check 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
validate → openapi 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.
| Flag | Env fallback | Default | Notes |
|---|---|---|---|
--token | FISKIL_DOCS_TOKEN | — | Required. Site tokens need no other flags |
--platform | FISKIL_DOCS_PLATFORM_URL | — | Required. Your platform endpoint |
--site | — | from token | Required only with org-scoped tokens |
--target | — | production | production 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.