A command-line tool for easier git interaction with interactive interfaces.
- Interactive Branch Management (
smak b
): Browse, select, and delete branches with an intuitive interface - Commit Browser (
smak c
): Navigate commits with full diff viewing - Commit Amend (
smak c am
): Stage all changes and amend to latest commit with optional push - Git Repository Integration: Works with any git repository
-
Clone the repository:
git clone <your-repo-url> cd smak-cli
-
Build the binary:
go build -o smak
-
Install globally (optional):
# On macOS/Linux - copy to a directory in your PATH sudo cp smak /usr/local/bin/ # Or add to your shell profile export PATH=$PATH:/path/to/smak-cli
If you have Go installed, you can install directly:
go install github.com/nikitaNotFound/smak-cli@latest
Make sure you're in a git repository before using any commands.
smak b
- Interactive branch browser and managersmak c
- Interactive commit browsersmak c am
- Stage all changes and amend to latest commitsmak help
- Show help information
- Navigate with arrow keys
- Press
d
to select/deselect branches for deletion (shown in red) - Press
Enter
to confirm deletion of selected branches - Press
q
to quit
- Navigate commits with arrow keys
- Press
Enter
to view full commit details and diff - In diff view:
- Use arrow keys or
j
/k
to scroll Page Up
/Page Down
for faster navigationEscape
to return to commit list
- Use arrow keys or
- Press
q
to quit
Quickly stage all unstaged changes and amend them to the latest commit with the same message.
Basic usage:
smak c am
With automatic push:
smak c am -p
# or
smak c am --push
Options:
-p, --push
- Push the amended commit to origin with force after amending
This command is useful for quickly incorporating additional changes into your most recent commit without having to manually stage files and run git commands.
- Git repository
- Go 1.21+ (for building from source)
Feel free to submit issues and pull requests.