No description
  • Rust 94.8%
  • Shell 5.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-03 16:39:27 +02:00
docs Install prebuilt binaries when available 2026-07-03 16:37:56 +02:00
scripts Resolve Forgejo release assets in installer 2026-07-03 16:39:27 +02:00
skills/fable-review Install prebuilt binaries when available 2026-07-03 16:37:56 +02:00
src Install prebuilt binaries when available 2026-07-03 16:37:56 +02:00
.brooks-lint-history.json Prepare fable-review for installable use 2026-07-03 15:03:33 +02:00
.gitignore Initial commit 2026-07-03 13:52:06 +02:00
AGENTS.md Install prebuilt binaries when available 2026-07-03 16:37:56 +02:00
Cargo.lock Prepare fable-review for installable use 2026-07-03 15:03:33 +02:00
Cargo.toml Prepare fable-review for installable use 2026-07-03 15:03:33 +02:00
LICENSE Prepare fable-review for installable use 2026-07-03 15:03:33 +02:00
README.md Install prebuilt binaries when available 2026-07-03 16:37:56 +02:00

Fable Review CLI

fable-review builds deterministic review packets from a PR, repo, or diff, then submits them to Anthropic's Message Batches API. It is not an autonomous coding agent; it is a packet builder, cost estimator, batch submitter, and result fetcher.

local context -> fable-review packet -> Anthropic batch -> Markdown results

Install

Preferred install:

curl -fsSL https://forge.elephanthand.com/turnercore/anthropic-batch-processing-cli/raw/branch/main/scripts/install.sh | sh

The script first looks for a prebuilt release asset for macOS or Linux:

fable-review-macos-aarch64.tar.gz
fable-review-macos-x86_64.tar.gz
fable-review-linux-aarch64.tar.gz
fable-review-linux-x86_64.tar.gz

If no asset is available, it falls back to Cargo:

cargo install --git ssh://git@forge.elephanthand.com:41004/turnercore/anthropic-batch-processing-cli.git --locked --force

Binary installs go to ~/.local/bin by default. Override with FABLE_REVIEW_INSTALL_DIR=/path/to/bin.

From a checkout, build a release asset for the current machine:

scripts/package-release.sh

Update:

fable-review update

Setup

export ANTHROPIC_API_KEY="sk-ant-..."

You can also put it in .env, .envrc, or ~/.config/fable-review/env as ANTHROPIC_API_KEY=....

Optional .fable-review.yaml:

model: claude-fable-5
max_output_tokens: 4000
cache: true
cache_ttl: "1h"
include:
  - "README.md"
  - "AGENTS.md"
  - "docs/**/*.md"
  - "src/**/*.rs"
exclude:
  - "target/**"
  - ".fable-review/**"
  - ".git/**"
questions:
  - correctness
  - tests
  - security
  - "Custom review prompt with commas, details, and exact instructions."

Quick Start

Dry-run first:

fable-review pr --base main --questions correctness,tests,security --dry-run

Use repeated --question flags for custom prompts on the CLI:

fable-review repo \
  --include 'src/**/*.rs,docs/**/*.md' \
  --question 'Audit this feature for correctness and missed edge cases.' \
  --question 'Check whether the docs are enough for another agent to use it.' \
  --dry-run

Inspect:

.fable-review/<timestamp>/packet.md
.fable-review/<timestamp>/cost-estimate.json
.fable-review/<timestamp>/requests.json

Submit and wait:

fable-review pr --base main --questions correctness,tests,security --wait

Cached multi-question runs automatically prewarm shared context with a one-request seed batch:

fable-review repo --include 'src/**/*.rs' --questions correctness,tests --wait

Fetch later:

fable-review status --batch-id msgbatch_...
fable-review fetch --batch-id msgbatch_... --out-dir review-results

Commands

  • pr --base <branch>: review the current branch diff and changed file contents.
  • repo: review selected repository files.
  • diff --file <path>: review a standalone unified diff.
  • submit --requests <path>: submit a prepared requests.json.
  • --no-prewarm-batch: disable the automatic seed batch for cached multi-question generated runs.
  • submit --prewarm-batch: manually seed before submitting a prepared requests.json.
  • status --batch-id <id>: print batch status JSON.
  • fetch --batch-id <id>: download JSONL results and Markdown outputs.
  • update: reinstall latest from Forge with the binary-first installer, falling back to Cargo.
  • cache-bench: run two tiny sequential Messages API calls to measure prompt-cache hits and savings.

Run fable-review --help and fable-review <command> --help for exact flags.

Debugging Results

The run directory contains:

packet.md
questions.json
requests.json
cost-estimate.json
batch_id.txt
results.jsonl
q1_*.md
q1_*_error.json
usage-summary.json

usage-summary.json keeps the raw Anthropic usage object and adds:

  • cache_hit: true when cache_read_input_tokens > 0.
  • cache_creation_input_tokens
  • cache_read_input_tokens
  • input_tokens
  • output_tokens

Token counts are rough estimates. Final billing comes from Anthropic usage fields.

Repo packets include a Repository tree section listing every non-excluded file, then an Included files section with full contents for files matched by include.

To verify prompt caching with real API usage:

fable-review cache-bench --cache-ttl 5m --out cache-bench.json

This sends two small sequential requests with the same cached prefix. The report includes cache_hit, raw usage fields, actual computed cost, no-cache cost, and savings.

More detail: docs/usage.md. Agent instructions: AGENTS.md. Installable agent skill: skills/fable-review/SKILL.md.