peakwind
v0.0.6
Published
Official Peakwind CLI - Connect and interact with your Peakwind workspace from the terminal
Maintainers
Readme
Peakwind CLI
The official command-line interface for Peakwind.
Installation
# Using npm
npm install -g peakwind
# Using yarn
yarn global add peakwind
# Using pnpm
pnpm add -g peakwindUsage
# Get help
peakwind --help
# Login to your Peakwind account
peakwind auth login
# Logout from your Peakwind account
peakwind auth logout
# View your account information
peakwind auth whoami
# View your workspaces
peakwind workspaces
# Interactive secret management (recommended)
peakwind secret
# Get a specific secret
peakwind secret get DATABASE_URL
# List all secrets in a workspace
peakwind secret list
# List environment files
peakwind secret env list
# Download environment file
peakwind secret env get production.envCommands
peakwind auth login
Log in to your Peakwind account through a secure browser-based authentication flow.
peakwind auth logout
Log out from your current Peakwind session.
peakwind auth whoami
View your account information and current login status.
peakwind workspaces
View all workspaces you have access to.
Secret Management
The CLI provides powerful secret management with interactive workspace and project selection.
peakwind secret
Interactive secret management (recommended). When run without subcommands, it provides an intuitive menu to:
- Get individual secret values
- List all secrets with filtering
- Download environment files
- List environment files
# Start interactive secret management
peakwind secretpeakwind secret get [secretName]
Get a specific secret value. Supports interactive workspace and project selection.
# Interactive selection - prompts for workspace/project
peakwind secret get DATABASE_URL
# Skip workspace selection (if you know the workspace ID)
peakwind secret get DATABASE_URL -w workspace-123
# Filter by specific project
peakwind secret get API_KEY -w workspace-123 -p project-456Options:
-w, --workspace <id>: Workspace ID (skips interactive selection)-p, --project <id>: Filter by project ID
peakwind secret list
List all secrets in a workspace with filtering options.
# Interactive workspace/project selection
peakwind secret list
# List secrets for specific workspace
peakwind secret list -w workspace-123
# Filter by project
peakwind secret list -w workspace-123 -p project-456
# Show actual secret values (use with caution)
peakwind secret list --show-valuesOptions:
-w, --workspace <id>: Workspace ID (skips interactive selection)-p, --project <id>: Filter by project ID--show-values: Show actual secret values instead of masked values
Environment Files
Manage environment files (collections of secrets organized as .env files).
peakwind secret env list
List all environment files in a workspace.
# Interactive workspace/project selection
peakwind secret env list
# List for specific workspace
peakwind secret env list -w workspace-123
# Filter by project
peakwind secret env list -w workspace-123 -p project-456peakwind secret env get [fileName]
Download environment file content with all secret values resolved.
# Interactive file selection
peakwind secret env get
# Download specific file
peakwind secret env get production.env
# Save to custom location
peakwind secret env get production.env -o .env.production
# Output to stdout instead of file
peakwind secret env get development.env --stdoutOptions:
-w, --workspace <id>: Workspace ID (skips interactive selection)-o, --output <path>: Output file path (default:./{fileName}.env)--stdout: Output to stdout instead of saving to file
Interactive Experience
The CLI is designed with user experience in mind:
- Smart workspace detection: Automatically selects workspace if you only have one
- Arrow key navigation: Use arrow keys to select from lists
- Project filtering: Filter secrets by project or view workspace-level secrets
- Helpful prompts: Clear guidance for each step
- Secure by default: Secret values are masked in list views
- Overwrite protection: Confirms before overwriting existing files
Authentication
The CLI uses a secure browser-based OAuth flow for authentication:
- Run
peakwind auth login - Your browser opens to approve the CLI access
- Enter the provided code or click the direct link
- CLI receives secure token for API access
Your credentials are never directly handled by the CLI.
Examples
Common Workflows
# First time setup
peakwind auth login
peakwind workspaces
# Get a database connection string
peakwind secret get DATABASE_URL
# Download production environment variables
peakwind secret env get production.env -o .env
# List all secrets in a project
peakwind secret list -p my-project-id
# Interactive exploration
peakwind secretCI/CD Integration
# Non-interactive usage (requires workspace/project IDs)
peakwind secret get API_KEY -w $WORKSPACE_ID -p $PROJECT_ID
# Download env file for deployment
peakwind secret env get production.env --stdout > .envRequirements
- Node.js 18.0.0 or higher
Support
For issues, questions, or feedback:
- Visit our GitHub repository
- Email our support team at [email protected]
- Check our documentation
License
MIT © Peakwind
