skills/cloudflare-tunnel/SKILL.md
Manage Cloudflare Tunnel ingress rules and DNS records via CLI. Use when the user wants to expose a local service to the internet through a Cloudflare Tunnel.
npx skillsauth add hayeah/dotfiles cloudflare-tunnelInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CLI for managing Cloudflare Tunnel ingress rules and DNS records. One tunnel per machine, ingress rules synced from devportv3 config.
$(hostname)cloudflared connector is run via devport (configured in devport.toml, not by this tool)devport ingress output — devport.toml is the source of truth<tunnel_id>.cfargotunnel.comCLOUDFLARE_API_TOKEN in ~/.env.secret
cloudflared installed via misecd skills/cloudflare-tunnel
uv tool install -e .
All commands require CLOUDFLARE_API_TOKEN. Use godotenv to load it:
# First time: create tunnel and save config (prints token)
godotenv -f ~/.env.secret cloudflare-tunnel setup
# Sync ingress rules from devport config
devport ingress | godotenv -f ~/.env.secret cloudflare-tunnel sync
# List current tunnel mappings (JSON output)
godotenv -f ~/.env.secret cloudflare-tunnel ls
# Tear down everything: tunnel, DNS records, and local config
godotenv -f ~/.env.secret cloudflare-tunnel teardown
cloudflared is run independently via devport. Add to devport.toml:
[service.cloudflared]
cwd = "~"
command = ["cloudflared", "tunnel", "--no-autoupdate", "run", "--token", "${CLOUDFLARE_TUNNEL_TOKEN}"]
no_port = true
env_files = ["~/.env.secret"]
[service.cloudflared.health]
type = "process"
The token is saved in ~/.cloudflare-tunnel.json after setup. Add CLOUDFLARE_TUNNEL_TOKEN to ~/.env.secret.
setupIdempotent. Creates a remotely-managed tunnel named after the hostname, initializes empty ingress, fetches and caches the connector token in ~/.cloudflare-tunnel.json. Safe to re-run.
syncReads the full ingress JSON from stdin (output of devport ingress) and:
lsFetch and display current ingress rules from Cloudflare (excludes the catch-all). Output is JSON.
teardownDeletes all DNS records for ingress hostnames, deletes the tunnel, and removes ~/.cloudflare-tunnel.json. Prompts for confirmation.
~/.cloudflare-tunnel.json stores tunnel identity and token:
{
"tunnel_id": "<uuid>",
"tunnel_name": "<hostname>",
"account_id": "<account-id>",
"tunnel_token": "<base64-token>"
}
cf.zones.list()skills/cloudflare-tunnel/
SKILL.md -> README.md
docs/DESIGN.md
pyproject.toml
examples/now/ # example time server
src/cloudflare_tunnel/
__init__.py
main.py # typer CLI entrypoint
config.py # load/save ~/.cloudflare-tunnel.json
tunnel.py # Cloudflare API operations (tunnel CRUD, ingress, DNS)
tools
Web UI development — Vite+ toolchain setup and browser-based E2E testing workflow.
tools
Tooling and style guide for TypeScript projects.
development
Capture tmux pane content and export as text, HTML, SVG, PNG, or JPG. Use when you need a screenshot or text dump of a tmux pane for sharing, feeding to AI, or archiving terminal state.
testing
Copy-edit text. Fix grammar and/or tidy text into a concise listicle.