DocgoDocgo
Latest

CLI

Commands for initializing, developing, building, and snapshotting Docgo documentation.

The docgo binary provides the project lifecycle commands.

npx docgo [command]

docgo init

Creates starter files in the current working directory.

npx @kyechan99/docgo init

The command is non-destructive by default. Existing files are skipped.

Generated files include:

  • docgo.config.mjs
  • head.html
  • public/favicon.png
  • public/logo.png
  • docs/index.mdx
  • starter guide pages under docs/guide

docgo dev

Starts the local development server.

npx docgo dev

Use this while editing:

  • markdown and MDX pages
  • docgo.config.mjs
  • head.html
  • theme/navigation settings
  • assets referenced from public

docgo build

Builds the static site.

npx docgo build

The build command:

  1. Loads and resolves docgo.config.mjs.
  2. Removes the output directory.
  3. Copies public assets.
  4. Builds the client bundle.
  5. Renders every .md and .mdx page to HTML.
  6. Emits markdown mirrors for page actions and AI tools.
  7. Writes the search index when enabled.
  8. Writes SEO files when enabled.

docgo version <name>

Snapshots the current default version into a named version folder.

npx docgo version v1

If the default version is latest, this copies:

snapshot output
docs/en/latest -> docs/en/v1
docs/ko/latest -> docs/ko/v1

The command refuses to overwrite an existing target folder and does not edit docgo.config.mjs. Add the version to config manually:

versioning: {
  defaultVersion: 'latest',
  versions: [
    { code: 'latest', label: 'Latest' },
    { code: 'v1', label: 'v1' },
  ],
}

Unknown commands

Unknown commands exit with usage information:

Usage: docgo [build|dev|init|version <name>]
Edit this page

Last updated: