{"_id":"@artik0din/turbogha","_rev":"2-3cb5564f4e8f89069b38d99b2b04be05","name":"@artik0din/turbogha","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"@artik0din/turbogha","version":"1.0.0","keywords":["actions","node","setup","turbo","cache","turborepo","github-actions","monorepo","ci-cd"],"author":{"name":"artik0din"},"license":"MIT","_id":"@artik0din/turbogha@1.0.0","maintainers":[{"name":"artik0din","email":"kevin@globodai.com"}],"contributors":[{"url":"original author","name":"HUORT Louis","email":"https://louis.huort.com"},{"url":"original inspiration","name":"dtinth"}],"homepage":"https://github.com/globodai-group/caching-for-turbo","bugs":{"url":"https://github.com/globodai-group/caching-for-turbo/issues"},"bin":{"turbogha":"dist/cli/index.js"},"dist":{"shasum":"fe305d73cc8e472957c8a6723d728b5f7c88c338","tarball":"https://registry.npmjs.org/@artik0din/turbogha/-/turbogha-1.0.0.tgz","fileCount":32,"integrity":"sha512-E4sN1FEK2VTi1nTbjw4DLIZ+pRXWTIos8nDLrAffN7+jZtHrT1MOcCA6OwMnLggVNR2nkz8XMjsJeo79vjOb7w==","signatures":[{"sig":"MEUCIC40g+6F4sQFKQHdT7K2ILc4NdwaJ+Lp2jDU7Lf7pCndAiEAwG1JDHDD4yWmQR3qc/1hX5ek6TB4bIZ7O+MA5CluewE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8030499},"type":"module","engines":{"node":">=20"},"exports":{".":"./dist/cli/index.js"},"gitHead":"ccacb2f931a54cd8ed3010435ffdc3f5b364eb20","private":false,"scripts":{"all":"npm run format:write && npm run lint && npm run coverage && npm run package","lint":"eslint .","test":"turbo run test-build","start":"node dist/cli/index.js","bundle":"npm run format:write && npm run package","cleanup":"tsx ./src/dev/cleanup.ts","dev-run":"tsx ./src/dev-run.ts","package":"ncc build src/index.ts -o dist/setup --source-map --license licenses.txt && ncc build src/post.ts -o dist/post --source-map --license licenses.txt && ncc build src/cli.ts -o dist/cli --source-map --license licenses.txt","coverage":"make-coverage-badge --output-path ./badges/coverage.svg","test-build":"npm run -s package","format:check":"prettier --check .","format:write":"prettier --write .","package:watch":"npm run package -- --watch"},"_npmUser":{"name":"artik0din","email":"kevin@globodai.com"},"repository":{"url":"git+https://github.com/globodai-group/caching-for-turbo.git","type":"git"},"_npmVersion":"10.8.2","description":"Turborepo Remote Caching for GitHub Actions - Fast, free, and independent from Vercel","directories":{},"_nodeVersion":"20.19.6","dependencies":{"fastify":"^5.0.0","wait-on":"^9.0.0","@actions/core":"^1.10.1","@actions/cache":"^5.0.1","parse-duration":"^2.1.4","filesize-parser":"^1.5.1","stream-to-promise":"^3.0.0","@aws-sdk/client-s3":"^3.0.0","@aws-sdk/lib-storage":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@11.6.4","devDependencies":{"tsx":"^4.15.4","turbo":"^2.0.3","dotenv":"^17.0.0","eslint":"^9.24.0","globals":"^16.0.0","ts-jest":"^29.1.4","prettier":"^3.3.2","@eslint/js":"^9.24.0","typescript":"^5.4.5","@types/node":"^24.0.0","@vercel/ncc":"^0.38.1","@jest/globals":"^30.0.0","@types/wait-on":"^5.3.4","prettier-eslint":"^16.3.0","semantic-release":"^25.0.0","typescript-eslint":"^8.29.1","eslint-plugin-jest":"^29.0.0","eslint-plugin-jsonc":"^2.16.0","make-coverage-badge":"^1.2.0","eslint-plugin-github":"^6.0.0","@semantic-release/git":"^10.0.1","@semantic-release/npm":"^13.0.0","@semantic-release/exec":"^7.1.0","eslint-plugin-prettier":"^5.1.3","@semantic-release/github":"^12.0.0","@types/stream-to-promise":"^2.2.4","@typescript-eslint/parser":"^8.29.1","@semantic-release/changelog":"^6.0.3","@typescript-eslint/eslint-plugin":"^8.29.1","@semantic-release/commit-analyzer":"^13.0.0","@semantic-release/release-notes-generator":"^14.0.0","conventional-changelog-conventionalcommits":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/turbogha_1.0.0_1768237834019_0.08555298275155598","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@artik0din/turbogha","description":"Turborepo Remote Caching for GitHub Actions - Fast, free, and independent from Vercel","version":"2.0.0","private":false,"homepage":"https://github.com/globodai-group/caching-for-turbo","repository":{"type":"git","url":"git+https://github.com/globodai-group/caching-for-turbo.git"},"keywords":["actions","node","setup","turbo","cache","turborepo","github-actions","monorepo","ci-cd"],"author":{"name":"artik0din"},"contributors":[{"name":"HUORT Louis","email":"https://louis.huort.com","url":"original author"},{"name":"dtinth","url":"original inspiration"}],"exports":{".":"./dist/cli/index.js"},"bin":{"turbogha":"dist/cli/index.js"},"type":"module","engines":{"node":">=20"},"license":"MIT","packageManager":"npm@11.6.4","publishConfig":{"access":"public"},"gitHead":"bbf621b2905cfbe1c0f7044cfdfc044f887a1b37","_id":"@artik0din/turbogha@2.0.0","bugs":{"url":"https://github.com/globodai-group/caching-for-turbo/issues"},"_nodeVersion":"22.21.1","_npmVersion":"11.6.4","dist":{"integrity":"sha512-4LLP8uB8DM/+/a5YXnyHgMpJ01oDYrelM+CK0MaAbjE87BB1vRZh63hQ2r9HfB/PJNI9DCJ72JT4bHXXP/m9dw==","shasum":"96a70321344e05dea6977331e45ef0f43e0252f1","tarball":"https://registry.npmjs.org/@artik0din/turbogha/-/turbogha-2.0.0.tgz","fileCount":32,"unpackedSize":7014791,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCg0DFBdA+S2zKZKUnjn7zEIooqQUR52A255m2NzoeR2QIgKt8GCB+YLm76S8EhZDPwBVeb3IlMTOZDiXrxU6mPi/4="}]},"_npmUser":{"name":"artik0din","email":"kevin@globodai.com"},"directories":{},"maintainers":[{"name":"artik0din","email":"kevin@globodai.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/turbogha_2.0.0_1768238793712_0.5452982311883721"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-12T17:10:33.877Z","modified":"2026-01-12T17:26:34.115Z","1.0.0":"2026-01-12T17:10:34.232Z","2.0.0":"2026-01-12T17:26:33.923Z"},"bugs":{"url":"https://github.com/globodai-group/caching-for-turbo/issues"},"author":{"name":"artik0din"},"license":"MIT","homepage":"https://github.com/globodai-group/caching-for-turbo","keywords":["actions","node","setup","turbo","cache","turborepo","github-actions","monorepo","ci-cd"],"repository":{"type":"git","url":"git+https://github.com/globodai-group/caching-for-turbo.git"},"description":"Turborepo Remote Caching for GitHub Actions - Fast, free, and independent from Vercel","contributors":[{"name":"HUORT Louis","email":"https://louis.huort.com","url":"original author"},{"name":"dtinth","url":"original inspiration"}],"maintainers":[{"name":"artik0din","email":"kevin@globodai.com"}],"readme":"# TurboGHA\n\n> Free, self-hosted Turborepo remote caching for GitHub Actions\n\n[![CI](https://github.com/globodai-group/caching-for-turbo/actions/workflows/ci.yml/badge.svg)](https://github.com/globodai-group/caching-for-turbo/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@artik0din/turbogha)](https://www.npmjs.com/package/@artik0din/turbogha)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)\n\n## Why TurboGHA?\n\n[Turborepo](https://turbo.build/repo/) remote caching typically requires a Vercel account. **TurboGHA** provides a free alternative using GitHub's built-in cache.\n\n| | TurboGHA | Vercel |\n|---|:---:|:---:|\n| **Cost** | Free | Paid |\n| **Setup** | 1 line | Account + tokens |\n| **Dependencies** | None | Vercel account |\n\n## Quick Start\n\n```yaml\n- uses: globodai-group/caching-for-turbo@v1\n\n- run: turbo build\n```\n\nThat's it.\n\n## How It Works\n\n```\n┌──────────────────────────────────────────────────┐\n│              GitHub Actions Runner               │\n├──────────────────────────────────────────────────┤\n│                                                  │\n│  ┌─────────┐         ┌──────────────┐           │\n│  │  Turbo  │ ◄─────► │  TurboGHA    │           │\n│  │  Build  │  HTTP   │  :41230      │           │\n│  └─────────┘         └──────┬───────┘           │\n│                             │                    │\n│                             ▼                    │\n│                   ┌──────────────────┐          │\n│                   │  GitHub Cache    │          │\n│                   │  (10GB free)     │          │\n│                   └──────────────────┘          │\n└──────────────────────────────────────────────────┘\n```\n\n1. Starts a local Fastify server on `localhost:41230`\n2. Configures `TURBO_API`, `TURBO_TOKEN`, `TURBO_TEAM`\n3. Intercepts Turbo cache requests → GitHub Cache API\n4. Displays statistics on shutdown\n\n## Configuration\n\n```yaml\n- uses: globodai-group/caching-for-turbo@v1\n  with:\n    # Cache key prefix (useful for isolation)\n    cache-prefix: my-project_\n\n    # Server port (default: 41230)\n    server-port: 41230\n```\n\n### Inputs\n\n| Input | Description | Default |\n|-------|-------------|---------|\n| `cache-prefix` | Cache key prefix | `turbogha_` |\n| `server-port` | Server port | `41230` |\n\n## CLI (Local Development)\n\n```bash\nnpm install -g @artik0din/turbogha\n```\n\n```bash\n# Start server\nturbogha start\n\n# Configure Turbo\nexport TURBO_API=http://localhost:41230\nexport TURBO_TOKEN=turbogha\nexport TURBO_TEAM=turbogha\n\n# Build\nturbo build\n\n# Stop server\nturbogha kill\n```\n\n## Examples\n\n### Monorepo\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: globodai-group/caching-for-turbo@v1\n      - run: npm ci\n      - run: turbo build\n```\n\n### Matrix Build\n\n```yaml\njobs:\n  build:\n    strategy:\n      matrix:\n        os: [ubuntu-latest, windows-latest, macos-latest]\n    runs-on: ${{ matrix.os }}\n    steps:\n      - uses: actions/checkout@v4\n      - uses: globodai-group/caching-for-turbo@v1\n        with:\n          cache-prefix: ${{ matrix.os }}_\n      - run: npm ci\n      - run: turbo build test lint\n```\n\n## Metrics\n\nTurboGHA displays statistics on shutdown:\n\n```\n╔══════════════════════════════════════════╗\n║           TurboGHA Statistics            ║\n╠══════════════════════════════════════════╣\n║  Cache Hit Rate:  85.7%                  ║\n║  Hits:     12 | Misses:      2           ║\n╠══════════════════════════════════════════╣\n║  Uploads:    2 (  12.4MB)                ║\n║  Downloads: 12 (  89.2MB)                ║\n╠══════════════════════════════════════════╣\n║  Avg Save:   245ms                       ║\n║  Avg Get:     89ms                       ║\n╚══════════════════════════════════════════╝\n```\n\n## Troubleshooting\n\n**Cache not being used?**\n- Run action **before** `turbo` commands\n- Check `TURBO_API`, `TURBO_TOKEN`, `TURBO_TEAM` are set\n\n**Server fails to start?**\n- Check port 41230 is available\n- Try different port with `server-port`\n\n## Contributing\n\n```bash\ngit clone https://github.com/globodai-group/caching-for-turbo.git\nnpm install\nnpm run dev-run\nnpm run bundle\n```\n\n## License\n\nMIT\n\n---\n\n<p align=\"center\">\n  <a href=\"https://github.com/globodai-group\">Globodai Group</a>\n</p>\n","readmeFilename":"README.md"}