gittydocsgittydocs

CLI

Scaffold, develop, build, and deploy with the gittydocs CLI.

The gittydocs CLI packages the docs app into a local workflow.

Install

Use npx (no install):

npx gittydocs@latest --help

Or install globally:

npm i -g gittydocs
gittydocs --help

Commands

gittydocs new [folder]

Create a new docs folder scaffold:

gittydocs new docs
cd docs
gittydocs dev docs

If you omit the folder, the CLI will prompt you for a name and scaffold type:

gittydocs new

For the fully customizable app (ejected):

gittydocs new docs --ejected
cd docs
bun install
bun run dev

gittydocs dev <GITTYDOCS_SOURCE>

Run the local dev server:

gittydocs dev ./docs

If ./docs/.env exists, it is loaded automatically (or use --env).

Hot reload is automatic for local sources. Edit .md/.mdx, gittydocs.jsonc, theme.css, or files in [static] or [images] and the browser refreshes.

When site.version references a local package.json or Cargo.toml, that manifest is watched too, even outside the docs folder. Cargo workspace manifests used for inherited versions are also watched. If a refresh fails because a manifest was removed or became invalid, the error identifies the path or field to fix; the watcher stays alive and retries when you fix or recreate it. An invalid manifest at initial startup must be fixed before starting the server.

For GitHub URLs, restart gittydocs dev to pull the latest content.

gittydocs build <GITTYDOCS_SOURCE>

Build a static site:

gittydocs build ./docs

Output defaults to dist/client (override with --out).

gittydocs deploy

Generate GitHub Actions workflow(s):

gittydocs deploy --ghpages

Commit the generated workflow(s) in .github/workflows/.

gittydocs recache

Clear the cached web runtime used by gittydocs dev/build:

gittydocs recache

This removes the current version's cached runtime. The next gittydocs dev/build recreates it. Use --all to clear every cached version.

Clearing the cache reloads the runtime bundled with the CLI you are running; it does not download unreleased features. If new component pages report missing components, check that your CLI includes those components, then restart after clearing its cache.

Preview changes in the Gittydocs repository

When developing Gittydocs itself, run bun run dev:docs (or bun run dev:web) from the repository root. Both preview docs/ using packages/web-runtime directly, so runtime edits are visible without refreshing a CLI cache. The gittydocs dev docs CLI command still uses its versioned cached runtime.

Requirements

gittydocs dev and gittydocs build require bun.