@r4security/cli
v0.0.1
Published
Official R4 CLI — manage vaults, projects, and secrets from the terminal
Downloads
47
Maintainers
Readme
r4-cli
Official R4 CLI -- manage vaults, projects, and secrets from the terminal.
Installation
npm install -g r4-cliRequires Node.js >= 18.0.0.
Commands
r4 auth
Manage API key authentication.
r4 auth login-- Configure API key credentialsr4 auth logout-- Remove stored credentialsr4 auth status-- Show current authentication state
r4 vault
Manage vault secrets.
r4 vault list-- List all vaults in the projectr4 vault get <name>-- Get a specific vault's secrets
r4 project
Manage projects.
r4 project list-- List all projectsr4 project get <id>-- Get project detailsr4 project create-- Create a new project
r4 run <command...>
Execute a command with vault secrets injected as environment variables.
r4 run --project-id abc123 node deploy.js
r4 run --prefix R4 -- docker compose upGlobal Options
| Flag | Description |
|--------------------|---------------------------------------------------|
| --api-key <key> | API key (overrides R4_API_KEY env var and config)|
| --project-id <id>| Project ID (overrides R4_PROJECT_ID env var) |
| --base-url <url> | API base URL (default: https://r4.dev) |
| --json | Output as JSON for scripting and piping |
Dependencies
Uses r4-sdk (workspace) under the hood for API communication. Built with Commander, Chalk, ora, and cli-table3.
Development
pnpm run build # Build with tsup
pnpm run dev # Watch mode
pnpm run clean # Remove lib/