@tsuga/cli 1.0.7 → 1.0.8

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 +80 -3
  2. package/dist/cli.js +40 -37
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -43,6 +43,33 @@ Show current configuration:
43
43
  tsuga config
44
44
  ```
45
45
 
46
+ ## Clusters
47
+
48
+ If your tenant has multiple clusters, you can target a specific one:
49
+
50
+ ```bash
51
+ # List clusters
52
+ tsuga cluster list
53
+
54
+ # Save the cluster you want to use by default
55
+ tsuga cluster use <cluster-id>
56
+
57
+ # Clear the saved cluster
58
+ tsuga cluster reset
59
+ ```
60
+
61
+ You can also override the cluster per-command:
62
+
63
+ ```bash
64
+ # Environment variable
65
+ export TSUGA_CLUSTER_ID=<cluster-id>
66
+
67
+ # CLI flag (highest priority)
68
+ tsuga --cluster <cluster-id> logs search
69
+ ```
70
+
71
+ Priority order: `--cluster` flag → `TSUGA_CLUSTER_ID` env var → saved config. If unset, the backend falls back to the first cluster.
72
+
46
73
  ## Defaults
47
74
 
48
75
  Telemetry commands have built-in defaults so you can omit common flags:
@@ -100,9 +127,13 @@ tsuga teams create -d '{"name": "Platform", "visibility": "public"}'
100
127
 
101
128
  ### Available resources
102
129
 
103
- `dashboards`, `ingestion-api-keys`, `monitors`, `notification-rules`, `notification-silences`, `retention-policies`, `routes`, `services`, `tag-policies`, `teams`
130
+ `cloud-resources`, `dashboards`, `ingestion-api-keys`, `monitors`, `notification-rules`, `notification-silences`, `quality-reports`, `retention-policies`, `routes`, `services`, `tag-policies`, `teams`
104
131
 
105
- > Note: `ingestion-api-keys` does not support `get <id>`.
132
+ > Notes:
133
+ >
134
+ > - `ingestion-api-keys` does not support `get <id>`.
135
+ > - `services` is read-only (`list`, `get`).
136
+ > - `cloud-resources` and `quality-reports` are read-only and only support `list`.
106
137
 
107
138
  ### Generating a request skeleton
108
139
 
@@ -166,6 +197,35 @@ tsuga logs search --from -1h --query 'level:ERROR'
166
197
  tsuga logs search --from 1704067200 --to 1704153600 --query 'service:api'
167
198
  ```
168
199
 
200
+ By default, the full JSON response is printed. Use `--fields` to project specific
201
+ dot-paths from each log, and `-o tsv|csv` for tabular output:
202
+
203
+ ```bash
204
+ # JSON projected to selected fields (preserves the {logs: [...]} envelope and nesting)
205
+ tsuga logs search --from -10m \
206
+ --fields timestamp,level,message,context.k8s.pod.name
207
+
208
+ # TSV with default columns: timestamp, level, message
209
+ tsuga logs search --from -10m --query 'level:ERROR' -o tsv
210
+
211
+ # CSV with custom columns
212
+ tsuga logs search --from -10m -o csv \
213
+ --fields timestamp,level,message,context.k8s.pod.name
214
+ ```
215
+
216
+ ### Log patterns
217
+
218
+ ```bash
219
+ # Group recent logs into patterns
220
+ tsuga logs patterns --from -1h --query 'level:ERROR'
221
+
222
+ # List new error patterns observed in the time range
223
+ tsuga logs new-error-patterns --from -24h --team my-team --service api --env prod
224
+
225
+ # List error patterns whose volume increased for a team
226
+ tsuga logs error-pattern-increases --from -24h --team my-team --env prod
227
+ ```
228
+
169
229
  ### Search traces
170
230
 
171
231
  ```bash
@@ -197,9 +257,26 @@ Use `--generate-skeleton` to get a template:
197
257
  tsuga aggregation scalar --generate-skeleton > query.json
198
258
  ```
199
259
 
260
+ ## Service graph
261
+
262
+ Inspect service dependency graphs:
263
+
264
+ ```bash
265
+ tsuga service-graph get <service-id> --from -1h --query 'env:prod'
266
+ ```
267
+
268
+ ## Documentation
269
+
270
+ Browse and search the Tsuga documentation:
271
+
272
+ ```bash
273
+ tsuga docs search 'log routes'
274
+ tsuga docs get getting-started/send-your-first-logs
275
+ ```
276
+
200
277
  ## Tips
201
278
 
202
- Output is always JSON, so you can pipe to `jq`:
279
+ Default output is JSON, so you can pipe to `jq`:
203
280
 
204
281
  ```bash
205
282
  tsuga dashboards list | jq '.[].name'