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 从公开仓库中收录这些内容。

举报或申请下架