@turboops/cli 1.0.0-dev.580 → 1.0.0-dev.583

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +84 -66
  2. package/dist/index.js +800 -436
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TurboCLI
2
2
 
3
- Command line interface for TurboOps deployments.
3
+ Command line interface for TurboOps.
4
4
 
5
5
  ## Installation
6
6
 
@@ -17,7 +17,7 @@ npx @turboops/cli
17
17
  ### Authentication
18
18
 
19
19
  ```bash
20
- # Login interactively
20
+ # Login interactively (opens browser)
21
21
  turbo login
22
22
 
23
23
  # Login with token (for CI/CD)
@@ -37,100 +37,115 @@ turbo logout
37
37
  turbo init
38
38
 
39
39
  # Show current configuration
40
- turbo config
41
- ```
40
+ turbo config show
42
41
 
43
- ### Deployment
42
+ # Set configuration value
43
+ turbo config set project <slug>
44
44
 
45
- ```bash
46
- # Deploy to an environment
47
- turbo deploy production
48
- turbo deploy staging
49
- turbo deploy dev
45
+ # Get configuration value
46
+ turbo config get project
50
47
 
51
- # Deploy specific image
52
- turbo deploy production --image v1.2.3
48
+ # Clear configuration
49
+ turbo config clear --all
50
+ turbo config clear --token
51
+ turbo config clear --project
52
+ ```
53
53
 
54
- # Deploy without waiting
55
- turbo deploy production --no-wait
54
+ ### Status
56
55
 
57
- # Rollback to previous deployment
58
- turbo rollback production
56
+ ```bash
57
+ # Show status of all environments
58
+ turbo status
59
59
 
60
- # Rollback to specific deployment
61
- turbo rollback production --to <deployment-id>
60
+ # Show status of specific environment
61
+ turbo status production
62
62
  ```
63
63
 
64
- ### Container Management
64
+ ### Logs
65
65
 
66
66
  ```bash
67
- # Restart containers
68
- turbo restart production
67
+ # View logs
68
+ turbo logs production
69
69
 
70
- # Stop containers
71
- turbo stop production
70
+ # Follow logs (stream)
71
+ turbo logs production --follow
72
72
 
73
- # Start stopped containers
74
- turbo wake production
73
+ # Limit lines
74
+ turbo logs production --lines 50
75
75
 
76
- # Show status
77
- turbo status
78
- turbo status production
76
+ # Filter by service
77
+ turbo logs production --service api
79
78
  ```
80
79
 
81
- ### Environment Variables
80
+ ### Deployment (CI/CD)
82
81
 
83
- ```bash
84
- # List environment variables
85
- turbo env production
82
+ The deploy command is designed for CI/CD pipelines using Project Tokens.
86
83
 
87
- # Show secret values
88
- turbo env production --reveal
84
+ ```bash
85
+ # Trigger deployment and wait for completion (default)
86
+ turbo deploy production
89
87
 
90
- # Set variable
91
- turbo env production set API_KEY=secret123
88
+ # Deploy specific image tag
89
+ turbo deploy production --image my-app:v1.2.3
92
90
 
93
- # Set as secret
94
- turbo env production set API_KEY=secret123 --secret
91
+ # Deploy without waiting (fire-and-forget)
92
+ turbo deploy staging --no-wait
95
93
 
96
- # Remove variable
97
- turbo env production unset API_KEY
94
+ # Custom timeout (default: 10 minutes)
95
+ turbo deploy production --timeout 900000
98
96
  ```
99
97
 
100
- ### Logs
98
+ **Options:**
99
+
100
+ | Option | Description |
101
+ |--------|-------------|
102
+ | `-i, --image <tag>` | Docker image tag to deploy |
103
+ | `-w, --wait` | Wait for deployment to complete (default) |
104
+ | `--no-wait` | Do not wait for deployment to complete |
105
+ | `--timeout <ms>` | Timeout in milliseconds when waiting (default: 600000) |
106
+
107
+ **Note:** This command requires a Project Token with `deploy` permission. Set the token via `TURBOOPS_TOKEN` environment variable or `--token` flag.
108
+
109
+ ### Pipeline Management
110
+
111
+ Generate and manage CI/CD pipeline configurations.
101
112
 
102
113
  ```bash
103
- # View logs
104
- turbo logs production
114
+ # Generate pipeline interactively
115
+ turbo pipeline generate
105
116
 
106
- # Follow logs (stream)
107
- turbo logs production --follow
117
+ # Generate GitLab CI pipeline
118
+ turbo pipeline generate --type gitlab
108
119
 
109
- # Limit lines
110
- turbo logs production --lines 50
111
- ```
120
+ # Generate GitHub Actions pipeline
121
+ turbo pipeline generate --type github
112
122
 
113
- ## CI/CD Usage
123
+ # Force overwrite existing pipeline
124
+ turbo pipeline generate --type gitlab --force
114
125
 
115
- ### GitLab CI
126
+ # Custom output path
127
+ turbo pipeline generate --type gitlab --output ./ci/pipeline.yml
116
128
 
117
- ```yaml
118
- deploy:
119
- stage: deploy
120
- script:
121
- - npx @turboops/cli deploy production --wait
122
- environment:
123
- name: production
129
+ # Show required secrets
130
+ turbo pipeline secrets
131
+
132
+ # Show secrets for specific pipeline type
133
+ turbo pipeline secrets --type github
124
134
  ```
125
135
 
126
- ### GitHub Actions
136
+ **Options for `pipeline generate`:**
137
+
138
+ | Option | Description |
139
+ |--------|-------------|
140
+ | `-t, --type <type>` | Pipeline type: `gitlab` or `github` |
141
+ | `-f, --force` | Overwrite existing pipeline file |
142
+ | `-o, --output <path>` | Custom output path |
127
143
 
128
- ```yaml
129
- - name: Deploy
130
- run: npx @turboops/cli deploy production --wait
131
- env:
132
- TURBOOPS_TOKEN: ${{ secrets.TURBOOPS_TOKEN }}
133
- TURBOOPS_PROJECT: ${{ vars.TURBOOPS_PROJECT }}
144
+ ### Self-Update
145
+
146
+ ```bash
147
+ # Check for updates and show upgrade instructions
148
+ turbo self-update
134
149
  ```
135
150
 
136
151
  ## Environment Variables
@@ -146,7 +161,6 @@ deploy:
146
161
  ```bash
147
162
  --project <slug> Override project slug
148
163
  --token <token> Override API token
149
- --api <url> Override API URL
150
164
  --json Output as JSON
151
165
  --quiet Only show errors
152
166
  --verbose Show debug output
@@ -160,7 +174,11 @@ deploy:
160
174
  | 0 | Success |
161
175
  | 1 | General error |
162
176
  | 2 | Timeout |
163
- | 3 | Health check failed |
177
+ | 3 | Network error |
178
+ | 10 | Authentication error |
179
+ | 11 | Not found |
180
+ | 12 | API error |
181
+ | 20 | Validation error |
164
182
 
165
183
  ## License
166
184