Skip to content

CI Integration

Rakesh Singh edited this page Oct 23, 2026 · 1 revision

CI Integration

GitHub Action

# .github/workflows/tool-tokens.yml
on: pull_request
jobs:
  tool-tokens:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - id: toolism
        uses: rakeshnitb23/toolism@v0.1.0
        with:
          source: tools.json                  # or: mcp: "npx -y @your/mcp-server"
          baseline: .toolism/baseline.json
          max-increase: 5%

The result goes to the job summary. Outputs: status (pass/fail/error), total, delta, summary-file. All inputs are defined in action.yml.

pre-commit

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/rakeshnitb23/toolism
    rev: vX.Y.Z  # the first release after 0.1.0 includes the hook
    hooks:
      - id: toolism-check
        args: [tools.json, --baseline, .toolism/baseline.json, --max-increase, "5%"]
        files: ^tools\.json$

Create the baseline once with toolism check tools.json -b .toolism/baseline.json --update-baseline and commit it.

Clone this wiki locally