A dependency-injected Cloudflare administration CLI for scripting and inspecting zones, DNS, rulesets, settings, lists, and list items.
- Zone list, inspect, create, update, and delete
- DNS record list, inspect, create, update, and delete
- Zone setting read/update support
- Ruleset list, inspect, create, and update
- Cloudflare list and list-item management
- JSON or human-readable output
- Dry-run support for writes
- Force confirmation for destructive operations
- Testable dependency-injected architecture
- Node.js 18+ recommended
- Cloudflare API credentials
- Cloudflare account ID for account-scoped resources
- Cloudflare zone ID for zone-scoped resources
cd /opt
git clone git@github.com:eliware/cf-admin.git
cd cf-admin
npm install
npm test
npm run lint
npm install -g .The global install provides:
cf-admin --helpSet credentials in the environment or a local .env file:
CLOUDFLARE_EMAIL=you@example.com
CLOUDFLARE_API_KEY=your_api_key
CLOUDFLARE_ACCOUNT_ID=your_account_idNever commit .env, credentials, tokens, or generated state.
cf-admin zones list
cf-admin zones get --zone-id <zone_id>
cf-admin dns-records list --zone-id <zone_id>
cf-admin dns-records create --zone-id <zone_id> \
--data '{"type":"A","name":"www","content":"1.2.3.4"}'
cf-admin rulesets list --zone-id <zone_id> --json
cf-admin zone-settings get --zone-id <zone_id> --setting development_modeUse JSON output for automation:
cf-admin zones list --json
cf-admin dns-records get --zone-id <zone_id> --id <record_id> --output jsonPreview supported writes:
cf-admin dns-records create --zone-id <zone_id> \
--data '{"type":"A","name":"test","content":"192.0.2.1"}' \
--dry-runDestructive operations require --force:
cf-admin dns-records delete --zone-id <zone_id> --id <record_id> --forcezoneszone-settingsdns-recordsrulesetslistslist-items
Run <resource> --help for action-specific help.
npm test
npm run lintThe test suite uses injected Cloudflare clients, filesystem adapters, environment loaders, printers, handlers, and process exits. Current source coverage is 100%.
bin/- CLI entry point and compatibility linksrc/cli.mjs- dependency-injected command runtimesrc/handlers/- resource handlerssrc/- argument, environment, API, help, and output utilitiestests/- Jest test suitedream.md- long-term product visiondream_sprints.md- staged roadmap
For help or questions, join the community:

