Skip to main content

kaniscope

AI pull-request reviewer: fetches a PR's diff, reviews it, and posts line-anchored inline comments plus a summary. Works with GitHub, GitLab and Bitbucket.

The wheel carries a native binary, not an extension module — so it is independent of your Python version, needs no compiler, and adds no runtime dependencies. Same arrangement uv and ruff use.

pip install kaniscope          # or: uv tool install kaniscope
kaniscope --provider github --repo me/app --pr 12 --dry-run

As a library

Build a bot in Python and drive the engine from it:

from kaniscope import review

out = review(
    provider="github",
    repo="me/app",
    pr=12,
    dry_run=True,
    env={"OPENROUTER_API_KEY": key, "GH_TOKEN": token, "MODEL": "anthropic/claude-sonnet-5"},
)

print(out["recommendation"], out["findings"], "finding(s)")
for f in out.get("findingsDetail", []):
    print(f"{f['severity']} {f['file']}:{f.get('line', '-')} — {f['body']}")

A review takes minutes, so inside a webhook handler use the async form, which also streams the engine's progress:

from kaniscope import review_async

out = await review_async(
    provider="github", repo="me/app", pr=12,
    on_log=lambda line: log.info(line),
)

Both raise KaniscopeError when the engine exits non-zero, carrying exit_code and the full stderr.

Configuration

Everything beyond these arguments — the model, provider tokens, file globs, confidence floors, bot identity — is engine configuration. Pass it typed:

out = review(
    provider="github", repo=repo, pr=pr,
    config={"openrouter_model": "anthropic/claude-sonnet-5", "min_confidence": 70, "agentic": True},
)

ReviewConfig is a TypedDict generated from the engine's own spec — every option with its type, default and documentation — so it cannot drift from what the binary actually reads.

env still takes raw strings and is applied after config, so it wins. That is deliberate: it stays the escape hatch for anything the typed layer does not model.

The essentials: OPENROUTER_API_KEY, plus GH_TOKEN / GITLAB_TOKEN / Bitbucket credentials for the provider you use. See the engine README for the full list, and .prbot.toml for per-repo settings.

API

Function What it does
review(**kwargs) Review a PR, or a local diff with local=True.
review_async(**kwargs) The same, without blocking the event loop.
schema() The JSON Schema of a review result. No key, no network.
version() The engine version this wheel's binary was built from.
binary_path() Absolute path to the installed binary.

RunReviewOutput, Finding, InlineComment and Usage are TypedDicts generated from the binary's own --schema, so they cannot drift from what the engine actually emits.

Reviewing without a PR

kaniscope --local --base main            # the working tree against a ref
git diff --staged | kaniscope --local    # any diff, from anywhere

Through the API, base picks the ref and diff is the stdin form:

review(local=True, base="main")
review(local=True, diff=pathlib.Path("change.patch").read_text())

Same reviewer, same prompts, same anchoring — it just has nowhere to post.

Why a binary and not a pyo3 extension

The engine takes five scalars, reads its configuration from the environment, and returns one JSON document after minutes of network and git work. Binding that through an extension module would buy nothing a pipe does not already give, and would cost a wheel per interpreter ABI plus a second declaration of every wire type. This way there is one artifact per platform, valid for every Python that can install it.

License

MIT OR Apache-2.0. Source: nhatvu148/pr-review-core.

Metadata

Release files for kaniscope 0.39.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for kaniscope 0.39.1
File
kaniscope-0.39.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
kaniscope-0.39.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
kaniscope-0.39.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
kaniscope-0.39.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
kaniscope-0.39.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 23.8 MB

Release files / kaniscope-0.39.1-py3-none-win_amd64.whl

Download URL kaniscope-0.39.1-py3-none-win_amd64.whl
Size 4.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2b5f07174d673009060f6dc460f59792debeb8923fe12db79905edab52051a04
BLAKE2b-256 checksum
How to use checksums
2a0a11fddc1a73f73ea090bc2fd5a4f9a25f303c3eb5da29e243e75e3eac71af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / kaniscope-0.39.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL kaniscope-0.39.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
95253a592813421e586e33189bd5067d67a5c90ec3e39ab11e0a1aea754a3220
BLAKE2b-256 checksum
How to use checksums
c69d23abada35c5d79708d80ee49927e787cb802b31f5dad87ac1313127bec42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / kaniscope-0.39.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL kaniscope-0.39.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2c5aff6027df40bb034095b2bd2d5ffc191e5afaa3b92d24b98c433502d0d690
BLAKE2b-256 checksum
How to use checksums
c423971b54da94d0df4d7e1458df9e5962c86dbf45c5d5f2b6b20000d75d4b5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / kaniscope-0.39.1-py3-none-macosx_11_0_arm64.whl

Download URL kaniscope-0.39.1-py3-none-macosx_11_0_arm64.whl
Size 4.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0622b23ce6166c2e038b26a8fd336514edeb4a3ef81f90be2c5d3a2a24ca52f8
BLAKE2b-256 checksum
How to use checksums
0f9d37b15359d1fb4233e22aa1563652d7ff18a17c2d9bab89ca3663657335b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / kaniscope-0.39.1-py3-none-macosx_10_12_x86_64.whl

Download URL kaniscope-0.39.1-py3-none-macosx_10_12_x86_64.whl
Size 4.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e67f74ecee95589b0d7d7d8e9c38295fdd5883f1f97eb5089a3c9b70f2cfdac1
BLAKE2b-256 checksum
How to use checksums
0b0a1fd8dac3eae657d0cca3456820a9484f15bb8515f9278d24dd3737a02c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.40.0

5 release files

This release

0.39.1 This release

5 release files

0.39.0

5 release files

0.37.0

5 release files

0.36.0

5 release files

0.35.0

5 release files

0.33.0

5 release files

0.32.0

5 release files

0.31.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page