Getting started
Install the App, merge its setup pull request, and add one model key. Code Hawk runs in the GitHub Actions workflows in your repository.
1. Install the App
Section titled “1. Install the App”Open CodeHawk App, choose Install, and select a repository with a default branch and GitHub Actions enabled. If your organisation restricts App installs, ask an owner to approve it. See the App permissions for what the installation grants.
2. Merge the setup pull request
Section titled “2. Merge the setup pull request”Open Set up Code Hawk in your repository. It adds .github/workflows/codehawk.yml for scans, review, replies and settings commands, plus .github/codehawk.json for model settings. Replace your-model-id with a model available to your account and set provider to match. Keep the starter caps or change them before merging.
{ "provider": "openai", "model": "your-model-id" }The settings reference covers compatible endpoints, Cloudflare AI Gateway and different models per job. You can also choose a model in the setup page while the pull request is open.
Review and merge the pull request into the default branch. If GitHub blocked the App from adding a workflow, copy the workflow from the pull request description into .github/workflows/codehawk.yml before merging. See setup pull request troubleshooting if the pull request is missing.
3. Add one model key
Section titled “3. Add one model key”In your GitHub repository, open Settings → Secrets and variables → Actions → New repository secret. Choose the name matching your provider. The generated workflow forwards these names automatically. Keep the key out of .github/codehawk.json.
| Provider | Actions secret |
|---|---|
| OpenAI | CODEHAWK_OPENAI_API_KEY |
| Anthropic | CODEHAWK_ANTHROPIC_API_KEY |
CODEHAWK_GOOGLE_API_KEY |
|
| OpenAI-compatible endpoint or Cloudflare AI Gateway | CODEHAWK_GATEWAY_TOKEN |
Open a non-draft pull request from a branch in the same repository. Check the Actions tab for the static scan and model review, then open the pull request to see the review posted by CodeHawk App. The static scan can run before you add the key. If the review reports an invalid key or model, follow the setup message or the troubleshooting guide.
Change settings or add jobs
Section titled “Change settings or add jobs”Propose changes to the default-branch settings in a pull request, with a settings command, or from the setup page. Those changes apply after merge. Automatic setup sets caps of 1 USD per review and 0.10 USD per reply. See costs and caps for the other jobs and how to remove a cap.
Enable weekly review, verified fixes, requested fixes, or browser flows against a preview deployment or container when you need them. The Worker privacy note explains what the hosted token service retains. Follow manual repository setup to pin your own callers or run with your own App.