Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 1.37 KB

File metadata and controls

80 lines (59 loc) · 1.37 KB

@barekey/cli

CLI for Barekey login, variable management, pull workflows, and SDK type generation.

Install

npm install -g @barekey/cli

Quickstart

barekey auth login
barekey auth whoami

Create barekey.json:

{
  "organization": "acme",
  "project": "web",
  "environment": "development"
}

Create and read a variable:

barekey env new DATABASE_URL "postgres://localhost:5432/app" --type string
barekey env get DATABASE_URL

Update it:

barekey env set DATABASE_URL "postgres://localhost:5432/app_v2"

Pull local files:

barekey env pull --out .env.local
barekey env pull --format json --out barekey.local.json

Generate SDK types:

barekey typegen
barekey typegen --watch

Common commands

barekey env list
barekey env get-many --names DATABASE_URL,REDIS_URL
barekey env new FEATURE_ENABLED true --type boolean
barekey env set PUBLIC_TITLE "Barekey Docs" --visibility public
barekey env set CHECKOUT_FLOW control --ab treatment --chance 0.5
barekey env delete FEATURE_ENABLED --yes

Notes

  • env new creates with an initial value.
  • env set is the upsert command.
  • get-many uses a comma-separated --names value.
  • Target resolution comes from flags, barekey.json, and the stored login org.

Development

bun install
bun run build
bun run typecheck
bun test