1.1.5 β€’ Published 5 months ago

gpush-ai v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

🌟 gpush - AI-Powered Git Commit Assistant

Generate perfect commit messages effortlessly with AI!

gpush leverages OpenAI GPT-4o or AWS Bedrock Claude models to craft clear, conventional commit messages and push your changesβ€”all in one command.

πŸš€ Features

  • AI-Driven Commit Messages: Automatically generates concise, conventional commits from staged changes
  • Multi-Provider Support: Choose between OpenAI or AWS Bedrock (Claude models)
  • Secure Configuration: Encrypted API key storage and environment variables
  • Dry-Run Mode: Preview generated messages without committing
  • Smart Diff Truncation: Handles large diffs gracefully to stay within AI token limits

πŸ“¦ Installation

npm install -g gpush-ai

Prerequisites:

  • Node.js v18+
  • Git installed
  • API key for OpenAI or AWS credentials for Bedrock access

βš™οΈ Configuration

1. Set API Key (OpenAI)

gpush config --set-key sk-your-openai-key-here

2. Choose AI Provider & Model

CommandDescriptionExample
gpush ai:provider <provider>Set provider (openai or bedrock)gpush ai:provider bedrock
gpush ai:model <model>Set model (e.g., gpt-4o, Claude models)gpush ai:model anthropic.claude-3-haiku-20240307-v1:0
gpush ai:aws-region <region>Set AWS region for Bedrockgpush ai:aws-region us-east-1

3. Verify Configuration

gpush status

πŸ› οΈ Usage

Generate & Push Commit

gpush push

Options:

  • --dry-run: Preview message without committing
  • --force: Force push changes
  • --branch <name>: Specify target branch

Example Workflow:

git add .
gpush push --dry-run  # Preview message
gpush push            # Commit and push

πŸ” All Commands

CommandDescription
gpush pushMain command to generate and push commits
gpush ai:providerSwitch between OpenAI/Bedrock
gpush ai:modelSet default AI model
gpush ai:aws-regionConfigure AWS region for Bedrock
gpush configManage API key
gpush statusShow current configuration

🌍 Environment Variables

VariableDescriptionDefault
MAX_DIFF_LENGTHTruncate diffs longer than this4000
GPUSH_ENCRYPTION_KEYCustom encryption key for config-

🚨 Troubleshooting

Common Issues:

  • "No API key configured": Run gpush config --set-key
  • AWS Bedrock Access Denied: Ensure IAM permissions include bedrock:InvokeModel
  • Long Diffs: Increase MAX_DIFF_LENGTH if truncation occurs

Error Codes:

  • 1: Configuration error
  • 3: AI generation failure
  • 4: API connection issue

πŸ”’ Security

  • API keys are encrypted using conf
  • AWS credentials use the default AWS SDK credential chain

🀝 Contributing

Contributions welcome! 1. Fork the repository 2. Create a feature branch 3. Submit a PR with tests and documentation updates

πŸ“„ License

MIT

⚑ Inspired by

  • CursorAI
  • Me, myself and I
  • Mom

Happy committing! ✨
Made with ❀️ by Me

1.1.5

5 months ago

1.1.4

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.0

5 months ago