Usage
facet self-upgrade is an alias of the same command.
Examples
--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.
Flags
string
Pin to a specific version instead of latest.
boolean
Print the plan; do not modify any files.
Exit codes
What it does
Updates the runningfacet 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.
Install methods
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 theFACET_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
Three variables affect self-update —FACET_CLI_REGISTRY (npm registry for version lookup), FACET_DIR (where the curl-installed binary lives), and FACET_BIN_OVERRIDE (triggers the dev-mode refusal above). See the environment variables reference for details.
See also
- Environment variables —
FACET_CLI_REGISTRY,FACET_DIR, andFACET_BIN_OVERRIDEin full.