sealos-cli 1.1.1 → 1.1.3
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.
- package/README.md +10 -3
- package/dist/bin/cli.cjs +1347 -994
- package/dist/bin/cli.mjs +1347 -994
- package/dist/main.cjs +1347 -994
- package/dist/main.mjs +1347 -994
- package/package.json +1 -1
- package/src/commands/auth/index.ts +2 -2
- package/src/commands/auth/login.ts +1 -1
- package/src/commands/auth/logout.ts +21 -2
- package/src/commands/auth/whoami.ts +1 -1
- package/src/commands/database/index.ts +345 -30
- package/src/commands/devbox/index.ts +108 -24
- package/src/commands/template/index.ts +42 -14
- package/src/commands/workspace/index.ts +3 -3
- package/src/lib/auth.ts +17 -1
package/README.md
CHANGED
|
@@ -49,7 +49,9 @@ src/
|
|
|
49
49
|
|
|
50
50
|
### Output Formatting (`lib/output.ts`)
|
|
51
51
|
|
|
52
|
-
- JSON
|
|
52
|
+
- JSON is the default output for registered commands so agents and scripts can parse results reliably
|
|
53
|
+
- Table output is available with `-o table` / `--output table` for human inspection
|
|
54
|
+
- Plain text output is available only where explicitly documented, such as database logs with `-o plain`
|
|
53
55
|
- Colored terminal output using chalk
|
|
54
56
|
- Loading spinners using ora
|
|
55
57
|
- Table formatting using table
|
|
@@ -115,6 +117,7 @@ sealos-cli logout
|
|
|
115
117
|
|
|
116
118
|
```bash
|
|
117
119
|
# Deploy from the catalog
|
|
120
|
+
sealos-cli template deploy rybbit
|
|
118
121
|
sealos-cli template deploy perplexica --name my-app --set OPENAI_API_KEY=xxx
|
|
119
122
|
|
|
120
123
|
# Validate raw template YAML without creating resources
|
|
@@ -142,7 +145,7 @@ sealos-cli devbox create --name my-devbox --runtime next.js --cpu 2c --memory 4g
|
|
|
142
145
|
|
|
143
146
|
# List devboxes
|
|
144
147
|
sealos-cli devbox list
|
|
145
|
-
sealos-cli devbox list --output
|
|
148
|
+
sealos-cli devbox list --output table
|
|
146
149
|
|
|
147
150
|
# Get devbox details
|
|
148
151
|
sealos-cli devbox get my-devbox
|
|
@@ -200,10 +203,13 @@ sealos-cli database restart my-db
|
|
|
200
203
|
sealos-cli database backup my-db --name manual-backup
|
|
201
204
|
sealos-cli database backups my-db
|
|
202
205
|
sealos-cli database restore my-db --from manual-backup --name restored-db
|
|
206
|
+
sealos-cli database expose my-db
|
|
207
|
+
sealos-cli database unexpose my-db
|
|
203
208
|
sealos-cli database enable-public my-db
|
|
204
209
|
sealos-cli database disable-public my-db
|
|
205
210
|
sealos-cli database log-files <pod-name> --db-type postgresql --log-type runtimeLog
|
|
206
211
|
sealos-cli database logs <pod-name> --db-type postgresql --log-type runtimeLog --log-path /path/to/log
|
|
212
|
+
sealos-cli database logs <pod-name> --db-type postgresql --log-type runtimeLog --log-path /path/to/log -o plain
|
|
207
213
|
```
|
|
208
214
|
|
|
209
215
|
Implementation: `src/commands/database/index.ts`
|
|
@@ -225,7 +231,8 @@ The v1 command surface is limited to auth, workspace, template, database, and de
|
|
|
225
231
|
- TypeScript for type safety
|
|
226
232
|
- Shared utilities for common operations
|
|
227
233
|
- Consistent error handling
|
|
228
|
-
- JSON and
|
|
234
|
+
- JSON output by default for agent and automation use
|
|
235
|
+
- Optional table output with `-o table`
|
|
229
236
|
- Environment variable support
|
|
230
237
|
- Loading indicators for async operations
|
|
231
238
|
- Color-coded terminal output
|