@clickzetta/cz-cli-darwin-x64 0.3.67 → 0.3.69

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/bin/cz-cli CHANGED
Binary file
@@ -1,187 +1,274 @@
1
1
  ---
2
2
  name: cz-cli
3
- description: "Route ALL ClickZetta Lakehouse operations to cz-cli: SQL, Studio tasks, tables, pipelines, profiles. Use when user mentions ClickZetta, Lakehouse, cz-cli, or needs profile/connection configuration."
3
+ description: "CLI tool for ClickZetta Lakehouse. Use this skill when the user needs to run SQL queries, develop or schedule Studio tasks, check run status and logs, or manage tables and schemas."
4
+ generated_cli_version: "0.0.0-dev+202605250308"
5
+ generated_with: "cz-cli-skill-generator/1.0.0"
6
+ command_inventory_source: "click-command-tree"
7
+ command_count: 51
4
8
  ---
5
9
 
6
- # cz-cli — ClickZetta Lakehouse Subagent
10
+ # cz-cli Skill
7
11
 
8
- You have no direct Lakehouse access. Always delegate via cz-cli.
12
+ > [!IMPORTANT]
13
+ > **Fallback**: If `cz-cli` command not present, check for a bundled binary at `scripts/<platform>/cz-cli` (e.g. `scripts/macos-arm64/cz-cli`, `scripts/linux-x86_64/cz-cli`, `scripts/windows-x86_64/cz-cli.exe`). If found, use its absolute path directly. Otherwise run `pip3 install cz-cli -U` then use `cz-cli` from PATH.
9
14
 
10
- ## Capabilities
15
+ ## AI Agent Behavior Rules
11
16
 
12
- ### SQL & Data Operations
13
- - Execute any SQL against Lakehouse: SELECT, DDL (CREATE/ALTER/DROP TABLE, SCHEMA, VIEW), DML (INSERT, UPDATE, DELETE, MERGE INTO)
14
- - Run async jobs and fetch results
15
- - Preview table data and row counts
17
+ > [!IMPORTANT]
18
+ > Read these rules before invoking any command.
16
19
 
17
- ### Table & Schema Management
18
- - List, describe, create, and drop tables and schemas
19
- - View table history, indexes, partitions, and statistics
20
- - Add or update column/table comments
21
- - Create Dynamic Tables for auto-incremental ETL (ODS→DWD→DWS pipelines)
22
- - Create Materialized Views for pre-computed aggregations
23
- - Create Table Streams to capture INSERT/UPDATE/DELETE changes for CDC UPSERT
20
+ ### Rule 0 Initialize connection profile before first use
24
21
 
25
- ### Studio Task Management
26
- - Create, configure, deploy, and delete Studio tasks (SQL, Shell, Python, integration, flow)
27
- - Save task content and cron schedule
28
- - Deploy, undeploy, and execute tasks ad-hoc
29
- - Monitor run instances: list, detail, wait, logs, stop, rerun, backfill
30
- - View run statistics and dependencies
22
+ When any command returns error code `NO_PROFILE`, run `cz-cli setup --credential <base64>` if the credential string is available, or read `references/profile-setup.md` and follow the onboarding steps there. Always use the **AskUserQuestion tool** — never ask via plain text.
31
23
 
32
- ### Data Sync Pipelines
33
- - Create single-table realtime CDC sync tasks (MySQL/PostgreSQL/SQL Server → Lakehouse, task_type=28)
34
- - Create multi-table or whole-database CDC sync tasks — mirror, merge, or sharded-table consolidation (task_type=281)
35
- - Create offline batch sync tasks with Cron scheduling — single-table (task_type=10) or multi-table (task_type=291)
36
- - Manage sync task lifecycle: start, stop, offline, backfill, add tables, re-sync individual tables
24
+ ### Rule 1 — Clarify intent before any state-changing operation
37
25
 
38
- ### Data Ingestion Pipelines
39
- - Create continuous OSS/S3/COS ingest PIPE (LIST_PURGE scan mode or EVENT_NOTIFICATION mode)
40
- - Create continuous Kafka ingest PIPE using READ_KAFKA function
41
- - One-shot file import from URL, local path, or Volume (COPY INTO)
42
- - Manage PIPE lifecycle: pause, resume, adjust batch interval, view load history
26
+ When a task involves an operation that changes system state (publishing a schedule, taking a task offline, triggering a run, deleting an object, etc.):
43
27
 
44
- ### Data Recovery
45
- - Query data at a historical point in time (Time Travel: TIMESTAMP AS OF)
46
- - Roll back a table to a previous version (RESTORE TABLE)
47
- - Recover accidentally dropped tables, dynamic tables, or materialized views (UNDROP TABLE)
48
- - Inspect change history (DESC HISTORY) and deleted objects (SHOW TABLES HISTORY)
49
- - Configure retention: data_retention_days, data_lifecycle
28
+ **Do NOT proceed without** explicitly understanding the user's intent on all three points:
29
+ 1. **Target**: Which task / table / run instance?
30
+ 2. **Purpose**: Why does this need to happen now?
31
+ 3. **Side-effect acknowledgment**: Does the user understand the impact (historical re-runs, schedule interruption, permanent deletion, etc.)?
50
32
 
51
- ### Connection & Environment Management
52
- - Create, update, delete, and switch connection profiles (multi-cloud, multi-region)
53
- - Check connection status and switch workspace
54
- - List and test external data sources, browse catalogs and objects
55
- - Generate Python SDK / ZettaPark / SQLAlchemy / JDBC connection code from profile parameters
33
+ Use the **AskUserQuestion tool** (not plain text) to confirm with the user, then wait for an explicit reply before executing.
56
34
 
57
- ## Route to cz-cli
35
+ Consult **Command Risk Reference** below to determine whether a command qualifies as state-changing.
58
36
 
59
- - Any mention of cz-cli, ClickZetta, or Lakehouse
60
- - SQL against Lakehouse (SELECT, DDL, DML)
61
- - Studio task development, scheduling, monitoring
62
- - Data pipelines (sync, import, CDC, streaming)
63
- - Profile and connection configuration
64
- - Performance analysis and optimization
65
37
 
66
- ## Keep in host agent
38
+ ### Rule 2 Route to companion skill BEFORE acting (MUST)
67
39
 
68
- - General programming unrelated to ClickZetta
69
- - Local file operations, git
70
- - Non-ClickZetta databases (PostgreSQL, MySQL standalone)
40
+ > [!IMPORTANT]
41
+ > Check this routing table **before** executing any command or writing any code.
42
+ > If the user intent matches a trigger below, **MUST** invoke the listed skill immediately and stop processing in cz-cli.
71
43
 
72
- ## Execution strategy
44
+ The following companion skills are bundled with `cz-cli`:
73
45
 
74
- **MANDATORY: Follow this order every time. No exceptions.**
46
+ - **lakehouse-python-sdk** — Lakehouse Python/Shell task engineering: develop, rewrite, optimize, troubleshoot. Covers connector, BulkLoad, IGS, Studio params, datasource, and CREATE TABLE DDL; MUST trigger on: develop/write/create/modify/rewrite/optimize Python or Shell task; BulkLoad batch upload; IGS realtime ingest; connector query/write; Python task error/diagnosis; CREATE TABLE / partition / bucket / index DDL.
47
+ - **lakehouse-doc** — ClickZetta Lakehouse official documentation. Covers SQL syntax, data types, functions, DDL/DML commands, dynamic tables, materialized views, access control, VCluster, data lake, AI functions, etc. When the user writes or asks about SQL syntax or Lakehouse dialect specifics, **MUST** consult lakehouse-doc skill references first to ensure accuracy.
75
48
 
76
- **Step 1 MUST check LLM first:**
49
+ **If no row matches**: proceed with cz-cli commands directly.
77
50
 
78
- ```bash
79
- cz-cli agent llm show
80
- ```
81
-
82
- **Step 2 — If active LLM is configured (kind != "none"), you MUST use agent run:**
83
-
84
- ```bash
85
- cz-cli agent run "<request>" --format a2a --dangerously-skip-permissions
86
- ```
87
-
88
- Do NOT use direct cz-cli subcommands when an active LLM is available. Always delegate the full request to `cz-cli agent run`.
89
-
90
- **Step 3 — ONLY if no active LLM (kind: "none" or empty list), fall back to direct commands:**
51
+ ### Rule 2.1 — MUST consult lakehouse-doc skill for SQL commands
91
52
 
92
- Decompose the request into concrete `cz-cli` subcommands (`sql`, `schema`, `table`, `task`, `runs`, `job`, `datasource`, `profile`, etc.), execute them, and synthesize the result.
53
+ When the user request involves any of the following, **MUST** consult **lakehouse-doc** skill references before answering or generating SQL:
93
54
 
94
- Use direct commands for local setup and diagnostics even when agent path is available: `cz-cli profile ...`, `cz-cli -p <profile> status`, `cz-cli agent llm ...`, `cz-cli --help`.
55
+ - Writing, modifying, or optimizing SQL statements (DDL / DML / DQL)
56
+ - Asking about ClickZetta Lakehouse SQL dialect syntax, keywords, or function usage
57
+ - Using data types, type casting, or datetime formats
58
+ - Creating or altering tables, views, materialized views, dynamic tables, external tables
59
+ - Data import/export (COPY INTO, PUT/GET, BulkLoad, Pipe)
60
+ - Access control (GRANT / REVOKE), roles, permissions
61
+ - VCluster configuration and management
62
+ - Index creation and usage (inverted index, BloomFilter, vector index)
63
+ - AI functions, vector search, semantic views
64
+ - Information Schema system view queries
95
65
 
96
- With session continuity:
97
-
98
- ```bash
99
- cz-cli agent run "<request>" --format a2a --dangerously-skip-permissions --session <session_id>
100
- ```
66
+ **Rationale**: ClickZetta Lakehouse SQL dialect differs from standard SQL and other databases. Relying on general knowledge may produce incorrect syntax. Consulting lakehouse-doc significantly improves answer accuracy and confidence.
101
67
 
102
- Reuse `session_id` for follow-ups on the same topic. Omit `--session` to start fresh.
68
+ ### Rule 3 Development ends at save; execution requires separate authorization
103
69
 
104
- ## Multi-environment (profiles)
70
+ When the user says "develop", "write", "create", or "modify" a task, the work is **complete once the script is saved successfully**.
71
+ After saving, tell the user: "The task has been saved as a draft. Scheduling is not yet active. Let me know explicitly if you want to publish or execute it."
105
72
 
106
- When the user specifies an environment or profile (e.g. "use uat_test", "on the test instance"):
73
+ **Do NOT** auto-publish, auto-trigger execution, or auto-submit a backfill after saving — even if those steps seem like the logical next thing. Every phase that produces a real side effect requires the user to express intent and grant authorization separately.
107
74
 
108
- ```bash
109
- cz-cli agent run "<request>" --profile uat_test --format a2a --dangerously-skip-permissions
110
- ```
75
+ **Exception**: If the user's original request *explicitly* authorized all subsequent steps (e.g. "create and immediately go live", "develop and run it now"), AND Rule 1 already confirmed that intent at the start, the Agent may proceed through the authorized steps without stopping again at each phase. Do not re-ask for confirmation that was already given.
111
76
 
112
- Available profiles: read `~/.clickzetta/profiles.toml` or run `cz-cli profile list`.
77
+ ### Rule 3.1 补数/回填/重跑历史数据 `runs refill` (NOT `task`)
113
78
 
114
- ## Adding a new profile
79
+ When the user says "补数", "回填", "重跑历史", "backfill", "re-run historical", or "re-process date range":
80
+ - **MUST** use `cz-cli runs refill <task> --from YYYY-MM-DD --to YYYY-MM-DD [-y]`
81
+ - This command is under `runs`, **NOT** under `task` — do not look for it in task subcommands
82
+ - Requires the task to already be published (online); draft tasks cannot be backfilled
115
83
 
116
- **Trigger conditions:** User says "configure new environment", "add profile", "can't connect", mentions an unknown profile name, or provides connection credentials.
84
+ ### Rule 4 Paginated results are not complete data
117
85
 
118
- ### Step 1 — Collect information (guided Q&A)
86
+ All `list` commands return only page 1 by default (typically 10 items). The `ai_message` field in the response contains the total count and the command to fetch the next page treat it as the authoritative next-step hint and follow it. Never treat a first-page result as the full dataset.
119
87
 
120
- If all required fields are already provided, skip directly to Step 2.
88
+ **Pagination termination rules**:
89
+ - If the user only needs "latest / recent N items": stop after page 1, do not paginate.
90
+ - If the user needs the full dataset: paginate until `ai_message` no longer contains a next-page hint.
91
+ - **Safety limit**: auto-paginate at most **3 pages** (≈ 30 items). If more exist, surface the next-page command to the user and ask whether to continue.
121
92
 
122
- Otherwise, ask for missing ones. Accept all at once or prompt one by one.
93
+ ### Rule 5 Always pass explicit task type when creating tasks
123
94
 
124
- **Required fields:**
95
+ When creating a task with `cz-cli task create`, **always** pass `--type` explicitly (`SQL` / `PYTHON` / `SHELL` / `SPARK` / `FLOW`).
96
+ The Python SDK(connector/igs/bulkload) is using from clickzetta import connect instead of Zettapark's session.
125
97
 
126
- | Field | Question to ask | Example |
127
- |-------|----------------|---------|
128
- | `service` | Which cloud region? (see table below, or provide the service endpoint directly) | `cn-shanghai-alicloud.api.clickzetta.com` |
129
- | `instance` | What is the instance name? | `billingsh` |
130
- | `workspace` | What is the workspace name? | `meter_n_bill` |
131
- | `username` | What is the username? | `billing_admin` |
132
- | `password` | What is the password? | — |
133
- | `name` | What should this profile be named? (suggested format below) | `billingsh` |
98
+ - **MUST NOT** rely on default task type.
99
+ - If user intent says “Python task”, command must include `--type PYTHON`.
100
+ - If `--type FLOW`, immediately switch to Rule 6 use Flow-specific commands exclusively.
134
101
 
135
- **Common service endpoints (offer as options):**
102
+ ### Rule 6 Flow nodes use Flow-specific tools exclusively
136
103
 
137
- | Region | service | Suggested profile prefix |
138
- |--------|---------|--------------------------|
139
- | Alibaba Cloud East China 2 (Shanghai) | `cn-shanghai-alicloud.api.clickzetta.com` | `cn-shanghai` |
140
- | Tencent Cloud East China (Shanghai) | `ap-shanghai-tencentcloud.api.clickzetta.com` | `ap-shanghai` |
141
- | Tencent Cloud North China (Beijing) | `ap-beijing-tencentcloud.api.clickzetta.com` | `ap-beijing` |
142
- | Tencent Cloud South China (Guangzhou) | `ap-guangzhou-tencentcloud.api.clickzetta.com` | `ap-guangzhou` |
143
- | AWS China (Beijing) | `cn-north-1-aws.api.clickzetta.com` | `cn-north-1` |
104
+ When the operation target is a Flow task or any of its child nodes (`task_type=500`, or user mentions "composite task / flow / workflow"):
144
105
 
145
- **Inference rules (reduce unnecessary questions):**
146
- - If the user describes a cloud region in natural language (e.g. "Alibaba Cloud Shanghai", "Tencent Cloud Beijing", "阿里云上海", "腾讯云北京"), look up the service endpoint from the table above do NOT ask the user to provide it again.
147
- - If the user hasn't provided a profile name, suggest `<prefix>-<instance>` using the prefix from the table (e.g. `cn-shanghai-billingsh`). Confirm with the user or proceed if they don't object.
106
+ - **MUST** use Flow-specific commands: `task flow node-detail`, `task flow node-save`, `task flow node-save-config`, `task flow bind`, `task flow submit`, etc.
107
+ - **MUST NOT** use `task save`, `task save-config`, `task detail`, or `task online` on Flow child nodes these tools are for regular (non-Flow) tasks only and will produce incorrect results or errors.
108
+ - **Decision rule**: if `task_type == 500` OR the user mentions flow/workflow context use `task flow *` commands unconditionally.
148
109
 
149
- ### Step 2Create profile
110
+ ### Rule 7Always display studio_url in final report
150
111
 
151
- Run `cz-cli profile create` with all collected fields:
112
+ Responses from `task`, `runs`, and `executions` commands may include a `studio_url` field. When present, surface it in the end to the user so they can open the resource directly in Studio.
152
113
 
153
- ```bash
154
- cz-cli profile create <name> \
155
- --username <username> \
156
- --password <password> \
157
- --instance <instance> \
158
- --workspace <workspace> \
159
- --service <service> \
160
- --schema public \
161
- --vcluster default
162
- ```
114
+ Display as a Markdown hyperlink: `[View in Studio](https://...)`. Show all studio_url values returned across all commands in the same response — do not deduplicate.
163
115
 
164
- ### Step 3Verify connection
116
+ ### Rule 8Maximize execution efficiency: parallel and chained commands
165
117
 
166
- After creating, run:
118
+ **Independent commands → parallel. Dependent commands → chain with `--field`.**
167
119
 
168
120
  ```bash
169
- cz-cli status --profile <name>
170
- ```
171
-
172
- A successful response looks like:
173
- ```json
174
- {"data": {"connected": true, "workspace": "...", "time_ms": ...}}
175
- ```
176
-
177
- If it fails, report the error and ask the user to double-check credentials or service endpoint.
178
-
179
- ## Error handling
121
+ # Async SQL: submit → poll → fetch result → preview first rows
122
+ JOB=$(cz-cli sql "SELECT * FROM orders LIMIT 100" --field job_id) && cz-cli job status $JOB --format toon && cz-cli job result $JOB --format toon | head -12
180
123
 
181
- All errors in non-TTY mode output JSON to stdout:
124
+ # Parallel: two independent lookups at the same time
125
+ cz-cli task content my_task --format toon & cz-cli runs list --task my_task --format toon & wait
182
126
 
183
- ```json
184
- {"ok": false, "error": "NO_PROFILE", "next_steps": ["cz-cli setup --credential <base64>"]}
127
+ # Chain: save then verify
128
+ cz-cli task save-content my_task --file script.sql && cz-cli task content my_task --format toon
185
129
  ```
186
130
 
187
- On `NO_PROFILE` error: check if a profile can be configured via username/password (see "Adding a new profile" above). If the user has a base64 credential instead, guide them to run `cz-cli setup --credential <base64>`. See `references/profile-setup.md`.
131
+ Key tools:
132
+ - `--field <name>` — extract one value as raw text: `cz-cli sql "..." --field job_id` → `2026042818122957849079780`
133
+ - `--format toon` — line-per-field output, works with `grep`/`head`
134
+ - `--format json` — single-line JSON, parse in code only (do NOT pipe to grep/head)
135
+
136
+ **Shortcut**: Use `cz-cli sql --sync "..." > /tmp/res.json` to force synchronous execution (waits for results inline). Prefer `--sync` for simple/fast queries.
137
+
138
+ ## Command Quick Reference
139
+
140
+ ### Connection & Profile
141
+ - `cz-cli profile create <name> --username U --password P --instance I --workspace W` — Create profile
142
+ - `cz-cli profile create <name> --pat TOKEN --instance I --workspace W` — Create profile with PAT
143
+ - `cz-cli profile list` — List all profiles
144
+ - `cz-cli profile status` — Test connection, show workspace/schema
145
+ - `cz-cli profile use <name>` — Set default profile
146
+ - `cz-cli profile delete <name>` — Delete a profile
147
+ - `cz-cli profile discover --studio-url URL --username U --password P` — Discover regions/instances
148
+
149
+ ### SQL Execution
150
+ - `cz-cli sql "SELECT * FROM t LIMIT 10"` — Execute SQL query
151
+ - `cz-cli sql -f query.sql` — Execute SQL from file
152
+ - `cz-cli sql --write "INSERT INTO t VALUES (...)"` — Write operation (requires --write)
153
+ - `cz-cli sql --async "SELECT count(*) FROM big_table"` — Async execution, returns job_id
154
+ - `cz-cli sql --sync "SELECT 1"` — Force synchronous execution
155
+ - `cz-cli sql -e "SELECT * FROM t WHERE id = %(id)s" --variable id=123` — Variable substitution
156
+
157
+ ### Job Management (async SQL results)
158
+ - `cz-cli job status <job_id>` — Check job status
159
+ - `cz-cli job result <job_id>` — Fetch result set (waits if running, limited to 100 rows)
160
+ - `cz-cli job result --no-limit <job_id>` — Fetch full result set
161
+
162
+ ### Schema & Table
163
+ - `cz-cli schema list` / `cz-cli schema describe <name>` / `cz-cli schema create <name>` / `cz-cli schema drop <name>`
164
+ - `cz-cli table list [--schema S] [--like 'pattern%']` / `cz-cli table describe <name>` / `cz-cli table preview <name> [--limit N]`
165
+ - `cz-cli table stats <name>` / `cz-cli table history [name]` / `cz-cli table create "DDL"` / `cz-cli table drop <name>`
166
+
167
+ ### Workspace
168
+ - `cz-cli workspace current` — Show current workspace
169
+ - `cz-cli workspace use <name> [--persist]` — Switch workspace
170
+
171
+ ### Task Scheduling (Studio)
172
+ - `cz-cli task list [--page N --page-size N]` — List tasks
173
+ - `cz-cli task create <name> --type SQL|PYTHON|SHELL|SPARK|FLOW --folder F` — Create task
174
+ - `cz-cli task content <name_or_id>` — Get task script, config and params (draft); response includes `params` array with `paramType=system` (built-in params / time expressions) or `paramType=manual` (constants)
175
+ - `cz-cli task save-content <name_or_id> --file script.sql [--params '{"key":"val","dt":"bizdate","yd":"$[yyyy-MM-dd,-1d]"}']` — Save script and optionally set params; system params (bizdate, sys_biz_day, sys_biz_datetime, sys_plan_day, sys_plan_datetime, sys_plan_timestamp, sys_task_id, sys_task_name, sys_task_owner) and time expressions starting with `$[` are auto-detected as `paramType=system`
176
+ - `cz-cli task save-config <name_or_id> --cron "0 0 8 * * ? *"` — Save schedule (sec min hour day month week year)
177
+ - `cz-cli task online <name_or_id> -y` — Publish task
178
+ - `cz-cli task offline <name_or_id> -y` — Take offline (IRREVERSIBLE)
179
+ - `cz-cli task execute <name_or_id> [--param KEY=VAL ...]` — Ad-hoc execution; auto-loads saved `manual` params as defaults (system params like `bizdate` are NOT auto-injected in adhoc mode — pass them explicitly via `--param`); warns if unresolved `${placeholders}` remain after merge (SQL tasks will fail, Python/Shell silently keep literal strings)
180
+ - `cz-cli task flow dag <flow>` / `task flow create-node` / `task flow bind` / `task flow submit` — Flow operations
181
+
182
+ ### Runs & Attempts
183
+ - `cz-cli runs list [--task T --status S --run-type SCHEDULE|REFILL --from D --to D]`
184
+ - `cz-cli runs detail <run_id_or_task>` / `cz-cli runs logs <run_id_or_task>` / `cz-cli runs wait <id> --timeout N`
185
+ - `cz-cli runs refill <task> --from D --to D [-y]` — **补数/回填**: re-run scheduled instances for a historical date range (task must be online). `D` accepts `YYYY-MM-DD` (day boundary: `--from` = start of day, `--to` = 23:59:59) or `YYYY-MM-DDTHH:MM:SS` for exact datetime — **use ISO datetime for hourly/minutely tasks** to avoid missing instances
186
+ - `cz-cli attempts list <run_id_or_task>` / `cz-cli attempts log <run_id_or_task> [--attempt-id N]`
187
+
188
+ ### Agent (AI Agent)
189
+ - `cz-cli agent run "<prompt>" [--session ID]` — Run AI agent with a natural-language prompt
190
+ - `cz-cli agent llm` — Manage LLM providers
191
+
192
+ ## Command Inventory (Generated)
193
+
194
+ ### `ai-guide`
195
+ - `ai-guide` - Generate AI-friendly command reference
196
+
197
+ ### `attempts`
198
+ - `attempts` - Manage attempt records
199
+ - `attempts list` - List attempts for a run
200
+ - `attempts log` - Get attempt log
201
+
202
+ ### `job`
203
+ - `job` - Job performance tools
204
+ - `job result` - Fetch result set of a SQL job
205
+ - `job status` - Check status/summary of a SQL job
206
+
207
+ ### `profile`
208
+ - `profile` - Manage connection profiles
209
+ - `profile create` - Create a profile
210
+ - `profile delete` - Delete a profile
211
+ - `profile detail` - Show profile details
212
+ - `profile list` - List profiles
213
+ - `profile update` - Update a profile
214
+ - `profile use` - Set default profile
215
+
216
+ ### `runs`
217
+ - `runs` - Manage task run instances
218
+ - `runs deps` - View run dependencies
219
+ - `runs detail` - Get run detail
220
+ - `runs list` - List run instances
221
+ - `runs logs` - Get run logs
222
+ - `runs refill` - Submit backfill job
223
+ - `runs rerun` - Rerun a failed instance
224
+ - `runs stats` - Get run statistics summary
225
+ - `runs stop` - Stop a running instance
226
+ - `runs wait` - Poll until run completes
227
+
228
+ ### `schema`
229
+ - `schema` - Manage schemas
230
+ - `schema create` - Create a schema
231
+ - `schema describe` - Describe a schema
232
+ - `schema drop` - Drop a schema
233
+ - `schema list` - List schemas
234
+
235
+ ### `sql`
236
+ - `sql` - Execute SQL against ClickZetta
237
+ - `cz-cli sql "SELECT 1"` — Run a simple query
238
+ - `cz-cli sql -e "SELECT * FROM t LIMIT 10" --sync` — Synchronous query
239
+ - `cz-cli sql -f query.sql --write` — Execute write SQL from file
240
+
241
+ ### `table`
242
+ - `table` - Manage tables
243
+ - `table create` - Create a table from DDL
244
+ - `table describe` - Describe a table
245
+ - `table drop` - Drop a table
246
+ - `table history` - Show table history
247
+ - `table list` - List tables
248
+ - `table preview` - Preview table data
249
+ - `table stats` - Get table row count
250
+
251
+ ### `task`
252
+ - `task` - Manage Studio tasks
253
+ - `task content` - Get task content
254
+ - `task create` - Create a new task
255
+ - `task deps` - Show task dependencies
256
+ - `task execute` - Execute a task ad-hoc
257
+ - `task list` - List tasks
258
+ - `task offline` - Take a task offline
259
+ - `task online` - Publish a task
260
+ - `task save-config` - Save task schedule config
261
+ - `task save-content` - Save task script
262
+
263
+ ### `workspace`
264
+ - `workspace` - Manage workspaces
265
+ - `workspace current` - Show current workspace
266
+ - `workspace list` - List workspaces
267
+
268
+ ## Command Risk Reference
269
+
270
+ | Risk Level | Commands | Key Concern |
271
+ |-----------------|--------------------------------------------------|-----------------------------------------------------------------|
272
+ | 🔴 Irreversible | `task offline`, `schema drop`, `table drop` | Cannot be undone; clears history or deletes objects permanently |
273
+ | 🟠 High Impact | `task online`, `runs refill`, `task flow submit` | Affects live schedule or re-runs historical data |
274
+ | 🟢 Safe | All others | No side effects |
@@ -85,9 +85,9 @@ cz-cli datasource sample <name_or_id> <catalog> <object>
85
85
 
86
86
  ## Output Formats
87
87
 
88
- - `-o json` (default) — single-line JSON, best for parsing
89
- - `-o toon` — line-per-field, good for `grep`/`head`
90
- - `-o table` / `-o csv` / `-o pretty` — human-readable
88
+ - `--format json` (default) — single-line JSON, best for parsing
89
+ - `--format toon` — line-per-field, good for `grep`/`head`
90
+ - `--format table` / `--format csv` / `--format pretty` — human-readable
91
91
  - `--field <name>` — extract one field as raw text
92
92
 
93
93
  ## Key Rules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickzetta/cz-cli-darwin-x64",
3
- "version": "0.3.67",
3
+ "version": "0.3.69",
4
4
  "description": "cz-cli binary for macOS x64 (Intel)",
5
5
  "os": [
6
6
  "darwin"