Skip to main content

Usage

facet self-update
facet self-upgrade is an alias of the same command.

What it does

Updates the running facet binary in place. Detects how the binary was installed — the curl installer, an npm / yarn / pnpm / bun global install, dev mode, or an unclassified location — and dispatches to the matching update mechanism for that path. Existing trust roots (the install script and the user’s package manager) handle download, integrity verification, and the binary swap.

Flags

FlagTypeDescription
--version <x.y.z>stringPin to a specific version instead of latest
--dry-runboolPrint the plan; do not modify any files
--helpboolShow command help

Examples

Update to the latest published version:
facet self-update
Pin to a specific version:
facet self-update --version 0.7.0
Preview the plan without changing anything:
facet self-update --dry-run
The --dry-run output reports the current and target versions, the detected install method, and the exact command that would run if you re-ran without --dry-run.

Install methods

Detected methodUpdate command
curl installerre-runs agentfacets.io/install (no PATH change)
npm globalnpm install -g agent-facets@<version>
yarn globalyarn global add agent-facets@<version>
pnpm globalpnpm add -g agent-facets@<version>
bun globalbun add -g agent-facets@<version>
unclassifiedfalls back to the curl installer + PATH warning
If the binary location can’t be classified, facet self-update falls back to the curl installer (which installs to ~/.facet/bin/facet) and warns if facet on your $PATH still resolves to a different binary after the install — so you can decide whether to remove the older copy or reorder your $PATH.

Dev mode

When the FACET_BIN_OVERRIDE environment variable is set (typical in a workspace shell where you’re testing changes via bun dev), facet self-update refuses with a clear stderr message and exits with code 1. This is intentional: when you’ve overridden which binary the launcher executes, you’ve taken control of binary placement — self-update has no business writing over the path you pointed it at. Unset FACET_BIN_OVERRIDE to update a real install.

Environment variables

VariablePurpose
FACET_CLI_REGISTRYOverride the npm registry used to look up the latest version
FACET_DIROverride the facet directory root (default ~/.facet); the curl bin lives at $FACET_DIR/bin/facet
FACET_BIN_OVERRIDEOverride which binary the launcher executes; setting this also refuses self-update

Exit codes

OutcomeCode
Successful update0
--dry-run (any state)0
Already up to date0
Dev-mode refusal1
Network error / malformed registry data1
Underlying installer or package manager…passes through that tool’s exit code