Docs / Configuration
v1.0.2Latest / April 2026

CLI Reference

Use the Gun CLI to check, build, watch, and inspect projects.

gun check

Validate an entrypoint:

gun check src/index.ts

Use it in pull requests and before dependency upgrades. It reports unsupported APIs, dynamic module patterns, and dependency issues before a full build.

gun transpile

Build an entrypoint into an output directory:

gun transpile src/index.ts -o build/gun

Common flags:

-o, --out <path>       Output directory
--source-maps          Write source maps

gun watch

Rebuild on file changes:

gun watch src/index.ts -o build/gun

Use watch mode locally. Use gun transpile from a clean checkout for release builds.

gun debug

Inspect how Gun sees a file or project:

gun debug src/index.ts

Use debug output when a compatibility error is unclear or a dependency behaves differently than expected.