Skip to content

Welcome to Hug Documentation

Hug is a CLI tool to streamline development. It provides a humane, intuitive interface for Git, transforming complex commands into a predictable language that keeps you focused on coding.

GitHub Repository

Key features:

  • Intuitive Commands: Shorter for common/safe ops, longer for powerful ones (e.g., hug b to switch branches).
  • Safety Built-In: Previews, dry-runs, and confirmations for destructive actions.
  • Discoverability: Grouped by prefix (e.g., h* for HEAD, w* for working directory).
  • Git-Only for Now: Full Git support; Mercurial, Sapling and others coming later.

Start with Hug for Developers

Command Reference

Start with the Command Map for a quick overview of all families, or the Cheat Sheet for daily workflows.

Dive into detailed guides for command groups:

Tips for Common Queries

  • Most recent commit touching a file: Use hug llf <file> -1 to get the latest commit modifying a specific file (handles renames with --follow). For multiple files, run separately and compare timestamps, or use hug llf file1 -1 and hug llf file2 -1.
  • Last N commits for a file: hug llf <file> -N (e.g., -2 for last 2). Use hug llfp <file> -1 for patches or hug llfs <file> -1 for changes.
  • Search history by file changes: Combine with lf or lc for message/code searches restricted to file touches.

Released under the MIT License.