Use JFrog Boost in GitHub Actions

Use JFrog Boost in GitHub Actions with Claude Code to compress agent shell output in CI workflows.

You can use JFrog Boost in GitHub Actions with Claude Code so Boost compresses agent shell output before it reaches the model.

Prerequisites

  • A Linux runner (ubuntu-latest or similar).
  • Acceptance of preview terms via boost init … --accept-terms (writes ~/.boost/config.toml). Repo .boost/config.toml does not satisfy the terms gate.
  • An Anthropic credential for the job (typically secrets.ANTHROPIC_API_KEY), plus the permissions Claude Code needs (contents, pull-requests, issues, id-token, and usually actions: read).

To use JFrog Boost in GitHub Actions with Claude Code:

  1. Store your Anthropic API key as a repository secret, then pass it into the Claude Code action (or set it as a job environment variable):

    env:
      ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

    Where:

    • ANTHROPIC_API_KEY: Repository secret that stores your Anthropic API key.
  2. Add a workflow file (for example, .github/workflows/claude.yml) that installs Boost before Claude Code. Use Anthropic's anthropics/claude-code-action@v1 to keep the workflow minimal:

    name: Claude Code with Boost
    
    on:
      issue_comment:
        types: [created]
      pull_request_review_comment:
        types: [created]
      issues:
        types: [opened, assigned]
      pull_request_review:
        types: [submitted]
    
    jobs:
      claude:
        if: |
          (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
          (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
          (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
          (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
        runs-on: ubuntu-latest
        permissions:
          contents: write
          pull-requests: write
          issues: write
          id-token: write
          actions: read
        steps:
          - name: Checkout repository
            uses: actions/checkout@v7
            with:
              fetch-depth: 1
    
          - name: Install Boost
            run: |
              set -euo pipefail
              curl -fsSL https://boost.jfrog.com/install.sh | bash
              echo "$HOME/.local/bin" >> "$GITHUB_PATH"
              export PATH="$HOME/.local/bin:$PATH"
              boost init --claude --global --accept-terms
    
          - name: Verify Boost on PATH
            run: |
              set -euo pipefail
              command -v boost
              boost version
    
          - name: Run Claude Code
            uses: anthropics/claude-code-action@v1
            with:
              anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

Workflow Reference

Each step of the workflow does the following:

  • Install Boost: Downloads the CLI with install.sh (not jfrog/boost@v0).
    • PATH: echo … >> "$GITHUB_PATH" exposes boost to later steps. The same step also exports PATH before boost init, because $GITHUB_PATH applies only to subsequent steps.
    • boost init --claude: Installs Claude Code hooks on the runner. Without this, Claude will not use Boost rewrite hooks. --global --accept-terms keeps CI non-interactive and records terms in ~/.boost/config.toml.
  • Verify (optional): command -v boost and boost version should succeed before Claude starts. You can remove this step once the job is stable.
  • Run Claude Code: Keep this step after Boost setup so the agent inherits the installed binary and hooks.

Frequently Asked Questions

This section provides answers to frequently asked questions about using JFrog Boost in GitHub Actions with Claude Code.

plusFAQs
Q: Why must the Install Boost step run before Run Claude Code?

A: Boost installs Claude Code hooks during boost init --claude. Without those hooks on the runner first, the agent will not use Boost rewrite output compression. See Workflow reference.

Q: Why does repo .boost/config.toml not satisfy the terms gate?

A: CI jobs must accept preview terms non-interactively. Run boost init --global --accept-terms so terms are recorded in ~/.boost/config.toml on the runner. See Prerequisites.

Q: Can I use the jfrog/boost@v0 GitHub Action instead of install.sh?

A: This workflow uses install.sh and boost init --claude because Claude Code needs Boost hooks installed on the runner. The jfrog/boost@v0 action does not replace that init step in this setup.

Related Topics


Did this page help you?