How cloudflare/cf works
cf is Cloudflare’s agent-oriented CLI. The principal workflow is selecting a command, issuing an API operation, and presenting its result; the README additionally highlights command discovery, JSON output, TypeScript configuration, and Vite-based development. The tree shows generated command coverage, a command generator, and a broad generated SDK, but the excerpts do not expose the CLI’s runtime dispatch or output wiring. Accordingly, those connections are left unverified rather than inferred.
Main entry points: commands cf CLI · Client.ts SDK client · _generated Generated commands · resources API resources
Components 15
CLI experience
- cf CLI
packages/cli/src/commands - Generated commands
packages/cli/src/commands/_generated - Command discovery
- JSON interface
Command generation
- Command generator
packages/cli/generator/generator.ts - Command emission
packages/cli/generator/emit
API client
- SDK client
packages/cli/src/sdk/sdk/Client.ts - API resources
packages/cli/src/sdk/sdk/api/resources - SDK core
packages/cli/src/sdk/sdk/core
Product capabilities
- Workers setup
packages/cli/src/commands/init/workers.ts - TypeScript config
- Vite development
- Developer plugins
Other components
- Engineer or agent
- Cloudflare API
Connections 12
- Engineer or agent → cf CLI: invokes
- cf CLI → Generated commands: dispatches
- Generated commands → SDK client: calls
- SDK client → API resources: exposes
packages/cli/src/sdk/sdk/Client.ts - SDK client → SDK core: uses
- API resources → Cloudflare API: API operations
- Command generator → Command emission: emits
- Engineer or agent → Command discovery: searches
- cf CLI → JSON interface: presents results
- Engineer or agent → TypeScript config: configures
- Engineer or agent → Vite development: develops with
- Vite development → Developer plugins: supports