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.45.0

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.45.0
File Actions
kaniscope-0.45.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for kaniscope-0.45.0-py3-none-win_amd64.whl
kaniscope-0.45.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for kaniscope-0.45.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
kaniscope-0.45.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for kaniscope-0.45.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
kaniscope-0.45.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for kaniscope-0.45.0-py3-none-macosx_11_0_arm64.whl
kaniscope-0.45.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for kaniscope-0.45.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 24.7 MB

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

Download URL kaniscope-0.45.0-py3-none-win_amd64.whl
Size 5.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
055b18bcfcab1a9e81ec3e177d2a85c00fd85f25354a28c2a1c5f7a06af5e300
BLAKE2b-256 checksum
How to use checksums
ff163716812691c228a5c496a3a79b1e1f4282410ed0a6fff5c2706e8bb80ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

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

Download URL kaniscope-0.45.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 5.1 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0b539245102e021eae0eb068a5c359ee3df14031f2e309838ed2223a43880f36
BLAKE2b-256 checksum
How to use checksums
0b7c0f2067eeafbcd26e8a38a958b0c4484670a1b27217cfa14787f051c0af0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

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

Download URL kaniscope-0.45.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b4a19e9cc0a596a7a66c2dba641fe28a4f8fc681971f42073a28067bbf3a5f7e
BLAKE2b-256 checksum
How to use checksums
083e0bfadd3c0dcceea737d6248575fbabffba479145b448649380d430f27f9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

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

Download URL kaniscope-0.45.0-py3-none-macosx_11_0_arm64.whl
Size 4.8 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f1c7523a45a03e8895cc7a91e04925a9b8890167d337dc1053748cfcacfacb40
BLAKE2b-256 checksum
How to use checksums
33f8537e069a919fb75754b90094866d478040cb1a6f1fb7ee0b684302bb2c79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

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

Download URL kaniscope-0.45.0-py3-none-macosx_10_12_x86_64.whl
Size 5.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6b5a06abc3e02b8dfcf0855a36049b26f5fc0d850c69efb73e92cb7a7c16a96d
BLAKE2b-256 checksum
How to use checksums
c284dddc60656e1f1c2e434f60434e453a616344b09ede4c8f9c4dad2a672b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Security for kaniscope 0.45.0

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for kaniscope-0.45.0-py3-none-win_amd64.whl

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 Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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