add-command
Add a CLI Command
End-to-end workflow for adding a new command to cx. Every command falls into one of two archetypes - determine which one first, then follow the corresponding steps.
docs/adding-a-command.md has copy-pasteable code templates for every step below. Read it alongside this workflow.
Step 0: Understand What You're Building
Before writing any code, get clarity on the domain:
- What Coralogix API are you wrapping? Find the API docs or example responses. Understand the data model - what entities exist, what fields they have, what operations are supported.
- What should the user be able to do? List the subcommands (e.g.,
list,get,create) and what flags make sense. - Does this belong under a wrapper group? The CLI organizes related commands into wrapper groups. Check if your command fits under an existing group before creating a top-level command:
cx alerts- alert definitions +schedulerscx notifications-connectors,routers,presets,testcx webhooks- outgoing webhooks +actionscx enrichments- enrichment rules +customenrichment tablescx integrations- integrations +extensions,contextual-datacx iam-api-keys,roles,scopes,users,groups,saml,ip-access
More from coralogix/cx-cli
cx-telemetry-querying
|
188cx-alerts
This skill should be used when the user asks to "manage alerts", "create alert", "list alerts", "check alert status", "enable alert", "disable alert", "investigate firing alerts", "check which alerts are active", "find alerting rules", "set up an alert", "configure alerting", "mute an alert", "silence an alert", "see alert definitions", "check alert priority", or wants to manage Coralogix alert definitions using the cx CLI.
171cx-incident-management
>
160cx-create-dashboard
>
159cx-observability-setup
>
158cx-cost-optimization
>
149