CLI
Scaffold, develop, build, and deploy with the gittydocs CLI.
CLI
The gittydocs CLI packages the docs app into a local workflow.
Install
Use npx (no install):
npx gittydocs@latest --helpOr install globally:
npm i -g gittydocs
gittydocs --helpCommands
gittydocs new [folder]
Create a new docs folder scaffold:
gittydocs new docs
cd docs
gittydocs dev docsIf you omit the folder, the CLI will prompt you for a name and scaffold type:
gittydocs newFor the fully customizable app (ejected):
gittydocs new docs --ejected
cd docs
bun install
bun run devgittydocs dev <GITTYDOCS_SOURCE>
Run the local dev server:
gittydocs dev ./docsIf ./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.
For GitHub URLs, restart gittydocs dev to pull the latest content.
gittydocs build <GITTYDOCS_SOURCE>
Build a static site:
gittydocs build ./docsOutput defaults to dist/client (override with --out).
gittydocs deploy
Generate GitHub Actions workflow(s):
gittydocs deploy --ghpagesCommit the generated workflow(s) in .github/workflows/.
gittydocs recache
Clear the cached web runtime used by gittydocs dev/build:
gittydocs recacheThis removes the current version's cached runtime. The next gittydocs dev/build recreates it.
Use --all to clear every cached version.
Requirements
gittydocs dev and gittydocs build require bun.
