Skip to main content
Reference for every Forge CLI command in v0.1. Every command reads kairo.toml from the current working directory unless a path is provided.

Global flags

forge restore

Resolve dependencies and write forge.lock. Usage
Behavior
  1. Parse kairo.toml.
  2. Resolve every dependency to a concrete version.
  3. Fetch package metadata from configured registries.
  4. Write forge.lock.

forge check

Parse, resolve names, and type-check without producing artifacts. Usage
Behavior
  • Reads the manifest and lock file.
  • Runs Forge’s semantic front-end.
  • Emits diagnostics for every problem found.
  • Does not write artifacts.
forge check is the fastest feedback loop. Run it while iterating.

forge build

Compile the package to an artifact. Usage
Behavior
  • Requires a valid forge.lock.
  • Runs check implicitly.
  • Emits build artifacts under the package’s build output folder.

forge test

Run tests declared under tests/. Usage
Behavior
  • Builds the test target.
  • Executes each test.
  • Emits a summary of pass/fail counts and diagnostic detail on failure.

forge package

Produce a distributable library artifact. Usage
Behavior
  • Requires kind = "library" in kairo.toml.
  • Builds the library and produces a distributable artifact suitable for forge publish.

forge publish

Publish a package to its configured registry. Usage
Behavior
  • Reads [publish].registry from kairo.toml.
  • Publishes the package to the target registry.
  • Registry authentication and protocol details are managed by external Forge configuration.
The full dependency registry protocol is deferred in v0.1. Publish semantics may evolve as the protocol is ratified.

forge clean

Remove build outputs. Usage
Behavior
  • Deletes generated build outputs and intermediate files.
  • Does not delete forge.lock or kairo.toml.

Exit codes

Diagnostic codes

Forge emits structured diagnostics with a stable code, a source location, and a message. Codes are prefixed by the phase that produced them: See the Command Catalog for the code assigned to each construct.

Forge overview

Where Forge fits in the toolchain.

Pulse Runtime reference

Running the artifacts Forge produces.