Back to Documentation
csok CLI
A command-line tool that lets AI agents and scripts create and tune CommsOK rulesets.
What it does
csok is a small command-line tool scoped to ruleset authoring. It is the recommended interface for AI agents that draft, refine, and dry-run rulesets on your behalf.
- List, create, update, and copy rulesets and their versions.
- Discover available rule types with AI-readable instructions and parameter schemas.
- Run dry-run evaluations to preview what a ruleset would suppress, then pause or cancel them.
- Read your account's current ruleset status — active, pending, and last-applied versions.
What it can't do
A few actions are intentionally left out so an agent can't make destructive or production-affecting changes on its own.
- Activating or un-activating a ruleset version — operators do this in the web UI.
- Deleting rulesets or evaluation history.
- Account, integration, vendor, or data-export operations.
Authentication
csok uses an API key issued from your CommsOK account.
- Generate an API key from the dashboard and pass it via the --api-key flag, the CSOK_API_KEY environment variable, or a config file.
- The same key controls scope — csok inherits whatever permissions the key has.
Typical agent workflow
A common loop an AI agent runs end-to-end without operator intervention.
- Discover rule types so the agent knows what suppressions are available.
- List existing rulesets to decide whether to extend one or start fresh.
- Create or update a ruleset with the proposed rules and parameters.
- Run an evaluation to preview the impact, then surface a summary for an operator to review and activate.
Get the binary
Pre-built binaries for macOS, Linux, and Windows are available on GitHub Releases. Reach out if you need help wiring it into your agent.
Contact Support