{"id":28962697,"url":"https://github.com/evisdrenova/ghit","last_synced_at":"2025-06-24T03:11:50.584Z","repository":{"id":300823112,"uuid":"1007255881","full_name":"evisdrenova/ghit","owner":"evisdrenova","description":"AI-powered CLI that automatically generates commit messages and automates git workflows","archived":false,"fork":false,"pushed_at":"2025-06-23T20:15:05.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T20:16:07.701Z","etag":null,"topics":["ai","git","llm","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evisdrenova.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-23T17:48:52.000Z","updated_at":"2025-06-23T20:15:57.000Z","dependencies_parsed_at":"2025-06-23T20:26:12.709Z","dependency_job_id":null,"html_url":"https://github.com/evisdrenova/ghit","commit_stats":null,"previous_names":["evisdrenova/ghit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/evisdrenova/ghit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evisdrenova%2Fghit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evisdrenova%2Fghit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evisdrenova%2Fghit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evisdrenova%2Fghit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evisdrenova","download_url":"https://codeload.github.com/evisdrenova/ghit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evisdrenova%2Fghit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261595784,"owners_count":23182249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","git","llm","rust"],"created_at":"2025-06-24T03:11:49.990Z","updated_at":"2025-06-24T03:11:50.568Z","avatar_url":"https://github.com/evisdrenova.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ghit\n\n\nhttps://github.com/user-attachments/assets/6c9f3129-bcfa-4357-a3e7-14422dc163df\n\n\n**ghit** is a CLI that uses AI to automatically generate meaningful Git commit messages and streamline your dev workflow.\n\n## Features\n\n- **AI-Generated Commit Messages**: Uses OpenAI's GPT models to analyze your changes and create descriptive commit messages\n- **Workflow Automation**: Add files, generate message, commit, and push in one command\n- **Smart Diff Analysis**: Automatically stages all modified files and analyzes multi-file changes\n- **Configurable Verbosity**: Choose between quiet (one-line), normal (subject + body), or verbose commit messages\n- **Interactive Confirmation**: Review and approve generated messages before committing\n- **Simple Configuration**: Easy setup with a single TOML config file\n\n## Quick Start\n\n### Installation\n\n#### Option 1: Install from Releases (Recommended)\n\nDownload the latest binary for your platform from the [releases page](https://github.com/evisdrenova/ghit/releases):\n\n**macOS/Linux:**\n\n```bash\ncurl -L https://github.com/evisdrenova/ghit/releases/latest/download/ghit-$(uname -s)-$(uname -m).tar.gz | tar -xz\nsudo mv ghit /usr/local/bin/\n```\n\n**Windows:**\nDownload `ghit-windows.zip` from releases and add to your PATH.\n\n#### Option 2: Install from Source\n\n```bash\ngit clone https://github.com/evisdrenova/ghit.git\ncd ghit\ncargo build --release\nsudo cp target/release/ghit /usr/local/bin/\n```\n\n#### Option 3: Install with Cargo\n\n```bash\ncargo install ghit\n```\n\n### Configuration\n\nCreate a `ghit.toml` file in your home directory (`~/.ghit.toml` or `C:\\Users\\YourName\\ghit.toml`):\n\n```toml\nmodel = \"gpt-4.1\"  # any openai model\napi_key = \"your-openai-api-key-here\"\nmessage_level = \"normal\"  # quiet, normal, or verbose\n```\n\n## Usage\n\n### Basic Commands\n\n**Automatic workflow (most common):**\n\n```bash\n# Auto-stage all changes, generate message, commit, and push\nghit --auto\n\n# Or simply (default behavior)\nghit\n```\n\n**Generate message only:**\n\n```bash\n# Generate commit message for staged changes (doesn't commit)\nghit --generate\n```\n\n**Stage and generate:**\n\n```bash\n# Add specific files and generate message (doesn't commit)\nghit --stage-and-generate src/main.rs src/lib.rs\n\n# Add all changes and generate message\nghit --stage-and-generate\n```\n\n### Working with Specific Files\n\n```bash\n# Auto-commit only specific files\nghit --auto src/main.rs README.md\n\n# Push to a specific branch\nghit --auto --branch feature-branch\n\n# Stage specific files and generate message\nghit --stage-and-generate src/components/ tests/\n```\n\n## Configuration Options\n\n| Option          | Description                                             | Default  |\n| --------------- | ------------------------------------------------------- | -------- |\n| `model`         | OpenAI model to use (`gpt-3.5-turbo`, `gpt-4`, etc.)    | `none`   |\n| `api_key`       | Your OpenAI API key                                     | Required |\n| `message_level` | Commit message verbosity (`quiet`, `normal`, `verbose`) | `normal` |\n\n### Message Verbosity Levels\n\nConfigure in `~/.ghit.toml`:\n\n- **`quiet`**: One-line commit message only\n- **`normal`**: Subject line + short description (default)\n- **`verbose`**: Detailed subject + explanatory body\n\n## Example Workflow\n\n1. **Make your changes** to any files in your repository\n2. **Run ghit:**\n   ```bash\n   ghit --auto\n   ```\n3. **Review the generated message:**\n\n   ```\n   Generated commit message:\n   Subject: feat: add user authentication with JWT tokens\n   Body:\n   - Implement JWT-based authentication system\n   - Add login and registration endpoints\n   - Include middleware for protected routes\n   - Update user model with password hashing\n\n   Create this commit? [Y/n]:\n   ```\n\n4. **Confirm** by pressing Enter or 'y'\n5. **Done!** Your changes are committed and pushed automatically\n\n## What Makes Good Commit Messages?\n\nghit analyzes your code changes and generates commit messages that follow best practices:\n\n- **Clear subject lines** that summarize the change\n- **Conventional commit format** (feat:, fix:, docs:, etc.)\n- **Detailed explanations** of what changed and why\n- **Multi-file awareness** that understands related changes across files\n\n### Example Generated Messages\n\n**For a bug fix:**\n\n```\nfix: resolve memory leak in image processing\n\n- Fix buffer overflow in resize function\n- Add proper cleanup for temporary arrays\n- Update error handling for edge cases\n```\n\n**For a new feature:**\n\n```\nfeat: implement dark mode toggle\n\n- Add theme context provider\n- Create toggle component with smooth transitions\n- Persist user preference in localStorage\n- Update all components to support both themes\n```\n\n## Command Line Options\n\n```\nghit [OPTIONS] [FILES...]\n\nOPTIONS:\n    -a, --auto                 Add files, generate message, commit, and push automatically\n    -b, --branch \u003cBRANCH\u003e      Branch to push to (defaults to current branch)\n    -g, --generate             Only generate commit message for staged changes\n    -s, --stage-and-generate   Add files and generate message (don't commit)\n    -h, --help                 Print help message\n\nEXAMPLES:\n    ghit                       # Auto-commit all changes (default)\n    ghit --auto               # Same as above\n    ghit --branch main        # Push to specific branch\n    ghit src/main.rs          # Auto-commit specific file\n    ghit --generate           # Just generate message for staged changes\n    ghit -s src/ tests/       # Stage files and generate message\n```\n\n## Troubleshooting\n\n**\"No changes found to commit\"**\n\n- Make sure you have modified files in your repository\n- Check `git status` to see if there are any changes\n\n**\"Failed to load config\"**\n\n- Ensure `ghit.toml` exists in your home directory (`~/.ghit.toml`)\n- Verify your OpenAI API key is correct and has credits\n\n**\"OpenAI API error\"**\n\n- Check your API key is valid and has available credits\n- Verify your internet connection\n- Try a different model (e.g., `gpt-3.5-turbo` instead of `gpt-4`)\n\n**Permission denied when installing**\n\n- Use `sudo` when copying to `/usr/local/bin/`\n- Or install to a directory in your PATH that you own\n\n## Contributing\n\nContributions are welcome! Here's how to get started:\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Make your changes and test them\n4. Use ghit to commit your changes!\n5. Push and create a pull request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nIf you find ghit useful, please consider:\n\n- Starring the repository\n- Reporting bugs or requesting features\n- Contributing improvements\n- Sharing with other developers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevisdrenova%2Fghit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevisdrenova%2Fghit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevisdrenova%2Fghit/lists"}