PR → AI review, fully automated.
- Gathering diffs, comments, and metadata requires multiple API calls
- AWS CLI is fragmented — no single command for PR data
- Copy-pasting into AI tools is a waste of time
ccpr solves all of this.
ccpr review <PR_URL> --format json | claude -p "Review this PR"aws codecommit get-pull-request --pull-request-id 123
aws codecommit get-comments-for-pull-request --pull-request-id 123
aws codecommit get-differences --repository-name my-repo \
--before-commit-specifier main --after-commit-specifier feature/x
# + manually assemble and paste into AI...ccpr review <PR_URL> --format json | claude -p "Review this PR"Fetches PR metadata, comments, and diff in one shot — ready for AI.
Pick one install method:
# Homebrew (macOS / Linux) — installs both ccpr and ccpr-mcp
brew install --cask hidetzu/tap/ccpr
# Arch Linux (AUR) — installs both ccpr and ccpr-mcp
yay -S ccpr-bin # or: paru -S ccpr-bin
# Prebuilt binary
# Download from https://github.com/hidetzu/ccpr/releases/latest
# Go toolchain (requires Go 1.25+)
go install github.com/hidetzu/ccpr/cmd/ccpr@latestThen:
ccpr init
ccpr review <codecommit-pr-url>- AI code review (Claude / GPT)
- PR summary generation
- Automated review in CI
- CLI-only PR workflow (list / review / create)
- Auto-post review comments
ccpr review <PR_URL> --format json | claude -p "Review this PR"Paste this into Claude Code to install and set up ccpr:
Read https://raw.githubusercontent.com/hidetzu/ccpr/main/docs/claude-integration.md and install ccpr
mkdir -p .claude/skills/ccpr-review
cp /path/to/ccpr/examples/claude/ccpr-review/SKILL.md .claude/skills/ccpr-review//ccpr-review <codecommit-pr-url>
See docs/claude-integration.md for full setup guide.
ccpr also provides an experimental MCP server binary for Claude Code and other MCP clients. Currently exposed tools:
ccpr_list List PRs for a repository (read-only)
ccpr_review Fetch PR metadata, comments, and diff (read-only)
ccpr_comment Post a comment to a PR (write-side)
ccpr_create Create a PR (write-side)
If you installed ccpr via Homebrew or a prebuilt release, ccpr-mcp is already on your PATH. Otherwise build it locally:
make build-mcpRegister it with Claude Code:
# Homebrew / prebuilt installs
claude mcp add ccpr -- ccpr-mcp
# Local build
claude mcp add ccpr -- /path/to/ccpr/bin/ccpr-mcpThen ask Claude Code to list or review CodeCommit PRs:
ccpr_listacceptsrepo,status,region,profile, andconfig, and returns the same PR summary schema asccpr list --format json(wrapped underpullRequests).ccpr_reviewaccepts eitherurlorrepo+prId, plus optionalregion,profile, andconfig, and returns the same{metadata, comments, diff}payload asccpr review --format json.ccpr_commentacceptsbodyand eitherurlorrepo+prId, plus optionalregion,profile, andconfig, and returns the same{commentId, pullRequestId, authorArn, creationDate}payload asccpr comment --format json. Write-side: each successful call posts a real comment to CodeCommit, so MCP hosts should prompt before invocation.ccpr_createacceptsrepo,title,sourceBranch,destinationBranch, plus optionaldescription,region,profile, andconfig, and returns the same{prId, title, repository, sourceBranch, destinationBranch, url}payload asccpr create --format json. Write-side: each successful call creates a real PR in CodeCommit, so MCP hosts should prompt before invocation. Unlike the CLI,sourceBranchis required — MCP has no implicit working-directory context for auto-detecting the current branch.
- Fetch PR data (summary / json / patch)
- List PRs
- Create PRs
- Post comments
- Open PRs in browser
- Full CodeCommit workflow from CLI
Commands
# Review
ccpr review <PR_URL> # Summary (default)
ccpr review <PR_URL> --format json # JSON for AI tools
ccpr review <PR_URL> --format patch # Diff only
# List
ccpr list --repo <repo> # OPEN PRs (default)
ccpr list --repo <repo> --status closed # CLOSED PRs
ccpr list --repo <repo> --format json # JSON output
# Create
ccpr create --repo <repo> --title "Add feature X" --dest main
ccpr create --repo <repo> --title "Add feature X" --dest main --source feature/x
# Comment
ccpr comment <PR_URL> --body "LGTM"
ccpr comment <PR_URL> --body-file review.md
# Other
ccpr open <PR_URL> # Open PR in browser
ccpr init # Generate config file
ccpr doctor # Validate environment and configOutput examples
$ ccpr review <codecommit-pr-url>
PR #883: Fix login bug
Author: example-user
Status: OPEN
Branch: feature/login → main
Created: 2026-03-25
Comments: 3 (2 threads)
Files: 7 changed
## Description
Fix session timeout on login page
{
"metadata": {
"prId": "883",
"title": "Fix login bug",
"author": "example-user",
"sourceBranch": "feature/login",
"destinationBranch": "main",
"status": "OPEN",
"creationDate": "2026-03-25T10:30:00Z"
},
"comments": [...],
"diff": "diff --git a/src/login.go ..."
}JSON output contract
ccpr guarantees stable JSON output within v1.x releases.
- JSON Output Reference — field definitions for all commands
- Versioning Policy — SemVer rules and backward compatibility guarantees
~/.config/ccpr/config.yaml
profile: your-aws-profile
region: ap-northeast-1
repoMappings:
your-repo: /path/to/local/cloneAWS Profile Resolution: --profile flag > config file > AWS_PROFILE env > default
AWS Region Resolution: PR URL (auto) > --region flag > config file > AWS_REGION env > AWS_DEFAULT_REGION env
- Run
ccpr doctorfirst - Check AWS credentials:
aws sts get-caller-identity --profile your-aws-profile - Using SSO? Run
aws sso login --profile your-aws-profilefirst no local path mapping→ add repo torepoMappingsin config.yamlregion is required→ set via--regionflag, config file, orAWS_REGION/AWS_DEFAULT_REGIONenv- Empty diff → run
git fetch originand retry
make build # Build binary to bin/ccpr
make build-mcp # Build MCP server binary to bin/ccpr-mcp
make test # Run all tests with -v -race
make lint # golangci-lint
make vet # go vet
make clean # Remove bin/MIT