Knock CLI
$ knock Official Med RiskKnock CLI (knock) pulls, validates, pushes, and promotes notification workflows, templates, and translations across Knock environments. First-class --service-token, --environment, --json, and workflow run --sandbox-mode support deterministic CI/CD and safe agent previews without dispatching real emails or SMS.
brew install knocklabs/tap/knock Local workflow pull/push/validate, translation pull/push, and commit promote workflows operate directly on filesystem directories.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json, --service-token, --environment, and --branch cleanly for headless automation.
--jsonand--service-tokenflags- Non-interactive
workflow validateandcommit promote
Provides workflow validate, --sandbox-mode test runs, and explicit commit promote environment gating.
--sandbox-modeprevents live message delivery- Explicit
commit promotepromotion step
Installable via npm (@knocklabs/cli), npx, and Homebrew tap (knocklabs/tap/knock) on macOS, Linux, and Windows.
- npm
@knocklabs/cliand Homebrew tap
Manages workflows, templates, translations, guides, and environment commits cleanly from Git repositories.
- Full
workflow,translation,commit, andguidesubcommands
Official Knock repository (knocklabs/knock-cli) actively maintained under MIT.
- Official
knocklabs/knock-clirepository
Well-documented at docs.knock.app/developer-tools/cli/overview with clear --help flags.
- Official Knock CLI reference documentation
Security, Auth & Guardrails
Stores OAuth tokens from knock login locally, or authenticates headlessly via --service-token / KNOCK_SERVICE_TOKEN.
MIT open-source CLI; Knock offers a free tier up to 10,000 notifications/month.
# Knock CLI Agent Rules - Always run `knock workflow validate` before `knock workflow push`. - Use `--sandbox-mode` for `workflow run` tests and require human approval before `knock commit promote` to production.
Agent-Ready Command Recipes
Safe Read-Only Queries
knock workflow list --json
Retrieves workflow keys and statuses from the target environment in JSON.
knock workflow validate --all --json
Validates local workflow schemas and templates without pushing remote changes.
Controlled Writes & Previews
knock workflow run welcome-email --recipients user_123 --sandbox-mode --json
Generates preview notifications without dispatching real messages to downstream providers.
Strengths for Agents
- + Headless
--service-tokenand--jsonflags make CI/CD and agent automation seamless. - +
workflow validateand--sandbox-modecatch errors without sending live notifications.
Caveats & Pitfalls
- ! Mutating commands like
workflow pushandcommit promoterequire careful--environmenttargeting. - ! Lacks built-in
--jqfield filtering.