Klef docs

Installation

Install the Klef CLI with npm, or run it on demand with npx.

The Klef CLI is published to npm as @klefsh/cli. However you install it, the command you type is always klef.

The CLI is the primary way to use Klef: anything you can do in the web app, you can do here.

Requirements

  • Node.js 20 or newer. Check with node --version.
  • A Klef account. You create one the first time you run klef login.

Install globally

npm install -g @klefsh/cli
pnpm add -g @klefsh/cli
yarn global add @klefsh/cli
bun add -g @klefsh/cli

Verify the install:

klef --version
klef --help

Run without installing

If you would rather not install anything globally, run any command through npx:

npx @klefsh/cli --help
npx @klefsh/cli login

Updating

Re-run the global install to pick up the latest version:

npm install -g @klefsh/cli@latest

Getting help on any command

Every command accepts --help, which prints its description, arguments, and flags:

klef push --help
klef env create --help

Next step

With the CLI installed, head to the Quickstart to sign in and sync your first .env.

On this page