Cx Cli

作者 coralogixc0713729787b無授權條款121 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

This skill should be used whenever the user runs any cx command, uses the cx CLI, Coralogix CLI, or mentions cx in the context of Coralogix observability. This skill provides cross-cutting concerns like update notifications that apply to all cx commands.

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

為 cx Coralogix CLI 提供跨指令的更新提示處理與一般使用指引。

功能
此技能說明適用於所有 cx CLI 指令的通用行為,主要是偵測並告知可用的更新。它說明更新中繼資料出現的位置:toon 輸出結尾的獨立 JSON 行、cx schema 輸出最上層的 _meta.update 物件,以及 stdout 或 stderr 上的純文字提示。它也提供一般 CLI 指引,例如使用 toon 輸出、以 cx schema 探索指令、多 profile 平行呼叫、HTTP 逾時,以及 --yes 和 --read-only 等參數。
適用情境
當使用者執行任何 cx 指令、使用 cx CLI 或 Coralogix CLI,或在 Coralogix 可觀測性情境中提到 cx 時使用。其目的是確保更新提示能被呈現,並遵循一般 CLI 慣例。
執行需求
需要安裝並可用的 cx CLI(Coralogix CLI);更新檢查依賴指令輸出,可能涉及網路存取。此技能不含指令碼,只有說明文件。

cx-cli

Cross-cutting behaviors for all cx CLI commands.


Update Notifications

After running any cx command, check for update notices using the channels below (in priority order). If a newer version is available, finish answering the user's request first, then mention the update once at the end.

An update notice always has two parts — binary upgrade and skills refresh. Offer both commands; don't mention only the version number or only the binary upgrade.

1. Primary — toon mode (-o toon)

Commands with --output toon append a standalone trailing JSON line to stdout:

json
{"_meta":{"update":{"binary":{"current":"0.1.7","latest":"0.2.0","command":"brew upgrade cx"},"skills":{"command":"npx skills add coralogix/cx-cli/skills","docs":"https://github.com/coralogix/cx-cli#install"}}}}

Scan the last line of stdout for _meta.update. When present:

  • Binary upgrade: _meta.update.binary.command (current: .binary.current, latest: .binary.latest)
  • Skills refresh: _meta.update.skills.command

2. Schema startup check

cx schema embeds the same _meta.update object at the top level of the schema JSON (not a trailing line). Check _meta.update.binary and _meta.update.skills the same way.

3. Fallback — human-readable text

Also scan stderr and stdout for plain-text notices. Binary and skills appear on one line, separated by |:

[cx update] v0.2.0 available (you have 0.1.9) | upgrade: brew upgrade cx | skills: npx skills add coralogix/cx-cli/skills

TTY text mode uses two lines with the same upgrade: ... | skills: ... pattern:

cx 0.2.0 is available (you have 0.1.9).upgrade: brew upgrade cx | skills: npx skills add coralogix/cx-cli/skills

These appear on stderr for text/json mode after normal commands.

Response template

[Summarize the command result here]


A newer cx version (X.Y.Z) is available — you have A.B.C. Would you like me to run <binary upgrade command> and npx skills add coralogix/cx-cli/skills to update?

Keep it to one brief closing line. Don't repeat on later commands in the same session.


General cx CLI Guidelines

  • Always use --output toon for machine-readable output when processing results programmatically
  • Use cx schema to discover available commands and their flags
  • Commands support multi-profile fan-out with -p profile1 -p profile2
  • For commands that query or manage Coralogix data, use --http-timeout <SECONDS> or CX_HTTP_TIMEOUT=<SECONDS> to set an API request deadline.
  • Use --yes to skip confirmation prompts in scripts
  • Use --read-only for safe exploration without risk of modifications

來源與署名

來源:coralogix/cx-cli位於skills/cx-cli提交c071372

授權條款: 無授權條款

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

檢舉或申請下架