{"id":36593031,"url":"https://github.com/elifarley/hug-scm","last_synced_at":"2026-01-12T08:21:00.743Z","repository":{"id":319381159,"uuid":"1073919227","full_name":"elifarley/hug-scm","owner":"elifarley","description":"Humane Git wrapper / SCM CLI for safe, memorable commands + workflow automation, Git+Mercurial support, and repo analysis (churn/ownership/co-change). Includes an MCP server.","archived":false,"fork":false,"pushed_at":"2026-01-11T16:02:52.000Z","size":205403,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T19:38:02.385Z","etag":null,"topics":["cli","developer-tools","git","git-aliases","git-cli","git-client","git-wrapper","hg","mercurial","scm","terminal","version-control"],"latest_commit_sha":null,"homepage":"https://elifarley.github.io/hug-scm/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elifarley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-10T20:36:29.000Z","updated_at":"2026-01-11T16:02:55.000Z","dependencies_parsed_at":"2026-01-08T17:07:35.609Z","dependency_job_id":null,"html_url":"https://github.com/elifarley/hug-scm","commit_stats":null,"previous_names":["elifarley/hug-scm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elifarley/hug-scm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elifarley%2Fhug-scm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elifarley%2Fhug-scm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elifarley%2Fhug-scm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elifarley%2Fhug-scm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elifarley","download_url":"https://codeload.github.com/elifarley/hug-scm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elifarley%2Fhug-scm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","developer-tools","git","git-aliases","git-cli","git-client","git-wrapper","hg","mercurial","scm","terminal","version-control"],"created_at":"2026-01-12T08:21:00.095Z","updated_at":"2026-01-12T08:21:00.730Z","avatar_url":"https://github.com/elifarley.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hug SCM - The Humane Source Control Management Interface\n\n[![Tests](https://github.com/elifarley/hug-scm/actions/workflows/test.yml/badge.svg)](https://github.com/elifarley/hug-scm/actions/workflows/test.yml) [![Deploy Docs to GitHub Pages](https://github.com/elifarley/hug-scm/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/elifarley/hug-scm/actions/workflows/deploy-docs.yml) [![Regenerate VHS Images](https://github.com/elifarley/hug-scm/actions/workflows/regenerate-vhs-images.yml/badge.svg)](https://github.com/elifarley/hug-scm/actions/workflows/regenerate-vhs-images.yml)\n\nA humane, intuitive interface for Git and other version control systems. Hug transforms complex and forgettable Git commands into a simple, predictable language that feels natural to use, keeping you focused on your code, not on wrestling with version control.\n\n| [**\u0026rarr; View the Documentation**](https://elifarley.github.io/hug-scm/) | [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/elifarley/hug-scm) |\n| :--- | :--- |\n\n![Made with VHS](https://vhs.charm.sh/vhs-4D3aNvebEOccORctJOta77.gif)\n\n## Table of Contents\n- [What is Hug?](#what-is-hug)\n- [Why Hug?](#why-hug)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Command Reference](#command-reference)\n- [Philosophy](#philosophy)\n- [Testing](#testing)\n- [Roadmap](#roadmap)\n- [License](#license)\n\n## What is Hug?\n\nHug SCM is a humane interface layer for version control systems that currently supports **Git** and **Mercurial**.\nIt transforms complex, often intimidating SCM commands into an intuitive, predictable language that feels natural to developers.\n\nWith Hug, you get:\n\n- Intuitive commands that make sense\n- Progressive safety (shorter = safer, longer = more powerful)\n- Consistent patterns across all operations\n- Rich feedback and previews before destructive actions\n- **Multi-VCS support** - Use the same commands whether you're working with Git or Mercurial repositories\n\n## Why Hug?\n\nHug SCM delivers **four tiers of value** beyond raw Git:\n\n### 1. 🎯 Humanization - Better UX for Git\n- **Brevity Hierarchy**: Shorter = safer (`hug a` vs `hug aa`)\n- **Memorable Commands**: `hug back 1` vs `git reset --soft HEAD~1`\n- **Progressive Destructiveness**: `discard \u003c wipe \u003c purge \u003c zap \u003c rewind`\n- **Semantic Prefixes**: Commands grouped by purpose (`h*`, `w*`, `s*`, etc.)\n- **Built-in Safety**: Auto-backups, confirmations, dry-run modes\n- **Clear Feedback**: Informative messages with ✅ success, ⚠️ warnings\n\n### 2. ⚙️ Workflow Automation\n- **Combined Operations**: `--with-files` = log + file listing in one command\n- **Temporal Queries**: `-t \"3 days ago\"` instead of complex date math\n- **Smart Defaults**: Sensible scoping, interactive file selection\n- **Interactive Modes**: Gum-based selection with `--` flag\n\n### 3. 🔬 Computational Analysis ⭐ (Impossible with Pure Git!)\n- **Co-change Detection**: Statistical correlation of files that change together\n- **Ownership Calculation**: Recency-weighted expertise detection\n- **Dependency Graphs**: Graph traversal to find related commits via file overlap\n- **Activity Patterns**: Temporal histograms revealing team work patterns\n- **Churn Analysis**: Line-level change frequency for identifying hotspots\n\n*These features require Python-based data processing, graph algorithms, and statistical analysis—beyond what Git's plumbing can provide.*\n\n### 4. 🤖 Machine-Readable Data Export\n- **JSON Output**: `--json` flag on all analysis and workflow commands\n- **Automation Ready**: Build dashboards, integrate with CI/CD, MCP servers\n- **Structured Data**: All computational analysis exports valid JSON\n- **GitHub-Compatible**: Commit log schema aligns with GitHub API format\n\n```bash\n# Analysis with JSON output\nhug analyze co-changes 50 --json | jq '.correlations[0]'\nhug analyze expert src/auth/login.js --json | jq '.ownership[0]'\nhug stats file README.md --json | jq '.file_churn'\nhug analyze activity --by-hour --json | jq '.analysis.data'\n\n# Workflow commands with JSON (GitHub-compatible schema + Hug enhancements)\nhug ll -10 --json | jq '.commits[] | {sha, subject, author: .author.name}'\nhug ll --json --with-stats | jq '.commits[0].stats'\nhug ll --since=\"1 week ago\" --json | jq '.commits[].refs'\n```\n\n**In short**: Making operations trivial, keeping you safe, being discoverable, and providing computational superpowers.\n\n## Quick Start\n\n### Getting Started with a Repository\n\n```shell\n# Initialize a new repository (defaults to Git)\nhug init                    # Initialize Git repo in current directory\nhug init my-project         # Initialize Git repo in new directory\nhug init --hg               # Initialize Mercurial repo\n\n# Clone a repository (auto-detects Git or Mercurial)\nhug clone https://github.com/user/repo.git\nhug clone https://gitlab.com/user/repo.git my-repo\nhug clone --no-status https://bitbucket.org/user/repo.git  # Skip post-clone status\n```\n\n### Basic Workflow\n\n```shell\n# Check status with beautiful output\nhug sl # **S**tatus + **L**ist\n\n# Stage changes (smart defaults)\nhug a            # Stage tracked changes\nhug aa           # Stage everything including untracked (new) files\n\n# Commit with context\nhug c            # Commit staged changes\nhug ca           # Commit all tracked changes\nhug caa          # Commit all tracked \u0026 untracked changes\n\n# Branch operations\nhug bc feature              # Create and switch to new branch\nhug bc --point-to v1.0.0    # Create branch from tag (auto-generates name)\nhug bc hotfix --point-to v1.0.0  # Create named branch from tag\nhug bs                      # Switch back to previous branch\n\n# Worktree operations (parallel development)\nhug wtc feature-auth       # Create worktree for feature branch\nhug wt                     # Interactive worktree management\nhug wtl                    # List worktrees (short format)\nhug wtll                   # List worktrees with commit details\nhug wtsh                   # Show detailed worktree information\nhug wtdel feature-auth     # Remove worktree when done\n\n# Safe pull (fast-forward only; fails on divergence)\nhug bpull\n\n# Pull with rebase for linear history\nhug bpullr\n\n# Working directory cleanup\nhug w zap        # Complete cleanup (reset + purge) for specific files\nhug w zap-all    # Complete cleanup across the entire repository\n\n# Park WIP (preferred over stash)\nhug wip \"Draft feature\"    # Park and get a clean working directory (quick pause)\nhug wips \"Deep spike\"      # Park and stay (continue immediately)\n```\n\n### Common Scenarios\n\n```shell\n# Oops, made bad changes to a file?\nhug w discard file.js\n\n# Need to undo the last commit but keep changes staged?\n# Hug, Head movement: Back\nhug h back\n# Tip: When the staging area has no staged changes, Hug skips the confirmation prompt automatically; existing staged work still triggers it. Unstaged changes are never touched by this command. The same protection applies to `hug h squash` and `hug h undo`, which keep you safe when staged or unstaged work might otherwise be unintentionally lumped into the action while skipping the prompt when no staged or unstaged changes are present.\n\n# Want to see what changed in a specific file?\n# Hug, Status: Working dir (meaning unstaged changes)\nhug sw file.js\n\n# Clean up build artifacts?\nhug w purge\n\n# Get a file from an old commit?\n# Hug, Working dir: Get from \u003ccommit\u003e the file \u003cfile\u003e\nhug w get a1b2c3 file.js\n\n# Preview a destructive operation\nhug w zap-all --dry-run\n\n# Force a cleanup without prompts\nhug w zap-all -f\n\n# Undo last 3 commits, unstage changes\n# Hug, Head movement: UNDO last 3 commits\nhug h undo 3\n\n# Find steps back to last change in a file, then rewind precisely\nhug h steps src/app.js  # e.g., \"2 steps back...\"\nhug h back 2\n\n# Safe pull (fast-forward only; fails on divergence)\nhug bpull\n\n# Pull with rebase for linear history\nhug bpullr\n\n# Park WIP for interruption to have a clean working directory\nhug wip \"Draft feature\" → hug bc hotfix \u0026\u0026 hug c \"Fix bug\" → hug bpush\n\n# Deep work on WIP (stay and iterate)\nhug wips \"Prototype UI\" → hug a . \u0026\u0026 hug c \"Add components\" → hug bs (pause) → later hug b WIP/... → hug w unwip WIP/... (integrate)\n```\n\n**Tip: `wips` vs. `wip`**: Use `wips` for immersive sessions (stay on WIP to add commits like `hug c`). Use `wip` for quick pauses (park). Both are pushable branches - better than local stash for persistence.\n\n## Mercurial Support\n\nHug now supports Mercurial! The same intuitive commands work across both Git and Mercurial repositories.\n\nOnce installed, Hug will automatically detect whether you're in a Git or Mercurial repository and use the appropriate commands. The same familiar Hug commands work in both!\n\n### Quick Mercurial Start\n\n```shell\n# Use the same Hug commands in Mercurial repos!\ncd ~/my-hg-repo\nhug s              # Status\nhug a file.txt     # Add file\nhug c -m \"Update\"  # Commit\nhug b feature      # Switch bookmark\nhug l              # View history\n```\n\n### Key Features\n\n- **Automatic Detection**: Hug automatically detects whether you're in a Git or Mercurial repository\n- **Unified Interface**: Use the same commands regardless of SCM type\n- **Bookmark Support**: Mercurial bookmarks work like Git branches\n- **Working Directory Ops**: Full support for discard, purge, and zap operations\n- **HEAD Operations**: Uncommit operations via the evolve extension\n\n### Mercurial-Specific Notes\n\n- **No Staging Area**: Mercurial commits directly from working directory\n- **Bookmarks vs Branches**: Hug uses bookmarks (like Git branches) instead of permanent Mercurial branches\n- **Extensions Required**: Some commands require `purge` and `evolve` extensions\n\nSee [hg-config/README.md](hg-config/README.md) for full Mercurial documentation.\n\n## Installation\n\nCheck the [Installation Guide](https://elifarley.github.io/hug-scm/installation.html)\n\n---\n\n## Quick Start Tips\n\n- **No Git Knowledge Needed**: Hug handles the complexity; focus on intent.\n- **Explore**: Run `hug help` to see Hug commands.\n\n---\n\n## Command Reference\n\n### Command Organization\n\nHug commands are organized by **semantic prefixes** that make them easy to discover and remember:\n\n| Prefix | Category | Examples |\n|--------|----------|----------|\n| `h*` | HEAD Operations | `hug h back`, `hug h undo` |\n| `w*` | Working Directory | `hug w get`, `hug w wip` |\n| `wt*` | Worktree Management | `hug wt`, `hug wtc`, `hug wtdel`, `hug wtsh` |\n| `s*` | Status \u0026 Staging | `hug ss`, `hug su` |\n| `a*` | Staging | `hug a`, `hug aa`, `hug ai`, `hug ap` |\n| `b*` | Branching | `hug b`, `hug bc` |\n| `c*` | Commits | `hug c`, `hug ca` |\n| `l*` | Logging \u0026 History | `hug l`, `hug lc` |\n| `f*` | File Inspection | `hug fa`, `hug fb` |\n| `t*` | Tagging | `hug t`, `hug tc` |\n| `r*` | Rebase | `hug rb`, `hug rbi`, `hug rbc`, `hug rba` |\n| `m*` | Merge | `hug m`, `hug ma`, `hug mff`, `hug mkeep` |\n| `analyze*` | Advanced Analysis | `hug analyze deps`, `hug analyze expert` |\n| `stats*` | Repository Statistics | `hug stats file`, `hug stats author` |\n\n\u003e 📖 **[View Complete Command Map](https://elifarley.github.io/hug-scm/command-map)** -\n\u003e Full table with all command families, memory hooks, and visual structure (13 families, 139 commands).\n\u003e\n\u003e 🏁 **[Quick Reference Cheat Sheet](https://elifarley.github.io/hug-scm/cheat-sheet)** -\n\u003e Scenario-based commands for daily workflows.\n\n### Core Commands\n\n#### 📍 HEAD Operations (`h`)\n\n```shell\nhug h back [N|commit]     # Move HEAD back, keep changes staged (non-destructive)\nhug h undo [N|commit]     # Move HEAD back, unstage changes (non-destructive)\nhug h rollback [N|commit] # Rollback commits and their changes (preserves local work)\nhug h rewind \u003ccommit\u003e     # Destructive rewind to clean state (discards history and changes, but keeps current untracked files)\nhug h squash [N|commit]   # Squash commits into one\nhug h files [N|commit]    # Preview files touched in commit range\nhug h steps \u003cfile\u003e [--raw] # Steps back from HEAD to last change in \u003cfile\u003e (for precise rewinds)\n\n# All h commands support -t/--temporal TIME for time-based operations:\nhug h back -t \"3 days ago\"    # Move HEAD to first commit from 3 days ago\nhug h files -t \"1 week ago\"   # Preview files changed in last week\n```\n\n#### 🧹 Working Directory (`w`)\n\n```shell\n# Discard changes\nhug w discard [-u|-s] \u003cfiles\u003e     # Discard unstaged/staged changes for specific files\nhug w discard-all [-u|-s]         # Discard across entire repo\n\n# Wipe changes (staged + unstaged)\nhug w wipe \u003cfiles\u003e                # Complete reset for specific files\nhug w wipe-all                    # Reset all tracked files to last commit\n\n# Remove untracked/ignored files\nhug w purge [-u|-i] \u003cfiles\u003e       # Remove untracked/ignored for specific paths\nhug w purge-all [-u|-i]           # Remove across entire repo\n\n# Nuclear option: discard + purge\nhug w zap [-u|-s|-i] \u003cfiles\u003e      # Full cleanup for specific paths\nhug w zap-all [-u|-s|-i]          # Complete repo cleanup\n\n# Utility\nhug w get \u003ccommit\u003e [files]        # Restore files from specific commit\n```\n\n#### Parking Work (WIP)\n\n```shell\n# Save all changes on a WIP branch (pushable, persistent)\nhug wip \"msg\"              # Move uncommitted changes away into a new WIP branch (for interruptions)\nhug wips \"msg\"             # Park work and stay on the new WIP branch (for focused work)\n\n# Resume WIP\nhug b \u003cwip-branch-name\u003e    # Switch to the WIP branch to continue\n\n# Finish and integrate WIP\nhug w unwip \u003cwip-branch\u003e   # Squash-merges WIP into current branch and deletes it\n\n# Abandon WIP\nhug w wipdel \u003cwip-branch\u003e  # Deletes the WIP branch without merging\n```\n\n#### 📊 Status \u0026 Staging (`s`)\n\n```shell\nhug s                       # Quick summary of staged/unstaged changes\nhug sl                      # Status without untracked files\nhug sla                     # Full status with untracked files\nhug sli                     # Status with list of ignored files\n\nhug ss [file]               # Status with staged changes patch\nhug su [file]               # Status with unstaged changes patch\nhug sw [file]               # Status with working dir changes patch (staged and unstaged)\n\n# Staging\nhug a [files]               # Stage tracked files (or all if no args)\nhug a --                    # Interactive file selection (requires gum)\nhug aa                      # Stage everything (tracked + untracked + deletions)\nhug us \u003cfiles\u003e              # Unstage specific files\nhug usa                     # Unstage all files\n```\n\n#### 🌿 Branching (`b`)\n\n```shell\nhug b \u003cbranch\u003e              # Switch to existing branch\nhug bs                      # Switch back to previous branch\nhug br                      # Switch to remote branch (interactive menu)\nhug brr                     # Fetch then switch to remote branch (refresh + switch)\nhug bc [\u003cbranch\u003e] [--point-to \u003ccommitish\u003e] [--no-switch]  # Create and switch to new branch\n                            # With --point-to: create from specific commit/tag/branch\n                            # Without branch name: auto-generates descriptive name\n                            # --no-switch: create without switching\nhug bcp \u003csrc\u003e [dest]        # Copy branch (create snapshot without switching)\nhug bl [term]               # List local branches (optional search)\nhug bla                     # List all branches (local + remote)\nhug bdel \u003cbranch\u003e           # Safe delete local branch (if merged)\nhug bdelf \u003cbranch\u003e          # Force delete local branch\nhug bdelr \u003cbranch\u003e          # Delete remote branch\n```\n\n### Full Command List\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand all commands\u003c/summary\u003e\n\n#### Logging \u0026 History (`l*`)\n\n```shell\nhug l                      # One-line log with graph and decorations\nhug ll                     # Log with date, author, and message (short date)\nhug la                     # Log all branches\nhug lf \u003cterm\u003e [--]         # Search commits by message (use -- for file selection, add -i for case-insensitive)\nhug lf \u003cterm\u003e --with-files # Search commits by message, show files changed\nhug lc \u003ccode\u003e [--]         # Search commits by code changes in diff (use -- for file selection)\nhug lc \u003ccode\u003e --with-files # Search commits by code changes, show files changed\nhug lcr \u003cregex\u003e [--]       # Search commits by regex in code changes (use -- for file selection)\nhug lau \u003cauthor\u003e           # Commits by specific author\nhug ld \u003csince\u003e \u003cuntil\u003e     # Commits in date range\nhug lp                     # Log with patches\nhug llf [file]             # Log commits to a specific file (interactive if no file, add -p for patches)\n```\n\n#### File Inspection (`f*`)\n\n```shell\nhug fblame [file]             # Blame with whitespace/copy detection (interactive if no file)\nhug fblame --churn [file]     # Show churn analysis (how frequently file changes)\nhug fblame --churn --since=\"3 months ago\" [file]  # Recent churn analysis\nhug fb [file]                 # Short blame (author and line only) (interactive if no file)\nhug fcon [file]               # List all contributors to a file (interactive if no file)\nhug fa [file]                 # Count commits per author for a file (interactive if no file)\nhug fborn [file]              # Show when file was added (interactive if no file)\n```\n\n#### 🔬 Advanced Analysis (`analyze`)\n\n```shell\nhug analyze co-changes [N]    # Find files that frequently change together\nhug analyze co-changes 200 --threshold 0.50  # Strong coupling only\nhug analyze activity          # Temporal commit patterns (hour/day histograms)\nhug analyze activity --by-hour --by-author   # Per-author hour breakdown\nhug analyze expert \u003cfile\u003e     # Identify code ownership and expertise\nhug analyze expert --author \"Alice\"          # Author's expertise areas\nhug analyze deps \u003ccommit\u003e     # Show commit dependency graph via file overlap\nhug analyze deps --all        # Repository-wide coupling analysis\n```\n\n#### 📊 Repository Statistics (`stats`)\n\n```shell\nhug stats file [file]         # File-level statistics (commits, authors, churn)\nhug stats author [author]     # Author contributions and expertise areas\nhug stats branch [branch]     # Branch statistics (commits, divergence, age)\n```\n\n#### Tagging (`t*`)\n\n```shell\nhug t [pattern]       # Tags (List tags (matching pattern))\nhug tl [search]        # List tags with details (searches tag name, hash, commit message)\nhug tc \u003ctag\u003e [commit] # Create lightweight tag\nhug ta \u003ctag\u003e \"msg\"    # Create annotated tag\nhug ts \u003ctag\u003e          # Show tag details\nhug tr \u003cold\u003e \u003cnew\u003e    # Rename tag\nhug tm \u003ctag\u003e [commit] # Move tag to new commit (default HEAD)\nhug tma \u003ctag\u003e \"msg\" [commit] # Move and re-annotate tag\nhug tpush [tags]      # Push tags to remote (or all if no args)\nhug tpull             # Fetch tags from remote\nhug tpullf            # Force fetch and prune tags\nhug tdel \u003ctag\u003e        # Delete local tag\nhug tdelr \u003ctag\u003e       # Delete remote tag\nhug tco \u003ctag\u003e         # Checkout tag\nhug twc [commit]      # Tags which contain commit (default HEAD)\nhug twp [object]      # Tags which point to object (default HEAD)\n```\n\n#### Branching (`b*`) - Additional Details\n\n```shell\nhug blr               # Branch: List Remote (List remote branches only)\nhug bmv \u003cnew-name\u003e    # Branch: Move/Rename (Rename current branch)\nhug bwc [commit]      # Branches which contain commit (default HEAD)\nhug bwp [object]      # Branches which point to object (default HEAD)\nhug bwnc [commit]     # Branches which do not contain commit\nhug bwm [commit]      # Branches merged into commit (default HEAD)\nhug bwnm [commit]     # Branches not merged into commit\n```\n\n#### Commits (`c*`)\n\n```shell\nhug c [-m msg]        # Commit (staged changes)\nhug ca [-m msg]       # Commit: All (all tracked changes)\nhug caa [-m msg]      # Commit: All All (tracked + untracked + deletions)\nhug cm [-m msg]       # Commit: Modify (Amend last commit with staged changes)\nhug cma [-m msg]      # Commit: Modify (Amend last commit with all tracked changes)\nhug ccp \u003ccommit\u003e      # Commit Copy (cherry-pick commit onto current branch)\nhug cmv [N] \u003cbranch\u003e [--new] # Commit MoVe: Relocate commits to another branch (resets source, switches to target)\n                             #   - New branches: preserves original SHAs (no conflicts)\n                             #   - Existing branches: creates new SHAs via cherry-pick (may conflict)\nhug cii               # Interactive patch commit (add --patch then commit)\nhug cim               # Full interactive staging and commit\n```\n\n#### Rebase \u0026 Merge (`r*`, `m*`)\n\n```shell\nhug rb \u003cbranch\u003e       # Rebase current onto branch\nhug rbi [commit]      # Interactive rebase (default root)\nhug rbc               # Continue rebase\nhug rba               # Abort rebase\nhug rbs               # Skip commit in rebase\nhug m \u003cbranch\u003e        # Squash-merge branch (no commit)\nhug mff \u003cbranch\u003e      # Merge with fast-forward only\nhug mkeep \u003cbranch\u003e    # Merge with no fast-forward (create commit)\nhug ma                # Abort merge\n```\n\n#### Push/Pull (`bpush`, etc.)\n\n```shell\nhug bpush             # Branch: Push (Push current branch)\nhug bpushf            # Branch: Push-Force (Force push with lease)\nhug bpush-unsafe      # Branch: Push-unsafe (Unsafe force push)\nhug bpull             # Pull with rebase\nhug pullall           # Pull from all remotes\n```\n\n#### Utilities\n\n```shell\n# Initialize - Create a new repository (defaults to Git)\nhug init [dir] [options]                        # Initialize Git repo (current dir or specified)\nhug init --hg [dir]                             # Initialize Mercurial repo\nhug init --no-status [dir]                      # Skip post-init status\nhug init [dir] --initial-branch=main            # Pass options to underlying VCS\n\n# Clone - Auto-detects Git or Mercurial from URL patterns\nhug clone \u003curl\u003e [dir] [options]                 # Auto-detect VCS and clone\nhug clone --git \u003curl\u003e [dir]                     # Force Git\nhug clone --hg \u003curl\u003e [dir]                      # Force Mercurial  \nhug clone --no-status \u003curl\u003e [dir]               # Skip post-clone status\nhug clone \u003curl\u003e --depth 1                       # Pass options to underlying VCS\n\n# Other utilities\nhug lol [\u003cremote-branch\u003e] # Log Outgoing Long: Show outgoing changes (what will be pushed; optional remote branch target, e.g., origin/dev)\nhug w wip \"\u003cmsg\u003e\"     # Park all changes on WIP branch\nhug w unwip [wip]     # Unpark WIP: squash-merge to current branch + delete\nhug w wipdel [wip]    # Delete WIP branch without integration\nhug type \u003cobject\u003e     # Show object type\nhug dump \u003cobject\u003e     # Show object contents\nhug untrack \u003cfiles\u003e   # Stop tracking files but keep locally\nhug remote2ssh [\u003cremote\u003e]  # Convert remote URL from HTTPS to SSH (default: origin)\n```\n\n#### Status \u0026 Show (`s*`, `sh*`)\n\n```shell\nhug s                 # Status\nhug sl                # Status: List (without untracked files)\nhug sla               # Status: List All (Full status with untracked files)\nhug sh [commit]       # SHow [commit] (with stat; default: last)\nhug shp [commit]      # SHow: with Patch (commit with patch)\nhug shc \u003ccommit\u003e      # SHow: Changed files (Files changed in commit)\nhug shf \u003cfile\u003e [commit] # SHow: File at [commit] (File diff in commit)\n```\n\n\u003c/details\u003e\n\n## Philosophy\n\n### 1. **Brevity Hierarchy**\n\n-   Shorter commands = more common/safer\n-   Longer commands = more specific/powerful\n-   `hug b` for branch switching (most common)\n-   `hug bdelr` for remote branch deletion (rare)\n\n### 2. **Semantic Clarity**\n\n-   Commands describe what they do\n-   `w wipe` = wipe changes clean\n-   `w purge` = purge unwanted files\n-   `w zap` = make it pristine\n\n### 3\\. **Progressive Destructiveness**\n\n```shell\n`discard \u003c wipe \u003c zap \u003c rewind`\n```\n\n### 4. **Safety First**\n\n-   All destructive operations show previews\n-   Explicit confirmations required\n-   Dry-run mode everywhere\n\n### 5. **Discoverability**\n\n-   Related commands share prefixes\n-   Built-in help with examples\n-   Smart completion with partial matching\n\n## Testing\n\nHug SCM uses [BATS (Bash Automated Testing System)](https://github.com/bats-core/bats-core) for automated testing. We have comprehensive test coverage for core commands and workflows.\n\n**Running Tests:**\n```bash\n# Using Make (recommended)\nmake test              # Run all tests\nmake test-unit         # Run unit tests only\nmake test-integration  # Run integration tests only\nmake test-check        # Check prerequisites\n\n# Or use the test script directly\ntests/run-tests.sh                              # Run all tests\ntests/run-tests.sh tests/unit/test_status_staging.bats  # Run specific test\ntests/run-tests.sh -v                           # Run with verbose output\n```\n\n**For Contributors:**\n- All new commands must include tests\n- Tests run automatically in CI on every PR\n- See [TESTING.md](TESTING.md) for detailed testing guide\n- See [tests/README.md](tests/README.md) for test suite documentation\n- See [ADR-001](docs/architecture/ADR-001-automated-testing-strategy.md) for testing strategy rationale\n\n## Roadmap\n\n- ✅ **Mercurial Support** - Full compatibility with `hg` commands (COMPLETED!)\n  - Core commands (status, staging, commits, branches)\n  - Working directory operations (discard, purge, zap)\n  - HEAD operations (back, undo)\n  - Automatic repository detection\n  - See [ADR-002](docs/architecture/ADR-002-mercurial-support-architecture.md) for details\n-    **Sapling Support** - Meta's next-gen VCS\n-    **Interactive Mode** - TUI with visual diff preview\n-    **AI Integration** - Smart commit suggestions\n-    **GUI Frontend** - Visual interface for complex operations\n-    **Plugin System** - Custom command extensions\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n---\n\n## License\n\nApache 2.0 License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felifarley%2Fhug-scm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felifarley%2Fhug-scm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felifarley%2Fhug-scm/lists"}