Trigger a Cursor Cloud agent review for the active pull request.
Project description
Cursor Cloud Review
This tool allows you to trigger a Cursor Cloud agent review for an active pull request. It analyzes the changes in the pull request and provides a detailed report on security, correctness, and reliability.
Installation
pip install cursor-review
Usage
You need to set the CURSOR_CLOUD_API_KEY environment variable.
export CURSOR_CLOUD_API_KEY=your_api_key
cursor-cloud-review --repo-url https://github.com/owner/repo --pr-number 123
GitHub Actions
You can integrate this tool into your GitHub workflow to automatically review pull requests.
Prerequisites:
- Obtain your
CURSOR_CLOUD_API_KEY. - Add it to your repository secrets:
Settings>Secrets and variables>Actions>New repository secret. Name itCURSOR_CLOUD_API_KEY.
Example Workflow:
Create a file named .github/workflows/cursor-review.yml:
name: Cursor Cloud Review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Important: Fetch full history so that git diff can identify changes against the base branch
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install cursor-cloud-review
run: pip install cursor-review
- name: Run Cursor Cloud Review
env:
CURSOR_CLOUD_API_KEY: ${{ secrets.CURSOR_CLOUD_API_KEY }}
run: |
cursor-cloud-review \
--repo-url "${{ github.server_url }}/${{ github.repository }}" \
--pr-number "${{ github.event.pull_request.number }}" \
--base-ref "origin/${{ github.base_ref }}" \
--head-ref "HEAD"
The tool will generate a cursor-cloud-analysis.md file containing the review. You can add additional steps to this workflow to post the content of this file as a comment on the PR or upload it as an artifact.
Arguments
--repo-url: Full URL of the repository (e.g., https://github.com/OWNER/REPO).--pr-number: The pull request number.--base-ref: Base branch ref name (optional).--base-sha: Base commit SHA (optional).--head-ref: Head branch ref name (optional).--head-sha: Head commit SHA (optional).--analysis-report: Path to the markdown report output (default:cursor-cloud-analysis.md).--metadata-out: Path to the metadata JSON output (default:cursor-cloud-analysis.json).--base-url: Cursor Cloud API base URL (default:https://api.cursor.com, or viaCURSOR_CLOUD_BASE_URL).--api-key: Cursor Cloud API key (can also be set viaCURSOR_CLOUD_API_KEY).
Note: The tool will prioritize the first 200 changed files for analysis. The agent execution has a timeout of 15 minutes.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cursor_review-0.1.1.tar.gz.
File metadata
- Download URL: cursor_review-0.1.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
864c7e28f50fc2f923a0736da869e0f9fd78c1315069e3a2f6e21121ed60be30
|
|
| MD5 |
4425c6efee249e4c51be20975ec75053
|
|
| BLAKE2b-256 |
b9204139fcec2b4d180492d1d9e660730765560ff27d88542ac3fc197f65f957
|
Provenance
The following attestation bundles were made for cursor_review-0.1.1.tar.gz:
Publisher:
publish.yml on maravedi/cursor-review
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cursor_review-0.1.1.tar.gz -
Subject digest:
864c7e28f50fc2f923a0736da869e0f9fd78c1315069e3a2f6e21121ed60be30 - Sigstore transparency entry: 732028735
- Sigstore integration time:
-
Permalink:
maravedi/cursor-review@c339e570b05e9d2a2e0bd882b9e63ad72d0f7dcf -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/maravedi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c339e570b05e9d2a2e0bd882b9e63ad72d0f7dcf -
Trigger Event:
release
-
Statement type:
File details
Details for the file cursor_review-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cursor_review-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
322ba66c3caf114f6bb0408c49c8cb3e6ba5d566f9fdcd2153236421b78cf822
|
|
| MD5 |
4425cd20d02df97b2df97272553ab5fe
|
|
| BLAKE2b-256 |
bea50b52bd3ba6d71de065766a9d0a958ea9922088258974ecac5ecbb421308b
|
Provenance
The following attestation bundles were made for cursor_review-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on maravedi/cursor-review
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cursor_review-0.1.1-py3-none-any.whl -
Subject digest:
322ba66c3caf114f6bb0408c49c8cb3e6ba5d566f9fdcd2153236421b78cf822 - Sigstore transparency entry: 732028736
- Sigstore integration time:
-
Permalink:
maravedi/cursor-review@c339e570b05e9d2a2e0bd882b9e63ad72d0f7dcf -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/maravedi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c339e570b05e9d2a2e0bd882b9e63ad72d0f7dcf -
Trigger Event:
release
-
Statement type: