jevgate

September 20, 2026 · View on GitHub

Decide when a change can rely on an AI code reviewer's approval.

English | 日本語

jevgate is a CLI for teams that use AI code reviewers. It compares two Git revisions and uses Jev to assess whether the change is simple enough to rely on AI approval without requiring human approval. If the score falls below your threshold, the change needs human review.

jevgate makes that decision; your reviewer still reviews the code. It does not submit pull request approvals, merge changes, or change your repository's approval rules.

  • Evaluate the entire change, including interactions between changed files.
  • Set an approval threshold and provide context about your repository.
  • Read the result in your terminal or use JSON and exit codes in CI.

Quick start

1. Install

Install jevgate from a release archive, with go install, or with Homebrew. You need Git and a Jev API key to use jevgate. Evaluation requires network access to the Jev API.

Release archive

No tagged release has been published yet. After a release appears on the Releases page and passes the post-release checks described below, prebuilt archives will use these names:

OSArchitecturesArchive
Linuxamd64, arm64jevgate_<version>_linux_<arch>.tar.gz
macOSamd64, arm64jevgate_<version>_darwin_<arch>.tar.gz
Windowsamd64, arm64jevgate_<version>_windows_<arch>.zip

<version> omits the tag's leading v. Each archive contains only jevgate (jevgate.exe on Windows), built with CGO_ENABLED=0. Download checksums.txt from the same release and verify the archive before extracting it. For example, on Linux or macOS, replace x.y.z, the OS, and the architecture with a published release and your platform:

VERSION=x.y.z
OS=darwin
ARCH=arm64
ASSET="jevgate_${VERSION}_${OS}_${ARCH}.tar.gz"
BASE_URL="https://github.com/ktsu2i/jevgate/releases/download/v${VERSION}"

curl -fLO "${BASE_URL}/${ASSET}"
curl -fLO "${BASE_URL}/checksums.txt"

if command -v sha256sum >/dev/null 2>&1; then
  grep "  ${ASSET}$" checksums.txt | sha256sum --check -
else
  grep "  ${ASSET}$" checksums.txt | shasum -a 256 --check -
fi

tar -xzf "${ASSET}"
./jevgate --version
./jevgate --help

Go

Requires Go 1.26 or later. Once the repository is public, install with:

go install github.com/ktsu2i/jevgate/cmd/jevgate@latest

The repository is currently private. Until it is public, users with repository access need authenticated Git access and a matching GOPRIVATE setting. For example, if you do not already have a GOPRIVATE setting:

GOPRIVATE=github.com/ktsu2i/jevgate go install github.com/ktsu2i/jevgate/cmd/jevgate@latest

If you already use GOPRIVATE, add github.com/ktsu2i/jevgate to its comma-separated patterns instead of replacing them.

Go installs the executable in GOBIN, or $(go env GOPATH)/bin if GOBIN is unset. Make sure that directory is on your PATH.

Homebrew

With Homebrew installed, install the development version from the dedicated tap:

brew install --HEAD ktsu2i/tap/jevgate

There is no tagged release yet, so --HEAD builds from main. Homebrew installs the Go build dependency and Git. While the repository is private, Git must be authenticated with an account that can access it.

To update the development version:

brew update
brew upgrade --fetch-HEAD ktsu2i/tap/jevgate

After installation, check that the CLI starts:

jevgate --help

2. Set your API key

export JEV_API_KEY='your-api-key'

Use the JEV_API_KEY environment variable for credentials; do not put your key in the configuration file. See the Jev API documentation for the service's authentication details.

3. Evaluate a change

From the Git repository you want to evaluate, compare your base branch with your current commit:

jevgate main HEAD

Replace main with your base branch or commit. The two revisions must contain a change. An example result:

AI approval allowed: 97.2%
Threshold:           95.0%

ALLOW

ALLOW means the score meets the threshold for relying on AI approval. A score below the threshold produces HUMAN REVIEW REQUIRED. The default threshold is 0.95.

Usage

Pass two branches, tags, or commit SHAs, either as positional arguments or with --base and --head:

jevgate main HEAD
jevgate --base main --head HEAD
jevgate origin/main HEAD --threshold 0.98
jevgate main HEAD --format json

Both revisions are resolved to commit SHAs and compared directly. jevgate does not select a merge base automatically. Pass revisions separately: range expressions such as main..HEAD and main...HEAD are not supported. Uncommitted changes and untracked files are excluded.

OptionDescriptionDefault
--base <revision>Base revision; use together with --head, without positional revisionsRequired if using flags
--head <revision>Head revision; use together with --base, without positional revisionsRequired if using flags
--config <path>Configuration file; relative paths start at the current working directory.jevgate.yml in the repository root
--threshold <number>Minimum score for allowing AI approval, from 0 to 1 inclusive0.95
--format text|jsonOutput formattext
-h, --helpShow help
--versionShow version

Configuration

Optionally create .jevgate.yml at the root of the repository you are evaluating:

threshold: 0.95

context: |
  This repository contains a Go API deployed to ECS.
  Files under docs/ contain documentation.

context supplies repository facts to help Jev interpret the change. The CLI threshold takes precedence over the configuration file, which takes precedence over the default. Without a configuration file, jevgate uses 0.95 and no additional context.

To use a different configuration file:

jevgate main HEAD --config ./review-policy.yml

Understanding the result

jevgate allows AI approval when confidence >= threshold. confidence is Jev's affirmative probability for the question of whether AI approval is sufficient. A low value means human review is required; it does not mean the change is dangerous.

The assessment looks for clearly understood, simple changes such as documentation corrections or comment-only edits. Its criteria call for human approval for changes to business logic, authentication, infrastructure, dependencies, or other behavior. File paths and change types never grant an automatic exemption.

With --format json, the result contains three fields:

{
  "ai_approval_allowed": true,
  "confidence": 0.972,
  "threshold": 0.95
}
Exit codeMeaning
0AI approval is allowed
1Human review is required
2Evaluation failed because of an input, configuration, Git, API, or output error

Decisions go to stdout; diagnostics go to stderr. Exit code 2 means no usable decision was produced. Always check the exit code before consuming JSON: an output error can leave a partial result.

Use in CI

Run the CLI in a checkout containing both revisions, provide JEV_API_KEY through your CI secret store, and pass the exact base and head commit SHAs. A shallow checkout may need additional history before either revision can be resolved.

For a check that passes only when AI approval is allowed, use the CLI's exit code directly. If your workflow routes changes to different reviewers, handle exit code 1 as a decision requiring human review and exit code 2 as an execution failure. Only pass successfully parsed JSON from exit codes 0 or 1 to downstream steps; do not convert errors into a score of zero.

jevgate does not provide a dedicated GitHub Action or a ready-to-use GitHub Actions workflow yet. The CLI's result must be connected to your review and approval process separately.

Data sent to Jev and input limits

jevgate sends the diff, changed file paths and metadata, and your configured context to the Jev API for evaluation.

It evaluates the complete change without truncating the diff or excluding files by path. Evaluation stops with exit code 2 for:

  • Empty diffs, binary changes, or changes involving submodules.
  • Diffs or file paths that cannot be represented faithfully, including invalid UTF-8.
  • Changes that exceed the input limits: 128 KiB for collected Git output and 128 KiB for the encoded API request, including context and evaluation instructions.

Troubleshooting

ProblemWhat to check
jevgate: command not foundFor Go installs, add GOBIN or $(go env GOPATH)/bin to PATH. For Homebrew, check that its bin directory is on PATH.
JEV_API_KEY is not set or is emptyExport your API key in the shell or CI step that runs jevgate.
unusable revisionCheck the branch or commit name and fetch any missing history.
there is no change to evaluateChoose two commits with different contents; working tree edits are not included.
Exit code 2Read stderr for the cause. No approval decision is available.

Release process

tagpr maintains a release pull request whenever main advances. The pull request updates internal/cli/version.go and CHANGELOG.md; review and merge it only when that version should be published. Apply the tagpr:minor or tagpr:major label to select a larger version bump. For the first v0.1.0 release, apply tagpr:minor to the release pull request.

After the release pull request is merged, .github/workflows/tagpr.yml creates the version tag and a draft GitHub Release. Its dependent assets job runs GoReleaser, reuses that draft, builds all supported archives, generates checksums.txt, and publishes the release. Do not create or push the version tag manually. This same-workflow design is required because a tag created with GITHUB_TOKEN does not start a separate tag-triggered workflow.

The repository setting Allow GitHub Actions to create and approve pull requests must be enabled for tagpr. The release pull request must pass the normal CI checks before it is merged. The release workflow requires no Jev API key or reviewer credentials.

To inspect the GoReleaser output locally without publishing a release:

goreleaser check
goreleaser release --snapshot --clean

Snapshot files are written to dist/, which is reserved for generated output and ignored by Git. After publication, confirm the expected assets on the Releases page, verify the downloaded archive against checksums.txt, and check jevgate --version and jevgate --help before using that version in an official workflow example.

For bugs and feature requests, open an issue.