CONCEPT Cited by 1 source
CLI convention enforcement¶
CLI convention enforcement means baking naming and flag conventions into the schema layer of a CLI's code-gen pipeline so that inconsistency becomes a compile-time impossibility, not a review-time judgment call (Source: sources/2026-04-13-cloudflare-building-a-cli-for-all-of-cloudflare).
Why it matters¶
Large engineering orgs with many products accumulate
inconsistencies: one team uses info, another uses get;
one uses --skip-confirmations, another --force; one
supports --json, another --format. Manual code review
catches some of this but, as Cloudflare says, becomes "Swiss
cheese" at hundreds of reviewers across ~100 products.
Agents pay the cost. An agent that learned one product's CLI will naturally try the same pattern on another product and call a command that doesn't exist — or worse, call a command that exists with different semantics and silently corrupt state.
Cloudflare's rules (as of 2026-04-13)¶
- Always
get, neverinfo. - Always
--force, never--skip-confirmations. - Always
--json, never--format, and--jsonsupported across every command with structured output. - Local / remote behavior explicitly signaled in every command's output.
These rules are enforced at the schema layer — the
TypeScript-based internal schema that generates the
cf CLI, Workers bindings, the SDK, the
Terraform provider, and the MCP server. A product's command
definition cannot be committed if it uses a disallowed verb
or flag. See concepts/unified-interface-schema.
Also applies across interfaces¶
Enforcement isn't just a CLI concern. The same naming rules must propagate to:
- SDK methods (
client.foo.get()notclient.foo.info()). - Terraform resource arguments.
- MCP tool names (agents that read one tool set shouldn't trip on a differently-named sibling).
- Configuration schema (
wrangler.jsoncfields).
Because every surface is generated from one schema, the convention rules only need to live in one place.
Comparison to manual review¶
Manual review produces probabilistic consistency; schema-layer enforcement produces deterministic consistency. The author frames it as:
"In a large engineering org of hundreds or thousands of people, and with many products, manually enforcing consistency through reviews is Swiss cheese."