Interactive commit selection for upstream contributions
Chuck helps you easily select which commits from your template-based project should go back to the upstream template. No more manually figuring out what's template-worthy vs app-specific!
When you create an app from a GitHub template and build your app, you make commits that are:
- ✅ Template-worthy: Shared utilities, bug fixes, improvements everyone could use
- ❌ App-specific: Your business logic, config, deployment scripts
Chuck makes it trivial to interactively select the good stuff and create a clean branch ready for upstream contribution.
Works with GitHub templates via .chuckrc configuration!
- GitHub CLI (brew install gh)
- Rust (for building from source)
Chuck works with GitHub templates using .chuckrc configuration:
Add a .chuckrc file to your template repository:
When someone creates a project from your template, this file comes with it and Chuck automatically:
- Reads the template URL from .chuckrc
- Adds it as a remote named "chuck-template"
- Fetches the latest changes
- Compares commits and shows the interactive selection
- [email protected]:owner/repo.git (SSH)
- https://github.com/owner/repo.git (HTTPS)
- https://github.com/owner/repo (HTTPS without .git)
Chuck will:
- Read .chuckrc to find the template repository URL
- Add the template as a remote and fetch latest changes
- Show you all commits since the template's latest commit
- Let you interactively select which ones to contribute back
- Create a clean branch with just those commits
- Push the branch to the template repository
Chuck shows you a terminal UI like this:
Controls:
- ↑/↓ or j/k - Navigate between commits
- Space - Toggle selection
- a - Select all commits
- n - Select none (clear all)
- i - Invert selection
- h or ? - Show help
- Enter - Create branch with selected commits
- q or Esc - Quit without doing anything
After selecting commits, Chuck will:
- Create a timestamped branch (e.g., chuck/20250120-143022)
- Cherry-pick your selected commits onto the template's base
- Attempt to push the branch to the template repository
- Provide you with a URL to create the pull request
- Must be run in a GitHub repository created from a template
- GitHub CLI must be installed and authenticated (gh auth login)
- Repository must have a .chuckrc file with template URL
- Repository must have commits since the template's latest commit
Chuck gives helpful error messages:
- No .chuckrc: "No template found. Chuck needs a .chuckrc file with template URL."
- No GitHub CLI: "GitHub CLI not found. Install with: brew install gh"
- Not authenticated: "Make sure you're in a GitHub repository and authenticated with 'gh auth login'"
- No commits: "Looks like you haven't made any commits since the template. Get to work!"
Current version: 0.2.3
.png)
