sgit

command module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 1 Imported by: 0

README ยถ

sgit - AI-Powered Git That Writes Perfect Commits

Never write a bad commit message again. sgit uses AI to generate professional conventional commits automatically while maintaining 100% git compatibility.

๐ŸŽฌ See the Magic

Your Current Git Workflow ๐Ÿ˜ž
$ git add .
$ git commit -m "fix stuff"
$ git commit -m "updates"  
$ git commit -m "more changes"
With sgit โœจ
$ sgit commit -a
๐Ÿค– Analyzing changes...

feat(auth): implement OAuth2 login with Google integration

Add secure OAuth2 authentication flow with token refresh mechanism.
Update login component to handle redirects and error states gracefully.
Include comprehensive test coverage for authentication service.

โœจ Resolves #123, improves security architecture

? Use this commit? (Y/n) โ–ˆ

Result: Transform meaningless commits into professional documentation that impresses reviewers and future developers! ๐Ÿš€


โšก Quick Start (30 seconds)

# 1. Install
curl -fsSL https://raw.githubusercontent.com/hunkim/sgit/main/scripts/install.sh | bash

# 2. Use like git, but better
sgit commit -a        # ๐Ÿค– AI writes your commit message
sgit diff            # ๐Ÿ“Š AI explains what changed  
sgit log             # ๐Ÿ“ˆ AI analyzes your patterns

That's it! All your existing git commands work exactly the same: sgit status, sgit push, sgit pull, etc.


๐ŸŒŸ Why Developers Love sgit

  • ๐ŸŽฏ Perfect Commits: Conventional commits with context, not "fix stuff"
  • โšก Zero Learning: Drop-in git replacement - use your existing knowledge
  • ๐ŸŒ Multi-Language: AI responds in 7+ languages (--lang ko for Korean!)
  • ๐Ÿ”„ 100% Compatible: All git commands work - scripts, aliases, everything
  • โŒจ๏ธ Smart Completion: Tab completion for commands and language codes
  • ๐Ÿ›ก๏ธ Privacy First: Your code stays local, only diffs sent for analysis

๐Ÿš€ Features That Transform Your Workflow

Traditional Git sgit Enhancement
git commit -m "fix" AI generates: fix(api): resolve rate limiting edge case in Redis backend
git diff AI explains: "Refactored authentication middleware to use JWT validation"
git log AI insights: "Focus on security improvements, 3 bug fixes this week"
Manual file staging AI recommends: "Add these 4 source files, skip temp files"

๐Ÿ› ๏ธ Installation Options

๐Ÿš€ Recommended (includes tab completion):

curl -fsSL https://raw.githubusercontent.com/hunkim/sgit/main/scripts/install.sh | bash

๐Ÿบ Homebrew:

brew tap hunkim/sgit && brew install sgit

๐Ÿ“ฆ Go Install:

go install github.com/hunkim/sgit@latest

๐Ÿณ Docker:

docker run --rm -it -v $(pwd):/workspace hunkim/sgit:latest

๐Ÿ”ง Configuration (2 minutes)

sgit config  # Set up your free Upstage API key

Get your API key at console.upstage.ai (free tier available).


๐ŸŽฏ Core Commands

Smart Commits
sgit commit              # AI writes commit message  
sgit commit -a           # Stage all + AI commit
sgit commit -a --lang ko # Korean AI responses
Intelligent Analysis
sgit diff                # AI explains changes
sgit log                 # AI analyzes patterns
sgit add --all-ai        # AI recommends files to stage
Traditional Git (unchanged)
sgit status              # Same as git status
sgit push                # Same as git push  
sgit pull                # Same as git pull

๐ŸŒ Multi-Language Support

sgit --lang ko commit    # Korean: "๊ธฐ๋Šฅ: ์‚ฌ์šฉ์ž ์ธ์ฆ ์‹œ์Šคํ…œ ๊ตฌํ˜„"
sgit --lang ja diff      # Japanese: "ๅค‰ๆ›ดๅ†…ๅฎนใฎๅˆ†ๆž..."  
sgit --lang es log       # Spanish: "Anรกlisis de patrones..."

Supported: English, Korean, Japanese, Chinese, Spanish, French, German


๐Ÿ”’ Privacy & Security

  • โœ… Local First: Your code stays on your machine
  • โœ… Diff Only: Only git diffs sent for commit message generation
  • โœ… No Storage: Upstage doesn't store your code or diffs
  • โœ… Open Source: Full transparency, audit the code yourself

๐Ÿ“š Examples

Before sgit ๐Ÿ˜ฑ
git log --oneline -5
a1b2c3d fix stuff
e4f5g6h updates  
h7i8j9k more changes
k1l2m3n bug fix
n4o5p6q refactor
After sgit ๐ŸŽ‰
sgit log --oneline -5
a1b2c3d feat(auth): implement OAuth2 with Google integration
e4f5g6h fix(db): resolve connection pooling memory leak
h7i8j9k docs(api): add comprehensive endpoint documentation  
k1l2m3n perf(cache): optimize Redis operations for 40% speed gain
n4o5p6q refactor(ui): modernize component architecture with hooks

Night and day difference! ๐ŸŒŸ


๐Ÿ†š vs Other Tools

Feature sgit Conventional Commits Other AI Tools
Zero Learning Curve โœ… โŒ โŒ
Full Git Compatibility โœ… โœ… โŒ
AI Commit Messages โœ… โŒ โœ…
Multi-Language โœ… โŒ โŒ
Privacy Focused โœ… โœ… โŒ
Tab Completion โœ… โŒ โŒ

๐Ÿค Contributing

git clone https://github.com/hunkim/sgit.git
cd sgit
go build
sgit commit -a  # Use sgit to contribute to sgit! ๐Ÿ˜„

โญ Love sgit?

  • ๐ŸŒŸ Star this repo if sgit saves you time
  • ๐Ÿ› Report issues at github.com/hunkim/sgit/issues
  • ๐Ÿ’ก Request features - we're always improving
  • ๐Ÿ—ฃ๏ธ Spread the word - help other developers write better commits

๐Ÿ“„ License

MIT License - see LICENSE file.

Created with โค๏ธ by developers, for developers.


Ready to transform your git workflow? Try sgit today and never write "fix stuff" again! ๐Ÿš€

curl -fsSL https://raw.githubusercontent.com/hunkim/sgit/main/scripts/install.sh | bash

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL