cf CLI redirects prompts and workflow messages to stderr
Introduced 2026-10-23 · score 0.93
HOW TO USE IT
When creating a KV namespace with stdout redirected, read prompts and workflow messages from stderr. Run the create command with a title; add `--quiet` to hide notices and the success line while keeping warnings and prompts visible.
cf kv namespaces create --title <NAMESPACE_NAME> > ns.jsoncf kv namespaces create --title <NAMESPACE_NAME> --quiet > ns.jsonWHY THIS HELPS
Run `cf kv namespaces create` with JSON redirected to a file, or script commands whose output includes workflow messages.
BEFORE THIS CHANGE
Prompts, confirmations, progress, and workflow messages were rendered on stdout, so a confirmation could fail when stdout was redirected; the spinner could swallow piped input, and Ctrl+C or Esc during the spinner exited with status 0.
REQUIREMENTS AND LIMITATIONS
- Version: 1.0.0-beta.21
- --title <NAMESPACE_NAME> (required): Namespace title.
- --quiet: Suppress notices and success markers; warnings and prompts remain visible.
- Prerequisite: Install with `npm install -g cf`.
- Prerequisite: Authenticate with Cloudflare; `cf auth login` is the documented sign-in command. The CLI also accepts `CLOUDFLARE_API_TOKEN`.
- Prerequisite: For prompts while stdout is redirected outside CI, stdin and stderr must be terminals.
- Some confirmations in `cf deploy` and `cf workers triggers deploy` still ask only when stdout is a terminal, and proceed without asking otherwise.
- Prompts and the spinner need stdin and stderr to be terminals outside CI.
- `cf dev` still gives the dev server the whole terminal.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/cf/releases/tag/cf%401.0.0-beta.21
- https://developers.cloudflare.com/changelog/product/kv/
- https://github.com/cloudflare/cf/blob/cf%401.0.0-beta.21/packages/cli/README.md
Check the installed version and the source before using it. Entry JSON