@turboops/cli
v1.0.95
Published
TurboCLI - Command line interface for TurboOps deployments
Maintainers
Readme
TurboCLI
Command line interface for TurboOps.
Installation
# Global installation
pnpm add -g @turboops/cli
# Or use with pnpm dlx
pnpm dlx @turboops/cliUsage
Authentication
# Login interactively (opens browser)
turbo login
# Login with token (for CI/CD)
turbo login --token <your-api-token>
# Check current user
turbo whoami
# Logout
turbo logoutProject Setup
# Initialize project in current directory
# Prompts for stage selection (dev, test, preview, prod)
turbo init
# Show current configuration
turbo config show
# Set configuration value
turbo config set project <slug>
# Get configuration value
turbo config get project
# Clear configuration
turbo config clear --all
turbo config clear --token
turbo config clear --projectStatus
# Show status of all environments
turbo status
# Show status of specific environment
turbo status productionLogs
# View logs
turbo logs production
# Follow logs (stream)
turbo logs production --follow
# Limit lines
turbo logs production --lines 50
# Filter by service
turbo logs production --service apiDeployment (CI/CD)
The deploy command is designed for CI/CD pipelines using Project Tokens.
# Trigger deployment and wait for completion (default)
turbo deploy production
# Deploy specific image tag
turbo deploy production --image my-app:v1.2.3
# Deploy without waiting (fire-and-forget)
turbo deploy staging --no-wait
# Custom timeout (default: 10 minutes)
turbo deploy production --timeout 900000Options:
| Option | Description |
| ------------------- | ------------------------------------------------------ |
| -i, --image <tag> | Docker image tag to deploy |
| -w, --wait | Wait for deployment to complete (default) |
| --no-wait | Do not wait for deployment to complete |
| --timeout <ms> | Timeout in milliseconds when waiting (default: 600000) |
Note: This command requires a Project Token with deploy permission. Set the token via TURBOOPS_TOKEN environment variable or --token flag.
Docker Setup
Generate Docker configuration (docker-compose.yml, Dockerfiles, .dockerignore) using AI.
# Generate Docker setup interactively
turbo docker generate
# Force overwrite existing Docker files
turbo docker generate --forceOptions for docker generate:
| Option | Description |
| ------------- | ------------------------------- |
| -f, --force | Overwrite existing Docker files |
Pipeline Management
Generate and manage CI/CD pipeline configurations.
# Generate pipeline interactively
turbo pipeline generate
# Generate GitLab CI pipeline
turbo pipeline generate --type gitlab
# Generate GitHub Actions pipeline
turbo pipeline generate --type github
# Force overwrite existing pipeline
turbo pipeline generate --type gitlab --force
# Custom output path
turbo pipeline generate --type gitlab --output ./ci/pipeline.yml
# Show required secrets
turbo pipeline secrets
# Show secrets for specific pipeline type
turbo pipeline secrets --type githubOptions for pipeline generate:
| Option | Description |
| --------------------- | ----------------------------------- |
| -t, --type <type> | Pipeline type: gitlab or github |
| -f, --force | Overwrite existing pipeline file |
| -o, --output <path> | Custom output path |
Self-Update
# Check for updates and show upgrade instructions
turbo self-updateEnvironment Variables
| Variable | Description |
| ------------------ | ------------------------------------------ |
| TURBOOPS_TOKEN | API token for authentication |
| TURBOOPS_PROJECT | Project slug |
| TURBOOPS_API_URL | API URL (default: https://api.turboops.io) |
Global Options
--project <slug> Override project slug
--token <token> Override API token
--json Output as JSON
--quiet Only show errors
--verbose Show debug output
--no-update-check Skip version checkExit Codes
| Code | Description | | ---- | -------------------- | | 0 | Success | | 1 | General error | | 2 | Timeout | | 3 | Network error | | 10 | Authentication error | | 11 | Not found | | 12 | API error | | 20 | Validation error |
License
MIT
