{
  "_id": "@miclivs/flaregun",
  "maintainers": [
    {
      "name": "miclivs",
      "email": "livsmichael@gmail.com"
    }
  ],
  "keywords": [
    "proxy",
    "cloudflare",
    "workers",
    "ip-rotation",
    "scraping",
    "cli"
  ],
  "dist-tags": {
    "latest": "0.2.0"
  },
  "_rev": "3-a4f475ce74ed7c38793fafa9c8012181",
  "description": "Rotating proxy network on Cloudflare Workers. Deploy, rotate, fire.",
  "readme": "# flaregun 🔥\n\nRotating proxy network on Cloudflare Workers. Deploy, rotate, fire.\n\nTurn Cloudflare's free tier into a rotating proxy network. Deploy N Workers, each exits through a different IP. Use as a drop-in `fetch`, local proxy server, or CLI. 100k requests/day free.\n\n```bash\nnpm install -g @miclivs/flaregun\n```\n\n## Quick Start\n\n```bash\nflaregun init --token cf_xxx --account abc123\nflaregun up 5\nflaregun fire https://httpbin.org/ip --count 3\n```\n\nEach request shows a different IP. That's it.\n\n## CLI\n\n```bash\nflaregun init                          # create .flaregun/ config\nflaregun init --token T --account A    # with credentials\nflaregun up 10                         # deploy 10 proxy workers\nflaregun up 5                          # add 5 more (15 total)\nflaregun ls                            # list deployed workers\nflaregun fire <url>                    # fire a request through proxy\nflaregun fire <url> -n 5              # fire 5 requests (rotated)\nflaregun fire <url> -m POST            # POST request\nflaregun serve                         # start local proxy on :8080\nflaregun serve -p 3128 -s adaptive     # custom port & strategy\nflaregun down                          # teardown all workers\n```\n\n## Local Proxy Server\n\nStart a proxy server and use it from any tool, any language:\n\n```bash\nflaregun serve --port 8080\n```\n\n```bash\n# curl\ncurl --proxy http://localhost:8080 https://httpbin.org/ip\n\n# python\nrequests.get(\"https://httpbin.org/ip\", proxies={\"http\": \"http://localhost:8080\"})\n\n# playwright\nbrowser.launch({ proxy: { server: \"http://localhost:8080\" } })\n```\n\nLive request log streams to stdout — every request shows which worker handled it, status, and latency.\n\n## SDK\n\n```typescript\nimport { FlareGun } from \"flaregun\";\n\nconst fg = new FlareGun({\n  apiToken: process.env.CLOUDFLARE_API_TOKEN,\n  accountId: process.env.CLOUDFLARE_ACCOUNT_ID,\n});\n\n// Deploy 5 workers\nawait fg.up(5);\n\n// Drop-in fetch — automatically rotates\nconst res = await fg.fetch(\"https://httpbin.org/ip\");\nconsole.log(await res.json()); // { origin: \"104.28.x.x\" }\n\nconst res2 = await fg.fetch(\"https://httpbin.org/ip\");\nconsole.log(await res2.json()); // { origin: \"172.67.x.x\" } — different IP\n\n// Or start a local proxy server\nawait fg.serve({ port: 8080, strategy: \"adaptive\" });\n\n// Scale up/down\nawait fg.scale(20);  // now 20 workers\nawait fg.scale(3);   // scaled down to 3\n\n// Get all URLs for external use\nconsole.log(fg.urls());\n\n// Cleanup\nawait fg.down();\n```\n\n## Rotation Strategies\n\n| Strategy | Behavior |\n|---|---|\n| `round-robin` | Cycle through workers sequentially (default) |\n| `random` | Random worker each request |\n| `adaptive` | Backs off workers getting 429s/5xx, exponential cooldown |\n\n## Configuration\n\nCredentials resolve in order: explicit config → env vars → project `.flaregun/config.json` → global `~/.flaregun/config.json`.\n\n```bash\n# One-time setup (saved to ~/.flaregun/)\nflaregun init --token xxx --account yyy\n\n# Or use env vars\nexport CLOUDFLARE_API_TOKEN=your_token\nexport CLOUDFLARE_ACCOUNT_ID=your_account_id\n\n# Or project-level config\nflaregun init --global false\n```\n\n## Cloudflare Setup\n\n### 1. Create a free account\n\nSign up at [dash.cloudflare.com/sign-up](https://dash.cloudflare.com/sign-up).\n\n### 2. Create an API token\n\n1. Go to **My Profile → API Tokens** ([direct link](https://dash.cloudflare.com/profile/api-tokens))\n2. Click **Create Token**\n3. Find **Edit Cloudflare Workers** and click **Use template**\n4. Under **Account Resources**, select your account from the dropdown\n5. Leave everything else as-is\n6. Click **Continue to summary → Create Token**\n7. Copy the token\n\n### 3. Get your Account ID\n\nYour Account ID is in the Cloudflare dashboard URL: `dash.cloudflare.com/<ACCOUNT_ID>/...`\n\nOr find it on the **Workers & Pages** overview page in the right sidebar.\n\n### 4. Configure flaregun\n\n```bash\nflaregun init --token cfut_xxx --account abc123\n```\n\nThis saves credentials to `~/.flaregun/config.json` — works globally across all projects. You're ready:\n\n```bash\nflaregun up 5\nflaregun fire https://httpbin.org/ip\n```\n\n### Limits\n\n| Plan | Requests | Cost |\n|---|---|---|\n| Free | 100k/day | $0 |\n| Paid | 10M/month included | $5/mo + $0.30/million |\n\n## For Agents\n\nEvery command supports `--json` for structured output:\n\n```bash\nflaregun ls --json\nflaregun fire https://httpbin.org/ip --json\n```\n\n## License\n\nMIT\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Michaelliv/flaregun.git"
  },
  "bugs": {
    "url": "https://github.com/Michaelliv/flaregun/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "@miclivs/flaregun",
      "version": "0.1.0",
      "keywords": [
        "proxy",
        "cloudflare",
        "workers",
        "ip-rotation",
        "scraping",
        "cli"
      ],
      "license": "MIT",
      "_id": "@miclivs/flaregun@0.1.0",
      "maintainers": [
        {
          "name": "miclivs",
          "email": "livsmichael@gmail.com"
        }
      ],
      "homepage": "https://github.com/Michaelliv/flaregun#readme",
      "bugs": {
        "url": "https://github.com/Michaelliv/flaregun/issues"
      },
      "bin": {
        "flaregun": "dist/main.js"
      },
      "dist": {
        "shasum": "dcbf34b97877259276c7232eae4dd943c2954d4e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@miclivs/flaregun/-/flaregun-0.1.0.tgz",
        "fileCount": 37,
        "integrity": "sha512-f1bMNFNt7aee9cHRKNkgv+cCwsRKudBmyCICuOk7tdNNb2aA6PzpgFftiI7R+HizsjFu+eCmUTdOVwIqYYVbzg==",
        "signatures": [
          {
            "sig": "MEUCIAUBs/JjxI8XWNZXbe9XUgCvTkduTz+9+spO628vm6jUAiEA760h61IiWSGEVodiyHc6OBgvTSeM/GQ4C5g8mryfz2s=",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 50430
      },
      "main": "dist/index.js",
      "type": "module",
      "types": "./dist/index.d.ts",
      "exports": {
        ".": "./dist/index.js"
      },
      "gitHead": "5a864cb5e0952cb8de3b568a0303e1e75292bc83",
      "scripts": {
        "dev": "bun run src/main.ts",
        "lint": "bunx biome lint src/",
        "test": "bun test",
        "build": "tsc",
        "check": "bunx biome check src/",
        "format": "bunx biome format --write src/",
        "build:bun": "bun build --compile src/main.ts --outfile flaregun",
        "prepublishOnly": "npm run build",
        "build:bun-linux": "bun build --compile --target=bun-linux-x64 src/main.ts --outfile flaregun-linux-x64",
        "build:bun-mac-arm": "bun build --compile --target=bun-darwin-arm64 src/main.ts --outfile flaregun-darwin-arm64",
        "build:bun-mac-x64": "bun build --compile --target=bun-darwin-x64 src/main.ts --outfile flaregun-darwin-x64"
      },
      "_npmUser": {
        "name": "miclivs",
        "email": "livsmichael@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/Michaelliv/flaregun.git",
        "type": "git"
      },
      "_npmVersion": "11.4.2",
      "description": "Rotating proxy network on Cloudflare Workers. Deploy, rotate, fire.",
      "directories": {},
      "_nodeVersion": "24.4.1",
      "dependencies": {
        "chalk": "^5.6.2",
        "nanoid": "^5.1.6",
        "commander": "^14.0.3"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "typescript": "^5.8.0",
        "@biomejs/biome": "^2.3.14"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/flaregun_0.1.0_1774817416919_0.44745989263741337",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "0.1.1": {
      "name": "@miclivs/flaregun",
      "version": "0.1.1",
      "keywords": [
        "proxy",
        "cloudflare",
        "workers",
        "ip-rotation",
        "scraping",
        "cli"
      ],
      "license": "MIT",
      "_id": "@miclivs/flaregun@0.1.1",
      "maintainers": [
        {
          "name": "miclivs",
          "email": "livsmichael@gmail.com"
        }
      ],
      "homepage": "https://github.com/Michaelliv/flaregun#readme",
      "bugs": {
        "url": "https://github.com/Michaelliv/flaregun/issues"
      },
      "bin": {
        "flaregun": "dist/main.js"
      },
      "dist": {
        "shasum": "d442259186609043495b56bf37d82f1abceb0313",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@miclivs/flaregun/-/flaregun-0.1.1.tgz",
        "fileCount": 39,
        "integrity": "sha512-JWonIr35MRdp73UfSNTnsU7AY3b6uyFHJkvvnSJgbc5rt1tg4PjpPkcQ1bl0CYqki9wj6tHb3/GAAIHkYyDwHg==",
        "signatures": [
          {
            "sig": "MEUCIQCZZFQ7ma+WeEmd+KZauiMwt9/2sduDn23QHMysIaso1AIga25PFQHETn4Ooliz0lPgsz1CUYortx9davID5hhAhEY=",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 57420
      },
      "main": "dist/index.js",
      "type": "module",
      "types": "./dist/index.d.ts",
      "exports": {
        ".": "./dist/index.js"
      },
      "gitHead": "af62f955d64eddf951fcea994c5e7a80c448ba30",
      "scripts": {
        "dev": "bun run src/main.ts",
        "lint": "bunx biome lint src/",
        "test": "bun test",
        "build": "tsc",
        "check": "bunx biome check src/",
        "format": "bunx biome format --write src/",
        "build:bun": "bun build --compile src/main.ts --outfile flaregun",
        "prepublishOnly": "npm run build",
        "build:bun-linux": "bun build --compile --target=bun-linux-x64 src/main.ts --outfile flaregun-linux-x64",
        "build:bun-mac-arm": "bun build --compile --target=bun-darwin-arm64 src/main.ts --outfile flaregun-darwin-arm64",
        "build:bun-mac-x64": "bun build --compile --target=bun-darwin-x64 src/main.ts --outfile flaregun-darwin-x64"
      },
      "_npmUser": {
        "name": "miclivs",
        "email": "livsmichael@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/Michaelliv/flaregun.git",
        "type": "git"
      },
      "_npmVersion": "11.4.2",
      "description": "Rotating proxy network on Cloudflare Workers. Deploy, rotate, fire.",
      "directories": {},
      "_nodeVersion": "24.4.1",
      "dependencies": {
        "chalk": "^5.6.2",
        "nanoid": "^5.1.6",
        "commander": "^14.0.3"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "typescript": "^5.8.0",
        "@biomejs/biome": "^2.3.14"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/flaregun_0.1.1_1774818263881_0.7761110459303677",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "0.2.0": {
      "name": "@miclivs/flaregun",
      "version": "0.2.0",
      "description": "Rotating proxy network on Cloudflare Workers. Deploy, rotate, fire.",
      "type": "module",
      "main": "dist/index.js",
      "exports": {
        ".": "./dist/index.js"
      },
      "bin": {
        "flaregun": "dist/main.js"
      },
      "scripts": {
        "build": "tsc",
        "prepublishOnly": "npm run build",
        "dev": "bun run src/main.ts",
        "build:bun": "bun build --compile src/main.ts --outfile flaregun",
        "build:bun-linux": "bun build --compile --target=bun-linux-x64 src/main.ts --outfile flaregun-linux-x64",
        "build:bun-mac-arm": "bun build --compile --target=bun-darwin-arm64 src/main.ts --outfile flaregun-darwin-arm64",
        "build:bun-mac-x64": "bun build --compile --target=bun-darwin-x64 src/main.ts --outfile flaregun-darwin-x64",
        "test": "bun test",
        "format": "bunx biome format --write src/",
        "lint": "bunx biome lint src/",
        "check": "bunx biome check src/"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/Michaelliv/flaregun.git"
      },
      "homepage": "https://github.com/Michaelliv/flaregun#readme",
      "bugs": {
        "url": "https://github.com/Michaelliv/flaregun/issues"
      },
      "keywords": [
        "proxy",
        "cloudflare",
        "workers",
        "ip-rotation",
        "scraping",
        "cli"
      ],
      "license": "MIT",
      "devDependencies": {
        "@biomejs/biome": "^2.3.14",
        "typescript": "^5.8.0"
      },
      "dependencies": {
        "chalk": "^5.6.2",
        "commander": "^14.0.3",
        "nanoid": "^5.1.6"
      },
      "_id": "@miclivs/flaregun@0.2.0",
      "gitHead": "ad15a37a207d7abcf2416752f6b9fb346a81e2ce",
      "types": "./dist/index.d.ts",
      "_nodeVersion": "24.4.1",
      "_npmVersion": "11.4.2",
      "dist": {
        "integrity": "sha512-uGVBKkuX9eCjziTH1H0cHoGgDA7lMl2JRfgtp/ROhSr0W4DtLYgbQ0aArSN5Kjy9DxOmYv2ZoTIOboj8LFIUzw==",
        "shasum": "fbeeb547a348e8ed8727fb442c47ba1ce9da6e6b",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@miclivs/flaregun/-/flaregun-0.2.0.tgz",
        "fileCount": 41,
        "unpackedSize": 64508,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEUCIQC8ebUHkUEIoCHAx5URJYKoTfpU6dV4JoAYDOAtI8J3NgIgfZ02CXqDYGO+6cuJ37FY+bv68c7SeON9mJm64KvT400="
          }
        ]
      },
      "_npmUser": {
        "name": "miclivs",
        "email": "livsmichael@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "miclivs",
          "email": "livsmichael@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/flaregun_0.2.0_1775335322501_0.919119136236312"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@miclivs/flaregun",
  "time": {
    "created": "2026-03-29T20:50:16.783Z",
    "modified": "2026-08-10T11:45:35.987Z",
    "0.1.0": "2026-03-29T20:50:17.058Z",
    "0.1.1": "2026-03-29T21:04:24.015Z",
    "0.2.0": "2026-04-04T20:42:02.642Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/Michaelliv/flaregun#readme"
}