https://github.com/usebarekey/cli
Main CLI application for Barekey
https://github.com/usebarekey/cli
Last synced: 9 days ago
JSON representation
Main CLI application for Barekey
- Host: GitHub
- URL: https://github.com/usebarekey/cli
- Owner: usebarekey
- License: bsd-3-clause
- Created: 2026-03-05T13:25:27.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2026-03-14T15:56:33.000Z (4 months ago)
- Last Synced: 2026-03-15T02:34:11.674Z (4 months ago)
- Language: TypeScript
- Homepage: https://npmx.dev/package/@barekey/cli
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @barekey/cli
CLI for Barekey login, variable management, pull workflows, and SDK type generation.
## Install
```bash
npm install -g @barekey/cli
```
## Quickstart
```bash
barekey auth login
barekey auth whoami
```
Create `barekey.json`:
```json
{
"organization": "acme",
"project": "web",
"environment": "development"
}
```
Create and read a variable:
```bash
barekey env new DATABASE_URL "postgres://localhost:5432/app" --type string
barekey env get DATABASE_URL
```
Update it:
```bash
barekey env set DATABASE_URL "postgres://localhost:5432/app_v2"
```
Pull local files:
```bash
barekey env pull --out .env.local
barekey env pull --format json --out barekey.local.json
```
Generate SDK types:
```bash
barekey typegen
barekey typegen --watch
```
## Common commands
```bash
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
```bash
bun install
bun run build
bun run typecheck
bun test
```