alinedgit
v1.0.1
Published
AI-protected git commands with smart workflows and interactive verification
Downloads
8
Maintainers
Readme
🤖 Alined Git
AI-protected git commands with smart workflows and interactive verification.
🚀 Quick Start
# Install globally
npm install -g alinedgit
# Navigate to your git repository
cd your-git-repo
# Install protection
alinedgit install
# Setup interactive configuration
alinedgit setup🤖 Why AI Git?
Modern AI tools like Claude, Cursor, and GitHub Copilot can automatically run git commands, potentially making unwanted commits or pushes. AI Git protects your repositories while providing smart git commands that enhance your workflow.
Key Benefits:
- ✅ AI Detection - Identifies when git is being used by AI tools
- ✅ Interactive Verification - Fun challenges that humans can solve instantly
- ✅ Smart Git Commands - Enhanced git workflows with AI-powered features
- ✅ Configurable Protection - 5 protection levels from weak to paranoid
- ✅ Cross-Platform - Works on macOS, Linux, and Windows
🎯 Features
🔒 AI Protection
- Process Detection - Identifies VS Code, Cursor, and other AI-integrated editors
- Commit Analysis - Detects AI-generated commit message patterns
- Interactive Challenges - Visual verification that AI can't easily solve
- Configurable Levels - Choose protection strength for your workflow
🎮 Human Verification
Simple visual challenges instead of complex puzzles:
🔐 Human Verification Required
●● ●● ●●
Which dot is red? (1, 2, or 3)
Your choice: 1
✅ Verification successful🚀 Smart Commands
Enhanced git operations with built-in intelligence:
alinedgit add-commit # AI-generated commit messages
alinedgit push # Smart push with confirmation
alinedgit checkout main # Protected branch switching
alinedgit branch feature # Smart branch creation📦 Installation
Global Installation (Recommended)
npm install -g alinedgitPer-Project Installation
npm install --save-dev alinedgit
npx alinedgit install⚙️ Commands
Protection Management
alinedgit install # Install protection hooks
alinedgit uninstall # Remove protection hooks
alinedgit setup # Interactive configuration
alinedgit status # Show protection statusSmart Git Commands
alinedgit add-commit # Add files + AI commit message
alinedgit commit "message" # Protected commit
alinedgit push # Smart push with confirmation
alinedgit checkout <branch> # Safe branch switching
alinedgit branch [name] # Branch management
alinedgit log # Enhanced git logAliases
alinedgit ac # add-commit
alinedgit c "message" # commit
alinedgit p # push
alinedgit co <branch> # checkout
alinedgit br [name] # branch🎛️ Protection Levels
Choose the right level for your workflow:
- NONE - No protection (hooks disabled)
- WEAK - Logging and warnings only
- MEDIUM - Block destructive operations (recommended)
- STRONG - Block most git operations
- PARANOID - Block ALL git operations
🔧 Configuration
Run the interactive setup:
alinedgit setupThis will:
- Choose your protection level
- Configure developer whitelist
- Set up logging preferences
Configuration is stored in .git/hooks/alinedgit-config.json:
{
"protection_level": "medium",
"user_config": {
"human_developers": ["Your Name", "[email protected]"],
"setup_completed": true
},
"detection_config": {
"check_commit_messages": true,
"check_process_tree": true
}
}🛡️ How Protection Works
AI Detection
AI Git uses multiple detection methods:
- Process Analysis - Detects git calls from VS Code, Cursor, etc.
- Environment Variables - Checks for AI-related environment settings
- Git Configuration - Identifies AI patterns in user info
- Commit Patterns - Analyzes commit messages for AI signatures
Interactive Verification
When AI is detected, you get a simple challenge:
- Colored Dots - Quick visual selection
- Random Variations - Different patterns each time
- AI-Resistant - AI tools can't respond to interactive prompts
Smart Commands
Enhanced git operations with:
- AI-Generated Commit Messages - Analyze changes and suggest messages
- Protected Operations - Confirm destructive actions
- Branch Safety - Extra protection for main/master branches
- Smart Workflows - Streamlined common operations
📊 Examples
Basic Protection Workflow
# Install and setup
alinedgit install
alinedgit setup
# Try making a commit (protection will activate)
echo "test" >> README.md
git add README.md
git commit -m "test" # Hook will ask for verificationSmart Git Workflow
# Smart commit with AI message
alinedgit add-commit
# Safe push with confirmation
alinedgit push
# Protected branch switching
alinedgit checkout main # Extra confirmation for main branch
# Create feature branch
alinedgit branch feature/awesomeChecking Status
alinedgit status
# Shows:
# - Installation status
# - Protection level
# - Configuration details
# - Recent activity logs🔄 Updates
# Update to latest version
npm update -g alinedgit
# Check version
alinedgit version🚫 Uninstalling
# Remove from current repository
alinedgit uninstall
# Remove global installation
npm uninstall -g alinedgit🛠️ Development
# Clone repository
git clone https://github.com/your-username/alinedgit.git
cd alinedgit
# Install dependencies
npm install
# Test locally
npm link
alinedgit install🤝 Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🆘 Support
- 🐛 Bug Reports: GitHub Issues
- 💬 Questions: GitHub Discussions
- 📧 Security Issues: [email protected]
🎉 Credits
Created to solve the real-world problem of AI tools making unauthorized git operations. Designed to maintain human control over code repositories while enhancing productivity with AI assistance.
🤖 Smart git commands. Human control. AI protection.
