Preset Cli

作者 preset-io73d26746350d無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Drive Preset's `sup` CLI (PyPI package `superset-sup`) for shell, scripting, CI/CD, and agent-driven Preset workflows. Use only for CLI workflows; Do not use for MCP-only work or for direct HTTP/SDK code paths.

僅含說明DevOps & Cloud
AI 產生的概覽

指導以安全且唯讀的方式使用 Preset 的 sup CLI,適用於 shell、指令碼、CI/CD 與代理工作流程。

功能
此技能提供在 shell、指令碼、CI/CD 流程與代理中驅動 Preset 命令列工具 sup(PyPI 套件 superset-sup)的說明。內容涵蓋安裝與驗證、設定優先順序、工作區選擇、輸出格式、命令涵蓋範圍、資產讀取、已儲存查詢以及臨時 SQL 路由。它強調唯讀操作、憑證遮蔽,並將變更類操作或非 SELECT 的 SQL 工作轉交給另一個變更技能。它不附帶指令碼,僅由參考文件組成。
適用情境
當你需要透過 sup CLI 而非 MCP 或直接 HTTP/SDK 呼叫來操作 Preset 時使用。它適合自動化與代理驅動的讀取工作流程,例如中繼資料讀取、資產清單、已儲存查詢讀取,以及有界的單一語句 SELECT 查詢。它不適用於僅使用 MCP 的工作、直接 API 程式路徑,或 push、sync、overwrite 與 force 操作。
執行需求
需要安裝並完成驗證的 sup CLI(PyPI 套件 superset-sup),憑證透過 SUP_PRESET_API_TOKEN 或 SUP_PRESET_API_SECRET 等環境變數提供,或透過 sup config auth 設定。需要連線至 Preset 的網路存取。不包含指令碼;此技能僅為說明與參考文件。

preset-cli

Use as the foundation for shell, scripting, CI/CD, and agent-driven Preset workflows through the sup CLI.

Always

  • CLI surface only; stay on MCP or direct API if that's what the user requested.
  • Default to --json for automation and agent consumption.
  • Keep SUP_PRESET_API_TOKEN / SUP_PRESET_API_SECRET out of command lines and shared output; use env vars or sup config auth, never paste secrets on the command line.
  • Route push, sync, overwrite, and --force to preset-cli-mutations.
  • Redact tokens and credential-bearing output in transcripts.

Decision Rules

  • Classify CLI vs MCP vs direct API intent before acting; if MCP or direct API was requested, defer to that plugin.
  • Run metadata reads and explicitly requested data-returning reads (e.g. sup sql, sup chart data) on familiar workspaces directly with bounded output; for sup sql, this direct path requires a pure single-statement SELECT. Load safety policy before mutations, SQL that is not a pure single-statement SELECT, untrusted-source SQL, unfamiliar workspaces, or broad outputs.
  • Choose output format based on the downstream consumer: --json for automation, --csv for files, default Rich for humans, --porcelain for shell pipelines.
  • If a command group is not named on this card, load command coverage before composing commands.
  • For mutating intent, stop and load preset-cli-mutations rather than continuing on this card. Non-SELECT SQL is confirmation-gated by the safety policy even when it is pasted by the user for a familiar workspace.

Workflow Order

  1. Establish install, auth, and workspace context.
  2. Choose output format.
  3. Classify risk (metadata read vs data-returning read vs mutation).
  4. Load the focused reference for the operation.
  5. Run only the safe / read command.
  6. Redact output before sharing.

Retrieve

  • Install, entry points, OAuth, env vars: references/install-and-auth.md [blocked]
  • Config precedence and source resolution: references/config-precedence.md [blocked]
  • Workspace selection and --workspace-id override: references/workspace-and-config.md [blocked]
  • Registered command coverage and routing: references/command-coverage.md [blocked]
  • Output formats and exit behavior: references/output-formats.md [blocked]
  • Asset read/export entity scope: references/assets-read.md [blocked]
  • Asset list filter matrix: references/asset-filter-matrix.md [blocked]
  • Ad-hoc SQL routing: references/sql-and-query.md [blocked]
  • SQL/data-returning read safety: references/sql-data-safety.md [blocked]
  • Saved query reads: references/saved-query-reads.md [blocked]
  • Detailed command examples: references/command-examples.md [blocked]
  • CLI vs API routing decision: references/cli-vs-api.md [blocked]
  • Approval gates and credential redaction: references/safety-policy.md [blocked]

來源與署名

來源:preset-io/agent-skills位於plugins/preset-cli-skills/skills/preset-cli提交73d2674

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架