TUI for browsing AWS CodeCommit PRs
npm install @knpkv/codecommitCLI and TUI for AWS CodeCommit pull requests.
- AWS SSO configured (~/.aws/config)
- IAM permissions for CodeCommit (optionally granted per command):
- codecommit:ListRepositories, codecommit:ListPullRequests, codecommit:GetPullRequest — list/view
- codecommit:CreatePullRequest — create
- codecommit:UpdatePullRequestTitle, codecommit:UpdatePullRequestDescription — update
- codecommit:GetCommentsForPullRequest — export
- codecommit:ListBranches — branch listing
``bash`
pnpx @knpkv/codecommit
`bash`
pnpm add @knpkv/codecommit
`bash`
codecommitor
codecommit tui
`bash`
codecommit web [--port 3000] [--hostname 127.0.0.1]
#### List PRs
`bash`
codecommit pr list [options]
| Option | Alias | Description | Default |
| ----------- | ----- | ----------------------- | ----------- |
| --profile | -p | AWS profile | default |--region
| | -r | AWS region | us-east-1 |--status
| | -s | PR status (OPEN/CLOSED) | OPEN |--all
| | -a | Show all PRs | false |--repo
| | | Filter by repository | - |--author
| | | Filter by author | - |--json
| | | Output as JSON | false |
`bash`
codecommit pr list
codecommit pr list --status CLOSED
codecommit pr list --all
codecommit pr list --repo my-repo
codecommit pr list --author jane
codecommit pr list --json
Output:
`
Found 3 open PR(s):
123 my-repo
Add feature X
feature/x -> main
by alice approved mergeable
124 my-repo
Fix bug Y
fix/y -> main
by bob conflicts
`
#### Create PR
`bash`
codecommit pr create
| Option | Alias | Description | Default |
| --------------- | ----- | ------------------ | ----------- |
| --source | -s | Source branch | (required) |--destination
| | -d | Destination branch | main |--description
| | | PR description | - |--profile
| | -p | AWS profile | default |--region
| | -r | AWS region | us-east-1 |
`bash`
codecommit pr create my-repo "Add feature X" -s feature/x -d main --description "Implements feature X"
#### Export PR Comments
Export PR comments as markdown with multi-level thread structure.
`bash`
codecommit pr export
| Option | Alias | Description | Default |
| ----------- | ----- | ---------------- | ----------- |
| --output | -o | Output file path | stdout |--profile
| | -p | AWS profile | default |--region
| | -r | AWS region | us-east-1 |
`bash`
codecommit pr export 123 my-repo
codecommit pr export 123 my-repo -o pr-comments.md
#### Update PR
`bash`
codecommit pr update
| Option | Alias | Description | Default |
| --------------- | ----- | ------------------ | ----------- |
| --title | -t | New PR title | - |--description
| | -d | New PR description | - |--profile
| | -p | AWS profile | default |--region
| | -r | AWS region | us-east-1 |
`bash`
codecommit pr update 123 -t "New title"
codecommit pr update 123 -d "Updated description"
codecommit pr update 123 -t "New title" -d "New description"
Uses AWS SSO. Configure profiles in ~/.aws/config:
`ini`
[profile my-profile]
sso_session = my-sso
sso_account_id = 123456789012
sso_role_name = MyRole
region = us-east-1
Specify profile with --profile or AWS_PROFILE` env var.
MIT