GitHub CLI tools powered by Claude AI for intelligent commits, PRs, and automation.
- AI-powered commit messages - Generate conventional commit messages based on your changes
- Automated PR creation - Create PRs with AI-generated titles and descriptions
- Auto-merge support - Enable auto-merge for your PRs with a single command
- Branch management - Quickly create new branches from main
- Seamless workflow - Commit, push, and create PRs in one command
Before installing gh-claude-tools, ensure you have the following installed:
- Git - Download
- GitHub CLI - Install with
brew install gh(macOS) or see installation guide - Claude CLI - Install with
npm install -g @anthropic-ai/claude-cli
# Install directly from GitHub
npm install -g github:decider/gh-claude-tools
# Or install from a specific branch
npm install -g github:decider/gh-claude-tools#main# Clone the repository
git clone https://github.com/decider/gh-claude-tools.git
cd gh-claude-tools
# Install globally
npm install -g .
# Or link for development
npm linkThe post-install script will verify all prerequisites are installed.
All commands support a --debug or -d flag to show detailed logging information:
ghc --debug # Shows detailed API calls and processing stepsAutomatically stage changes and commit with an AI-generated message.
ghcFeatures:
- Stages all changes if none are staged
- Generates conventional commit message
- Shows existing PR if one exists
Commit changes, push to remote, and create/update a PR.
ghpFeatures:
- Commits uncommitted changes first
- Pushes to remote with tracking
- Creates new PR or updates existing one
- Auto-generates PR title and description
Same as ghp but also enables auto-merge.
ghpaFeatures:
- All features of
ghp - Enables squash auto-merge
- Perfect for quick iterations
Create a new branch from origin/main.
ghn feature-branch-nameFeatures:
- Fetches latest from origin
- Creates branch from origin/main
- Switches to new branch
Commit and push changes without creating a PR.
ghcpFeatures:
- Commits with AI-generated message
- Pushes to remote
- Shows PR status if one exists
# Create a new feature branch
ghn add-new-feature
# Make your changes...
# Then commit, push, and create PR with auto-merge
ghpa
# The PR will be created with AI-generated title and description
# Auto-merge will be enabled for when checks passgh-claude-tools works great in GitHub Actions workflows:
name: Auto PR
on: push
jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install gh-claude-tools
run: npm install -g gh-claude-tools
- name: Create PR with auto-merge
run: ghpa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}gh-claude-tools automatically handles Claude authentication by checking in this order:
- Environment Variable:
ANTHROPIC_API_KEY - Claude CLI: If you have Claude CLI installed and authenticated
- Saved Config: Previous API key saved in
~/.gh-claude-tools/config.json - Interactive Prompt: Only asks for API key if none of the above work
ANTHROPIC_API_KEY- Your Anthropic API key (optional if using Claude CLI)GITHUB_TOKEN- GitHub token (automatically set in GitHub Actions)
The tools respect your existing Git configuration for:
- Default branch (defaults to
main) - Remote name (defaults to
origin) - Committer name and email
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
Dan Seider
Built with:
- Claude AI for intelligent content generation
- GitHub CLI for GitHub integration
- Node.js for cross-platform compatibility