Install and run the CLI
Install
curl -fsSL https://codegraff.com/install-graff.sh | bash # make sure ~/.local/bin is on your PATH export PATH="$HOME/.local/bin:$PATH"
Verify it landed:
graff --help which graff
Connect a model
Choose a subscription connection, provider API key or Codegraff gateway account in the provider guide. For the gateway, start device-code login with:
graff login
Use graff models to choose a model and graff route to inspect its provider and billing route before inference.
Your first prompt
Open a terminal in your repository. Replace the model placeholder with a model from your catalog. This first request asks for an explanation without edits:
MODEL="your-model-id" graff route "$MODEL" graff --model "$MODEL" -p "Explain this repository and identify its documented test commands. Do not edit files or run tests."
Edit, test and review
Here is a small Node.js example. Use it in a project that already has a documented npm test script and a slug helper. Choose an equivalent small behavior and the documented check commands for your own project.
git status --short git switch -c docs/slug-fix npm test
Start from a clean working tree so the patch is easy to attribute. Inspect the baseline test result before asking for a change; an existing failure should remain distinguishable from a regression.
graff --model "$MODEL" -p "Find the existing slug helper. Make it trim leading and trailing whitespace before generating a slug. Add a regression test using the existing test runner. Run npm test and the repository's required checks. If checks fail, inspect and repair failures caused by this change, then rerun them. Report the changed files, exact commands, outcomes and anything you could not verify. Do not commit."
The prompt explicitly requests tests and a repair loop; it does not enable an automatic test gate. Review the tool output, then independently check the final working tree:
npm test git diff --check git diff git status --short
Inspect new files listed by git status too. A passing test command covers only the tests it runs. Run additional project-required checks before accepting the patch, and retain failures or skipped checks in the review record.
See Verify code changes for the evidence to retain and how to interpret saved Graff evaluations.