Skip to content
← Community packages

@kody/cloudflare

TrustedFeatured

by @kodyFollow @kody

Cloudflare helpers for APIs, analytics, WAF rulesets, logs, and docs.

  • cloudflare
  • workers
  • analytics
  • waf
  • logs
  • api
License
MIT
Published
July 21, 2026
Pinned commit
4db7c50
Rating
★ 5.0 (1)
Forks
5
Stars
4
Adaptation effort
1.0

One-click install

Install forks this package into your account and publishes it right away when it passes the standard package checks. An admin reviewed and trusted this exact version.

Log in to install this package.

Fork with your agent

Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.

Use Kody to fork the community package "@kody/cloudflare" (listing id: fc1144f7-4ced-4947-8509-4a365f6d86e3). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.

README

@kody/cloudflare

Intent

Cloudflare API v4, GraphQL analytics, Rulesets/WAF, Log Explorer, and developer-doc helpers for Kody workflows.

When To Use

  • Call Cloudflare API v4 for zones, Workers, D1, R2, KV, or related resources
  • Summarize zone HTTP traffic by status, path, or user agent during outage forensics
  • Search Workers traces, HTTP requests, or Access events via Log Explorer SQL
  • Preview or apply WAF custom rules that block bogus crawler routes before origin
  • Fetch allowlisted Cloudflare developer documentation while building integrations

Required setup

  • cloudflareApiToken secret with API access for the zones/accounts you query; grant firewall/ruleset edit permission only if you use rulesets with apply: true

Exports

  • kody:@kody/cloudflare / overview — package discovery metadata
  • kody:@kody/cloudflare/api-v4 — REST calls under /client/v4/ (mutating)
  • kody:@kody/cloudflare/analytics — GraphQL zone traffic summaries (read-only)
  • kody:@kody/cloudflare/docs — fetch developer docs pages (read-only)
  • kody:@kody/cloudflare/observability-logs — Log Explorer SQL search (read-only)
  • kody:@kody/cloudflare/rulesets — WAF custom rule preview/apply (mutating; defaults to dry-run)

Examples

Traffic summary for a zone:

import analytics from 'kody:@kody/cloudflare/analytics'

export default async function main() {
  return await analytics({ zoneName: 'example.com', last: '1h' })
}

Search recent Worker trace events:

import searchLogs from 'kody:@kody/cloudflare/observability-logs'

export default async function main() {
  return await searchLogs({
    accountId: 'your-account-id',
    scriptName: 'my-worker',
    outcome: 'exception',
    last: '30m',
    limit: 25,
  })
}

Rulesets default to dry-run. Pass apply: true only after reviewing the returned entrypoint body.

Stars

4 stars

Log in to star this package.

Report this listing

Log in to report this listing.