Overview
Supported public API reference for @crustjs/core.
These pages cover the @crustjs/core root API. For installation and a quick start, see the Core module.
Runtime API
| Export | Description |
|---|---|
Crust | Immutable, chainable command builder and invocation boundary |
defineCommand(name, config?, recipe) | Define a named, inert reusable command definition for .add() |
defineContext(name) | Start a fluent Context definition; .setup() returns its factory |
defineExtension(id) | Start an immutable fluent application-wide Extension definition |
defineExtension<MetaKeys>(id) | Start an Extension that requires root metadata keys |
defineExtensionId(id) | Mint a branded Extension identity from a non-empty, trimmed string |
defineFlag(name, definition) | Define one named flag, preserving its literal definition |
defineArg(name, definition) | Define one named positional argument |
CrustError | Structured framework error with stable codes and typed details |
resolveArtifactDir(name) | Absolute path of an artifact or crust.include directory at runtime |
contextSources | Symbol key on a ContextBag listing the Contexts it was built from; an adapter hook for integrations such as @crustjs/effect |
Types
See Types for command definitions, Command Snapshots, Command Action contexts, Contexts, Extensions, and error detail types. The utility intersections are MergeFlags and MergeContext.
Build- and render-time helpers live at @crustjs/core/tooling, not the package root. They move in
lockstep with first-party tooling. See the tooling subpath.