Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Knock CLI

$ knock Official Med Risk
Knock · Workspace & SaaS · MIT · macos / linux / windows

Knock 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.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install knocklabs/tap/knock
CLI vs MCP Decision CLI Preferred vs MCP

Local workflow pull/push/validate, translation pull/push, and commit promote workflows operate directly on filesystem directories.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --json, --service-token, --environment, and --branch cleanly for headless automation.

  • --json and --service-token flags
  • Non-interactive workflow validate and commit promote
Trust & Safety 21 / 25

Provides workflow validate, --sandbox-mode test runs, and explicit commit promote environment gating.

  • --sandbox-mode prevents live message delivery
  • Explicit commit promote promotion step
Setup & Portability 13 / 15

Installable via npm (@knocklabs/cli), npx, and Homebrew tap (knocklabs/tap/knock) on macOS, Linux, and Windows.

  • npm @knocklabs/cli and Homebrew tap
Utility & Efficiency 13 / 15

Manages workflows, templates, translations, guides, and environment commits cleanly from Git repositories.

  • Full workflow, translation, commit, and guide subcommands
Maintenance & Lineage 8 / 10

Official Knock repository (knocklabs/knock-cli) actively maintained under MIT.

  • Official knocklabs/knock-cli repository
Docs & Verifiability 8 / 10

Well-documented at docs.knock.app/developer-tools/cli/overview with clear --help flags.

  • Official Knock CLI reference documentation

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Service Account Config File
Credential Storage

Stores OAuth tokens from knock login locally, or authenticates headlessly via --service-token / KNOCK_SERVICE_TOKEN.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source CLI; Knock offers a free tier up to 10,000 notifications/month.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List Knock workflows in JSON
knock workflow list --json

Retrieves workflow keys and statuses from the target environment in JSON.

Validate local workflow definitions
knock workflow validate --all --json

Validates local workflow schemas and templates without pushing remote changes.

Controlled Writes & Previews

Test a workflow in sandbox mode
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-token and --json flags make CI/CD and agent automation seamless.
  • + workflow validate and --sandbox-mode catch errors without sending live notifications.

Caveats & Pitfalls

  • ! Mutating commands like workflow push and commit promote require careful --environment targeting.
  • ! Lacks built-in --jq field filtering.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI