@bobbyy16/cherrypick-terminal
v0.2.1
Published
Interactive terminal UI for git cherry-pick with PR creation
Downloads
63
Maintainers
Readme
🍒 CherryPick Terminal
An interactive terminal UI for git cherry-pick — browse commits, select what you want, preview diffs, squash, undo, and optionally create a GitHub PR. No gh CLI required.
Installation
npm install -g @bobbyy16/cherrypick-terminalUsage
Navigate to any Git repository and run:
cherrypickYou'll first be prompted to select the source branch (the branch you want to cherry-pick FROM). The app then shows only commits unique to that branch relative to your current branch.
Features
Navigation
| Key | Action |
|-----|--------|
| ↑ / k ↓ / j | Move cursor up / down |
| g | Jump to first commit |
| G | Jump to last commit |
| Tab | Switch focus to diff panel (scroll it) |
| Esc / Tab | Return focus to commit list |
Selection
| Key | Action |
|-----|--------|
| Space | Toggle commit selection |
| a | Select all visible / deselect all |
| r | Reverse the current selection order |
Commits are cherry-picked in the order you selected them — shown as [1], [2]… on each row. Select oldest commits first to avoid conflicts.
Actions
| Key | Action |
|-----|--------|
| Enter | Cherry-pick selected commits (in selection order) |
| u | Undo last cherry-pick (git reset --hard HEAD~N) |
| s | Toggle squash mode — combines all selected commits into one |
| d | Toggle diff view: file stat ↔ full unified diff |
| b | Change source branch |
| p | Create a GitHub Pull Request |
| t | Set / update your GitHub token |
| / | Search commits by message, author, or hash |
| Esc | Clear search |
| ? / h | Open help overlay |
| q / Ctrl+C | Quit |
Squash Mode
Press s to enable squash mode (shown in the header). When you cherry-pick, after all commits are applied you'll be prompted for a single commit message — all selected commits are squashed into one.
Undo
After a cherry-pick completes, press u to undo it. A confirmation dialog shows which commits will be reset. Uses git reset --hard HEAD~N locally — does not affect the remote.
Branch Selector
The branch selector supports live filtering — type to narrow the list. Branches are labeled (local) or (remote). Press Tab to switch between the filter box and the branch list.
Diff Preview
The right panel shows a colorized git show --stat by default. Press d to toggle to the full unified diff. Press Tab to focus the panel and scroll through it.
Conflict Handling
If a cherry-pick conflicts, the app pauses and shows the conflicted files.
- Resolve conflicts in your editor
- Press
cin the app → runsgit cherry-pick --continue - Press
a→ runsgit cherry-pick --abort
Switching branches (b) is blocked while a conflict is active.
GitHub Token (for PR creation)
On first launch the app prompts for a GitHub Personal Access Token with repo scope. It is stored securely in your OS config directory via conf — never hardcoded or committed.
GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic) →
reposcope.
Press t at any time to update your token.
Dependencies
blessed— Terminal UIsimple-git— Git operations@octokit/rest— GitHub APIconf— Token persistence
Changelog
0.2.1
- Fix: removed accidental self-dependency from package.json
0.2.0
- Selection order tracking — commits cherry-picked in the order you select them (
[1],[2]…) - New:
aselect all / deselect all - New:
rreverse selection order - New:
ssquash mode (combine selected commits into one) - New:
uundo last cherry-pick with confirmation - New:
dtoggle between stat and full diff view - New:
g/Gjump to first/last commit - New:
Tabfocus diff panel for scrolling - New:
?/hhelp overlay - Branch selector with live filter and local/remote labels
- Colorized diff output (added/removed lines, file stats)
- Fixed: race condition in diff panel when navigating quickly
- Fixed: branch switching blocked during active conflicts
- Fixed: token validated before GitHub API call
- Fixed: push failure no longer clears selection prematurely
- Fixed: error handling on all git operations (no more uncaught crashes)
0.1.9
- Initial stable release
Author
Abhishek k
