This skill should be used when the user asks to "use Cloudflare from Nushell", "deploy Workers", "access R2 storage", "work with KV", "manage D1 database", "use Cloudflare Queues", "create Durable Objects", "run wrangler commands", "call Cloudflare API", or mentions Cloudflare Workers, R2, KV, D1, Queues, Workflows, or Durable Objects in a Nushell context.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/danielbodnar/nushell-dev/blob/main/plugins/nushell-dev/skills/nushell-cloudflare/SKILL.md -a claude-code --skill nushell-cloudflareInstallation paths:
.claude/skills/nushell-cloudflare/# Nushell Cloudflare Integration
Complete guide for integrating Nushell with Cloudflare services. Covers API access, wrangler CLI integration, and patterns for Workers, R2, KV, D1, Queues, and Durable Objects.
## Authentication
### API Token Setup
```nushell
# Set credentials in environment
$env.CLOUDFLARE_API_TOKEN = "your-api-token"
$env.CLOUDFLARE_ACCOUNT_ID = "your-account-id"
# Or load from file
$env.CLOUDFLARE_API_TOKEN = (open ~/.cloudflare/token | str trim)
```
### API Client Base
```nushell
# Cloudflare API client
def cf-api [
endpoint: string
--method: string = "GET"
--body: any = null
] {
let base = "https://api.cloudflare.com/client/v4"
let headers = {
Authorization: $"Bearer ($env.CLOUDFLARE_API_TOKEN)"
Content-Type: "application/json"
}
let url = $"($base)($endpoint)"
let response = match $method {
"GET" => { http get $url -H $headers }
"POST" => { http post $url $body -H $headers }
"PUT" => { http put $url $body -H $headers }
"DELETE" => { http delete $url -H $headers }
}
if not $response.success {
error make {
msg: $"Cloudflare API error: ($response.errors | to json)"
}
}
$response.result
}
```
## Wrangler CLI Integration
### Setup and Config
```nushell
# Verify wrangler installation
^wrangler --version
# Login (interactive)
^wrangler login
# Check auth status
^wrangler whoami
```
### Worker Management
```nushell
# List workers
def "cf workers list" [] {
^wrangler deployments list --json
| from json
}
# Deploy worker
def "cf workers deploy" [path?: path] {
let dir = $path | default "."
cd $dir
^wrangler deploy
}
# Tail worker logs
def "cf workers tail" [name: string] {
^wrangler tail $name --format json
| lines
| each { |line| $line | from json }
}
# View worker details
def "cf workers get" [name: string] {
cf-api $"/accounts/($env.CLOUDFLARE_ACCOUNT_ID)/workers/scripts/($