### Install gut-cli using npm Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md This command installs the gut-cli globally on your system using npm, making the gut command available in your terminal. ```bash npm install -g gut-cli ``` -------------------------------- ### Manage gut-cli Configuration Source: https://context7.com/gitton-dev/gut-cli/llms.txt Manage gut-cli configuration settings, including output language, for both global and per-repository scopes. Supports listing, setting, getting, and shortcut commands for language settings. ```bash # List all settings gut config list # Output: # Configuration: # lang: en (global) # Set language to Japanese (global) gut config set lang ja # Set language for current repository only gut config set lang en --local # Get current language setting gut config get lang # Shortcut for language setting gut lang ja gut lang en --local # Show current language gut lang ``` -------------------------------- ### Gut Init: Initialize Gut Templates Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Initializes the `.gut/` directory with customizable templates. Supports forcing overwrites, skipping translation, and specifying an AI provider for translation. ```bash # Copy all templates to .gut/ (translates if language is not English) gut init # Force overwrite existing templates gut init --force # Skip translation (copy English templates as-is) gut init --no-translate # Use specific provider for translation gut init --provider openai ``` -------------------------------- ### Initialize gut-cli Templates Source: https://context7.com/gitton-dev/gut-cli/llms.txt Initialize the `.gut/` directory with customizable templates for various git tasks. Supports translation, forcing overwrites, and skipping translation for English-only templates. ```bash # Copy all templates to .gut/ (translates if language is not English) gut init # Creates: # .gut/commit.md # .gut/pr.md # .gut/branch.md # .gut/review.md # .gut/merge.md # .gut/explain.md # .gut/find.md # .gut/changelog.md # .gut/stash.md # .gut/summary.md # Force overwrite existing templates gut init --force # Skip translation (copy English templates as-is) gut init --no-translate ``` -------------------------------- ### Initialize gut-cli Project Templates Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Initializes project-specific templates within the `.gut/` directory, allowing for customization of prompts and behaviors for various gut commands. ```bash # Initialize .gut/ templates in your project gut init ``` -------------------------------- ### Generate AI-Powered Pull Request Descriptions Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Generates pull request titles and descriptions using AI. Supports specifying a base branch, creating the PR directly using the GitHub CLI, and copying the description to the clipboard. ```bash # Generate PR description gut pr # Specify base branch gut pr --base develop # Create PR directly (requires gh CLI) gut pr --create # Copy to clipboard gut pr --copy ``` -------------------------------- ### Stash Management with AI Descriptions (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Provides AI-powered generation of descriptive names for stashed changes, along with convenient wrappers for common stash operations like listing, applying, popping, dropping, and clearing stashes. ```bash # Stash with AI-generated name gut stash # Output: ✓ Stashed: WIP: refactoring auth middleware rate limiting # Stash with custom name gut stash "working on auth" # List all stashes gut stash --list # Output: # Stashes: # 0 WIP: refactoring auth middleware rate limiting # 1 WIP: debugging login flow # 2 working on auth # Apply latest stash (keeps stash) gut stash --apply # Apply specific stash by index gut stash --apply 2 # Pop stash (apply and remove) gut stash --pop # Drop a specific stash gut stash --drop 1 # Clear all stashes (with confirmation) gut stash --clear ``` -------------------------------- ### Manage gut-cli Configuration Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Allows you to manage the configuration settings for gut-cli, such as setting the AI output language or specifying preferred AI providers. ```bash # Manage configuration (language, etc.) gut config # Set or show output language gut lang ``` -------------------------------- ### Sync Git Repository with AI Assistance Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Synchronizes your local repository with the remote, performing a fetch and then intelligently rebasing or merging based on the situation. This command helps keep your local branch up-to-date. ```bash # Sync with remote (fetch + rebase/merge) gut sync ``` -------------------------------- ### Explain Code Changes with AI (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Provides AI-powered explanations for uncommitted changes, staged changes, specific commits, GitHub PRs, or file contents. Supports various output formats including JSON. ```bash # Explain uncommitted changes (default) gut explain # Output: # ✏️ Explanation # Summary: Adding rate limiting to API endpoints # Purpose: Prevent abuse and ensure fair usage # Key Changes: # src/middleware/rateLimit.ts # New middleware implementing token bucket algorithm # Explain staged changes only gut explain --staged # Explain a specific commit gut explain abc123 gut explain HEAD # Explain a GitHub PR (requires gh CLI) gut explain 123 gut explain #123 # Explain a file's purpose and contents gut explain src/index.ts # Output: # 📄 Explanation # Summary: Main entry point for the CLI application # Purpose: Initializes commander and registers all commands # Components: # Command Registration # Sets up 17 subcommands organized by category # Explain file's recent change history gut explain src/index.ts --history # Analyze multiple recent commits for a file gut explain src/index.ts --history -n 5 # Output as JSON gut explain --json ``` -------------------------------- ### Generate Work Summaries with AI Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Creates daily or weekly work summaries based on your Git activity, useful for reporting or personal tracking. This command helps consolidate your contributions. ```bash # Generate work summary (daily/weekly reports) gut summary ``` -------------------------------- ### Find Commits with AI Search Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Enables searching for commits using natural language descriptions powered by AI. Supports filtering by author, date, and path, limiting the number of results, and outputting in JSON format. ```bash # Find commits related to a feature gut find "login feature" # Find bug fixes gut find "fixed the crash" # Search with filters gut find "API changes" --author "John" --since "2024-01-01" # Limit search scope gut find "refactoring" --path src/lib --num 50 # Output as JSON gut find "authentication" --json ``` -------------------------------- ### Generate Pull Request Descriptions with AI using gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Create AI-powered titles and descriptions for pull requests by comparing the current branch to the base branch. It respects GitHub's PR templates and falls back to custom templates. Options include specifying the base branch, creating the PR directly using the `gh` CLI, and copying the description. ```bash # Generate PR description (auto-detects base branch) gut pr # Output: # 📝 Generated PR: # Title: Add user authentication with JWT tokens # Description: # ────────────────────────────────────────────────── # ## Summary # This PR implements JWT-based authentication... # Specify base branch explicitly gut pr --base develop # Create PR directly using gh CLI gut pr --create # Prompts: Create PR with gh CLI? (y/N) # Copy generated description to clipboard gut pr --copy # Use specific provider gut pr --provider anthropic ``` -------------------------------- ### Generate Branch Names from Issues or Descriptions (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Automates the generation of descriptive branch names from GitHub issues or provided descriptions. Supports specifying branch type prefixes and auto-checkout functionality. ```bash # Generate from GitHub issue (requires gh CLI) gut branch 123 gut branch #123 # Output: # Issue: Fix login timeout on slow connections # Generated branch name: # fix/123-login-timeout-slow-connections # Create and checkout this branch? (y/N) # Auto-checkout without confirmation gut branch 123 --checkout # Specify branch type prefix gut branch 123 --type feature # Result: feature/123-login-timeout # Generate from description instead of issue gut branch -d "add user authentication" # Output: # Generated branch name: # feature/add-user-authentication ``` -------------------------------- ### Generate Git Summaries with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Generate daily, weekly, or custom-date-range summaries of git activity. Options include adding diffs, outputting in markdown, copying to clipboard, or filtering by author. ```bash # Daily report shortcut gut summary --daily # Weekly report with higher-level summary gut summary --weekly # Custom date range gut summary --since "2024-01-01" --until "2024-01-31" # Include diff for more detailed analysis gut summary --weekly --with-diff # Output as markdown (great for Slack/docs) gut summary --weekly --markdown # Copy to clipboard gut summary --daily --copy # Specify different author gut summary --author "Jane Smith" ``` -------------------------------- ### Manage AI Provider API Keys with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Securely save, check, and remove API keys for AI providers like Gemini, OpenAI, and Anthropic using the system keychain. Alternatively, API keys can be set via environment variables. ```bash # Save API key to system keychain (prompts for key securely) gut auth login --provider gemini # Save API key directly (not recommended for scripts) gut auth login --provider openai --key sk-your-api-key # Check which providers have API keys configured gut auth status # Output: # Gemini ✓ configured # OpenAI ○ not set # Anthropic ○ not set # Remove an API key from keychain gut auth logout --provider gemini # Environment variable alternatives export GUT_GEMINI_API_KEY="your-key" export GUT_OPENAI_API_KEY="your-key" export GUT_ANTHROPIC_API_KEY="your-key" ``` -------------------------------- ### Gut Auth: Manage AI Provider API Keys Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Manages API keys for AI providers like Gemini, OpenAI, and Anthropic. Supports logging in (saving keys securely), checking status, and logging out (removing keys). ```bash # Save API key to system keychain gut auth login --provider gemini # Check which providers are configured gut auth status # Remove API key gut auth logout --provider gemini ``` -------------------------------- ### Generate AI-Powered Changelogs Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Generates changelogs for your project using AI, summarizing changes across commits or releases. ```bash # Generate changelog gut changelog ``` -------------------------------- ### Gut Stash: Manage Stashes with AI Names Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Allows stashing changes with AI-generated descriptive names, applying, popping, dropping, or clearing stashes. Supports custom names and applying/dropping specific stashes. ```bash # Stash with AI-generated name gut stash # Stash with custom name gut stash "working on auth" # List all stashes gut stash --list # Apply latest stash gut stash --apply # Apply specific stash gut stash --apply 2 # Pop stash gut stash --pop # Drop stash gut stash --drop 1 # Clear all stashes gut stash --clear ``` -------------------------------- ### AI Code Review with gut-cli Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Provides AI-powered code reviews for uncommitted changes, staged changes, specific commits, or GitHub Pull Requests. Can output results in JSON format. ```bash # Review all uncommitted changes gut review # Review staged changes only gut review --staged # Review specific commit gut review --commit abc123 # Review a GitHub PR by number gut review 123 # Output as JSON gut review --json ``` -------------------------------- ### Find Commits with Natural Language Search (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Enables searching through commit history using natural language queries. AI semantically matches commits based on their messages and supports filtering by author, date, path, and limiting results. ```bash # Find commits related to a feature gut find "login feature" # Output: # 🔍 Found 3 matching commit(s) # Query: "login feature" # 📝 Commit 1 # Hash: abc1234 # Message: feat: implement JWT login flow # Author: John Doe # Date: 2024-01-15T10:30:00Z # Reason: Implements the core login functionality with JWT # Match: high # Find with filters gut find "API changes" --author "John" --since "2024-01-01" # Limit search scope gut find "refactoring" --path src/lib --num 50 # Limit results returned gut find "authentication" --max-results 3 # Output as JSON for scripting gut find "bug fix" --json ``` -------------------------------- ### Gut Sync: Sync Branch with Remote Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Synchronizes the current branch with its remote counterpart by performing a fetch, rebase, and push. Supports options for stashing changes, using merge instead of rebase, and skipping the push. ```bash # Sync current branch (fetch + rebase + push) gut sync # Auto-stash changes before sync gut sync --stash # Use merge instead of rebase gut sync --merge # Skip push gut sync --no-push ``` -------------------------------- ### Sync Current Branch with Remote (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Synchronizes the current local branch with its remote counterpart using fetch and rebase (or merge), followed by a push. It can automatically stash and restore local changes. ```bash # Sync current branch (fetch + rebase + push) gut sync # Output: # ✓ Synced successfully # Pushed 2 commit(s) # Auto-stash changes before sync gut sync --stash # Output: # Stashing changes... # Fetching from remote... # Syncing with origin/main (rebase)... # ✓ Synced successfully # Restored stashed changes # Use merge instead of rebase gut sync --merge # Skip push after syncing gut sync --no-push # Force sync even with uncommitted changes gut sync --force ``` -------------------------------- ### AI-Powered Code Review with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Perform AI-driven code reviews on uncommitted changes, specific commits, or GitHub pull requests. The tool provides structured feedback including severity levels and actionable suggestions. Output can be formatted as JSON for scripting. ```bash # Review all uncommitted changes gut review # Output: # 🔍 AI Code Review # Summary: The changes add authentication but have security concerns # Issues Found: # 🔴 CRITICAL # File: src/auth.ts:42 # Password stored in plain text # → Use bcrypt or argon2 for password hashing # 🟡 WARNING # File: src/auth.ts:15 # No input validation on email # → Add email format validation # Review staged changes only gut review --staged # Review a specific commit gut review --commit abc123 # Review a GitHub PR by number (requires gh CLI) gut review 123 # Output as JSON for automation gut review --json # Output: {"prInfo": null, "review": {"summary": "...", "issues": [...], "positives": [...]}} ``` -------------------------------- ### Generate Git Commit Messages with AI Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Automates the creation of commit messages using AI. It can auto-stage changes if none are staged, force staging all changes, or use a specific AI provider like OpenAI. ```bash # Generate commit message (auto-stages if nothing staged) gut commit # Auto-commit with generated message gut commit --commit # Force stage all changes gut commit --all # Use specific provider gut commit --provider openai ``` -------------------------------- ### Generate Work Summaries from Commits (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Creates work summaries from commit history, suitable for daily standups or weekly reports. It automatically filters by the current Git user and date range. ```bash # Today's summary (uses current git user) gut summary # Output: # 📊 Daily Work Summary - January 15, 2024 # Author: John Doe # Period: today - now ``` -------------------------------- ### Checkout with AI-Generated Branch Name (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Analyzes current uncommitted or staged changes to generate an appropriate branch name and then checks out that new branch. This is useful when work has begun without a dedicated branch. ```bash # Generate branch name from uncommitted changes gut checkout # Output: # Generated branch name: # feature/add-rate-limiting-middleware # Create and checkout this branch? (y/N) # Auto-checkout without confirmation gut checkout --yes # Use only staged changes for analysis gut checkout --staged # Use specific provider gut checkout --provider openai ``` -------------------------------- ### Generate Git Changelogs with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Automate changelog generation from git commits, organizing changes into conventional categories. Supports generating from the latest commits, between specific references, since a tag, or outputting as JSON. ```bash # Generate changelog for last 10 commits gut changelog # Output: # 📋 Generated Changelog # ────────────────────────────────────────────────── # ## 2024-01-15 # ### Added # - JWT refresh token rotation with configurable expiry # - Rate limiting middleware for API endpoints # ### Fixed # - Password reset vulnerability allowing token reuse # ### Changed # - Updated authentication flow to use httpOnly cookies # Generate changelog between refs gut changelog v1.0.0 v1.1.0 # Generate changelog since a tag gut changelog --tag v1.0.0 # Output as JSON gut changelog --json ``` -------------------------------- ### Gut Checkout: Generate Branch Name and Checkout Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Generates a branch name from uncommitted changes and checks out the new branch. Supports options for confirmation, using only staged changes, and specifying an AI provider. ```bash # Generate branch name from uncommitted changes gut checkout # Auto-checkout without confirmation gut checkout --yes # Use only staged changes gut checkout --staged # Use specific provider gut checkout --provider openai ``` -------------------------------- ### Generate Git Commit Messages with AI using gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Automate the creation of commit messages based on staged Git changes. The tool can auto-stage all changes if none are staged and supports custom templates. Options include auto-committing, forcing staging, and specifying AI providers/models. ```bash # Generate commit message (auto-stages if nothing staged) gut commit # Output: # Generated commit message: # feat: add user authentication with JWT tokens # Commit with this message? (y/N/e to edit) # Auto-commit with generated message (no confirmation) gut commit --commit # Force stage all changes before generating gut commit --all # Use specific AI provider and model gut commit --provider openai --model gpt-4 # Interactive options: # y - commit with generated message # n - cancel (prints manual command) # e - open message in editor for modification ``` -------------------------------- ### AI-Assisted Merge Conflict Resolution with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Resolve Git merge conflicts using AI assistance. The tool displays conflict previews and AI-generated suggestions for each conflicted file, prompting for interactive confirmation before applying resolutions. It also supports an option to prevent auto-committing after resolution. ```bash # Merge a branch with AI conflict resolution gut merge feature/login # Output: # Merging feature/login into main... # ⚠ 2 conflict(s) detected # 📄 src/auth.ts # ────────────────────────────────────────────────── # <<<<<<< HEAD # const timeout = 3000; # ======= # const timeout = 5000; # >>>>>>> feature/login # ────────────────────────────────────────────────── # 🤖 AI suggests: # const timeout = 5000; // Using feature branch value for longer timeout # Strategy: theirs # Accept this resolution? (y/n/s to skip) # Don't auto-commit after resolving all conflicts gut merge feature/login --no-commit ``` -------------------------------- ### Merge Feature Branch with Specific Provider (CLI) Source: https://context7.com/gitton-dev/gut-cli/llms.txt Demonstrates merging a feature branch using a specified provider, such as 'openai'. This command is part of the gut-cli's broader functionality for managing Git workflows. ```bash gut merge feature/login --provider openai ``` -------------------------------- ### AI-Generated Stash Names Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Stashes changes in your working directory and uses AI to generate a memorable name for the stash, making it easier to recall and manage later. ```bash # Stash with AI-generated names gut stash ``` -------------------------------- ### Gut Lang: Set or Show AI Output Language Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Sets or displays the AI output language for Gut CLI. This is a shortcut for `gut config set lang`. Supports setting language globally or locally for the current repository. ```bash # Show current language gut lang # Set to Japanese gut lang ja # Set to English gut lang en # Set for current repository only gut lang en --local ``` -------------------------------- ### Generate Git Branch Names with AI Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Generates descriptive branch names using AI, often based on GitHub issue numbers. Supports automatically checking out the generated branch and specifying branch types (e.g., 'fix'). ```bash # Generate branch name from issue number (requires gh CLI) gut branch 123 gut branch #123 # Auto-checkout the branch gut branch 123 --checkout # Specify branch type gut branch 123 --type fix ``` -------------------------------- ### Gut Changelog: Generate Changelog from Commits Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Generates a changelog from Git commits. Supports generating for the last N commits, between specific references, since a tag, and outputting in JSON format. ```bash # Generate changelog for last 10 commits gut changelog # Generate changelog between refs gut changelog v1.0.0 v1.1.0 # Generate changelog since a tag gut changelog --tag v1.0.0 # Output as JSON gut changelog --json ``` -------------------------------- ### AI-Assisted Git Merge Conflict Resolution Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Resolves merge conflicts using AI. It can merge a specified branch and automatically attempt conflict resolution, with options to use a specific provider or prevent auto-committing after resolution. ```bash # Merge a branch with AI conflict resolution gut merge feature/login # Use specific provider gut merge feature/login --provider openai # Don't auto-commit after resolving gut merge feature/login --no-commit ``` -------------------------------- ### Clean Up Git Branches with gut-cli Source: https://context7.com/gitton-dev/gut-cli/llms.txt Safely delete merged git branches, with options for dry runs, local-only cleanup, remote cleanup, forcing deletion without confirmation, and specifying a base branch for comparison. ```bash # Show merged branches that can be deleted (dry run) gut cleanup --dry-run # Output: # Found 3 merged branch(es): # • feature/old-login # • fix/typo-in-readme # • chore/update-deps # (dry-run mode - no branches were deleted) # Delete all merged local branches (with confirmation) gut cleanup # Prompts: Delete these branches? (y/N) # Also delete remote branches gut cleanup --remote # Skip confirmation prompt gut cleanup --force # Specify base branch for comparison gut cleanup --base develop ``` -------------------------------- ### Gut Cleanup: Delete Merged Branches Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Safely deletes merged branches. Supports dry runs to show deletable branches, deleting remote branches, and forcing deletion without confirmation. ```bash # Show merged branches that can be deleted gut cleanup --dry-run # Delete all merged local branches (with confirmation) gut cleanup # Also delete remote branches gut cleanup --remote # Skip confirmation prompt gut cleanup --force ``` -------------------------------- ### Gut Branch: Delete Branch Source: https://github.com/gitton-dev/gut-cli/blob/main/README.md Deletes a specified branch. This command is useful for cleaning up old or merged branches. ```bash gut branch -d "add user authentication" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.