GX is a smart Git CLI that provides a streamlined interface for common Git operations. It offers interactive pickers, fuzzy matching, and intuitive commands for checkout, status, staging, committing, pushing, stashing, and viewing log history.
Homebrew:
brew install reckerp/tap/gxSource:
cargo install --path .# Build in debug mode
cargo build
# Run the CLI
cargo run -- <arguments>| Command | Aliases | Description |
|---|---|---|
checkout |
co, switch |
Checkout/Switch a branch/commit/tag |
status |
s |
Show repository status |
add |
a |
Stage files for commit |
commit |
c |
Create a commit |
push |
p |
Push commits to remote |
stash |
st |
Stash changes |
log |
l |
View commit history |
workspace |
ws |
Manage workspaces (git worktrees) |
setup |
- | Generate shell aliases from config |
Switch to a branch, commit, or tag.
gx checkout <query>
gx co <query>
gx switch <query>Arguments:
query(optional): Branch/commit/tag to checkout (supports fuzzy matching)
Show the current repository status with an interactive TUI.
gx status
gx sStage files for commit.
gx add # Stage all files
gx add <paths...> # Stage specific files
gx add -i # Interactive mode - select files to stage
gx a -iFlags:
-i,--interactive: Select files interactively
Create a new commit.
gx commit # Opens editor for message
gx commit "message" # Use provided message
gx commit -m "message"
gx c -m "message"
gx commit --amend # Amend previous commit
gx commit --ai # Generate commit message using AI
gx commit --no-edit # Amend without editing messageFlags:
-m,--message: Commit message--amend: Amend the previous commit--no-edit: Use existing commit message without editing--ai: Generate commit message using AI
Push commits to the remote repository.
gx push
gx p
gx push --force
gx push --force-dangerouslyFlags:
-f,--force: Force push with lease (safer)--force-dangerously: Force push without lease (dangerous)
Stash changes with various subcommands.
gx stash # Interactive stash picker
gx st
gx stash push # Push stash (default)
gx stash push -m "msg" # Push stash with message
gx stash push -u # Include untracked files
gx stash list # List all stashes
gx stash pop # Apply and remove latest stash
gx stash pop 0 # Apply and remove specific stash
gx stash apply # Apply without removing
gx stash drop # Drop latest stash
gx stash drop 0 # Drop specific stash
gx stash clear # Remove all stashes
gx stash show # Show diff of latest stash
gx stash show 0 # Show diff of specific stash
gx stash branch <name> # Create branch from stashStash Flags:
-m,--message: Stash message (push)-u,--untracked: Include untracked files (push)
View commit history.
gx log
gx l
gx log -n 10
gx log --limit 10Flags:
-n,--limit: Maximum number of commits to show
Manage workspaces (git worktrees): isolated checkouts of the same repository, each on its own branch. By default workspaces live in ~/gx/workspaces/<repo>/<name>.
gx workspace # Interactive workspace picker (TUI)
gx ws # Same, shorter
gx workspace new <name> # Create workspace + branch <name>, copy setup files
gx workspace new <name> <base> # Create the new branch from <base>
gx workspace new <name> -b <branch> # Check out an existing/specific branch
# If <name> matches a remote branch (e.g. origin/<name>), the new branch
# is created from it and set up to track it.
gx workspace new <name> --no-setup # Skip copying setup files
gx workspace go [query] # Switch to a workspace (fuzzy match, picker if omitted)
gx workspace list # List all workspaces
gx workspace remove [query] # Remove a workspace (asks for confirmation)
gx workspace remove <name> --force # Remove even with uncommitted changes
gx workspace setup # Re-copy setup files from the main worktree into this oneInteractive TUI (gx workspace): fuzzy search across workspace names and branches, with enter to switch, ctrl+n to create a workspace named after the current query, and ctrl+d to remove the selection.
Changing directories: a child process can't change your shell's directory, so cd-on-switch is handled by the shell wrapper emitted by gx setup. With eval "$(gx setup)" in your shell config, gx workspace go, gx workspace new, and the TUI will land you directly in the workspace. Without it, the workspace path is printed so you can cd "$(gx workspace go <query>)" yourself.
Setup files: files like .env are usually gitignored, so a fresh worktree doesn't have them. When creating a workspace, gx copies the files configured in workspace.copy_files from the main worktree into the new one (missing files are skipped). See Workspace Configuration.
Generate shell aliases from configuration.
gx setupThis also emits the shell wrapper used for the workspace cd integration.
Pass-through to git for unrecognized commands.
gx git <command>
gx remote -vGX uses a configuration file stored at ~/.config/gx/config.toml. It allows for easy aliasing and customizations. Add eval "$(gx setup)" to your shell configuration to load the aliases you configured in the config file.
You can configure the AI agent and model used for AI-generated commit messages:
[ai]
agent = "opencode" # Options: "opencode" or "claude"
model = "opencode/big-pickle" # Model to useFor Claude, the default model you should use is "haiku". You can configure the agent and model to your preference.
[workspace]
# Where workspaces are created. "{repo}" is replaced with the repository
# directory name. Supports "~" for the home directory and absolute paths;
# relative paths are resolved against the main worktree root.
root = "~/gx/workspaces/{repo}"
# Files copied from the main worktree into new workspaces.
# Paths are relative to the repo root; the filename component may contain
# "*" / "?" wildcards. Directories are copied recursively, missing entries
# are skipped.
copy_files = [".env"]Example with more setup files:
[workspace]
copy_files = [".env*", "config/local.toml", ".vscode"]MIT