Install the CLI

Requirements, global install, running without installing, and upgrades.

6 sections1 min read

The Cefense CLI is a complete alternative to the workspace. Everything the workspace does against a real API route, this does too.

npm install -g @cefense-npm/cefense-cli

Requirements

  • Node 22.12 or newer. Check with node --version.
  • git on your PATH, so the CLI can work out which repository a directory belongs to.
  • macOS, Linux, Windows, or WSL.

Two binaries, one program

The package installs cefense and cf. They are the same binary. Every example in these docs uses the short one.

Verify the installbash
cf --version
cf --help

Running it without installing

npxbash
npx -p @cefense-npm/cefense-cli cf status

Upgrading

Upgradebash
npm install -g @cefense-npm/cefense-cli@latest
cf --version

The CLI checks the instance it talks to for a minimum supported version, and tells you when yours is too old rather than failing in a confusing way later.

Uninstalling

Remove itbash
npm uninstall -g @cefense-npm/cefense-cli
rm -rf ~/.cefense-cli

The second line removes the CLI's own data directory: your instance preference, per-directory repository links, and the credential fallback file if one was ever written. It does not sign you out of the system keychain, which cf auth logout does. See Configuration.

Next

Have a correction or need help?

Email the docs team