gut-ai


Namegut-ai JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
SummaryAdd your description here
upload_time2025-07-30 11:47:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gut 🫀

**Trust your guts on git** — An AI-powered CLI tool that executes `git` and `gh` commands from natural language queries.

Transform commands like "add all my changes and commit with a meaningful message" into the exact git commands you need, with AI-powered intelligence and human-in-the-loop validation.

## ✨ Features

- 🤖 **Natural Language Processing**: Describe what you want to do in plain English
- 🔄 **Human-in-the-Loop**: Review and approve commands before execution
- 🎯 **Smart Command Selection**: Automatically chooses between `git` and `gh` commands
- 📖 **Command Explanation**: Get clear explanations of what each command does
- 🎨 **Rich Console Interface**: Beautiful terminal experience with syntax highlighting

## 🚀 Quick Start

### Installation

Install gut using pip:

```bash
pip install gut-ai
```

### Setup

1. Get a [Groq API key](https://console.groq.com/keys)
2. Set your API key as an environment variable:

```bash
export GROQ_API_KEY="your_api_key_here"
```

Or create a `.env` file in your project directory:

```
GROQ_API_KEY=your_api_key_here
```

### Usage

Simply run gut and describe what you want to do:

```bash
gut-ai
```

Example interactions:

- "Add all my current changes to git"
- "Create a new branch called feature/login"
- "Push my changes to origin"
- "Create a pull request"

You can also run gut to check and correct your commands:

```bash
gut-ai --command "git commit 'feat: analytics'" --question "Why is my command failing?"
```

Or to simply explain them:

```bash
gut-ai --command "git checkout -b 'feat/analytics'"
```

> **Note**: You can also use the `-c` and `-q` as abbreviated flags.

## 🔧 Development Setup

### Prerequisites

- [uv](https://docs.astral.sh/uv/) package manager

### Clone and Install

```bash
git clone https://github.com/AstraBert/gut
cd gut/
uv sync
```

### Run from Source

```bash
uvx --from . gut-ai
```

## 🛠️ How It Works

gut uses an AI-powered workflow built with [llama-index-workflows](https://github.com/run-llama/workflows-py) that follows these steps:

**Gut interface**

1. **Command Analysis**: Analyzes your natural language input to understand intent
2. **Command Selection**: Chooses between `git` and `gh` based on your requirements
3. **Parameter Mapping**: Determines the specific subcommands and options needed
4. **Explanation Generation**: Creates a clear explanation of what the command will do
5. **Human Validation**: Shows you the command and explanation for approval
6. **Execution**: Runs the command if approved, or restarts the process with your feedback

**Gut --command and --question**

1. **Command Analysis**: Analyzes your command and question, producing an explanation and a potential fix for it.
2. **Human Validation**: Shows you the explanation and, if there, the corrected command and waits for approval
3. **Execution**: Runs the command if approved, or restarts the process with your feedback

The entire experience runs in a beautiful [Rich](https://github.com/Textualize/rich) console interface with structured inputs and outputs using Pydantic models.

## 📋 Requirements

- **Groq API Key**: Required for AI functionality
- **Git**: Must be installed and configured
- **GitHub CLI (optional)**: Required only for GitHub-related commands (`gh`)

## 🤝 Contributing

We welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to get started.

## 📄 License

This project is licensed under the [MIT License](./LICENSE).

## 🙋‍♀️ Support

- 🐛 **Bug Reports**: [Open an issue](https://github.com/AstraBert/gut/issues)
- 💡 **Feature Requests**: [Start a discussion](https://github.com/AstraBert/gut/discussions)
- 📧 **Questions**: Check existing [issues](https://github.com/AstraBert/gut/issues) and [discussions](https://github.com/AstraBert/gut/discussions)

---

_Made with ❤️ for developers who want to git things done faster_

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gut-ai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/25/2d/0989a274c60be0373bd4fde86279cd9eb56ef9351e7d5ab2288092e3b6d9/gut_ai-0.3.1.tar.gz",
    "platform": null,
    "description": "# gut \ud83e\udec0\n\n**Trust your guts on git** \u2014 An AI-powered CLI tool that executes `git` and `gh` commands from natural language queries.\n\nTransform commands like \"add all my changes and commit with a meaningful message\" into the exact git commands you need, with AI-powered intelligence and human-in-the-loop validation.\n\n## \u2728 Features\n\n- \ud83e\udd16 **Natural Language Processing**: Describe what you want to do in plain English\n- \ud83d\udd04 **Human-in-the-Loop**: Review and approve commands before execution\n- \ud83c\udfaf **Smart Command Selection**: Automatically chooses between `git` and `gh` commands\n- \ud83d\udcd6 **Command Explanation**: Get clear explanations of what each command does\n- \ud83c\udfa8 **Rich Console Interface**: Beautiful terminal experience with syntax highlighting\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\nInstall gut using pip:\n\n```bash\npip install gut-ai\n```\n\n### Setup\n\n1. Get a [Groq API key](https://console.groq.com/keys)\n2. Set your API key as an environment variable:\n\n```bash\nexport GROQ_API_KEY=\"your_api_key_here\"\n```\n\nOr create a `.env` file in your project directory:\n\n```\nGROQ_API_KEY=your_api_key_here\n```\n\n### Usage\n\nSimply run gut and describe what you want to do:\n\n```bash\ngut-ai\n```\n\nExample interactions:\n\n- \"Add all my current changes to git\"\n- \"Create a new branch called feature/login\"\n- \"Push my changes to origin\"\n- \"Create a pull request\"\n\nYou can also run gut to check and correct your commands:\n\n```bash\ngut-ai --command \"git commit 'feat: analytics'\" --question \"Why is my command failing?\"\n```\n\nOr to simply explain them:\n\n```bash\ngut-ai --command \"git checkout -b 'feat/analytics'\"\n```\n\n> **Note**: You can also use the `-c` and `-q` as abbreviated flags.\n\n## \ud83d\udd27 Development Setup\n\n### Prerequisites\n\n- [uv](https://docs.astral.sh/uv/) package manager\n\n### Clone and Install\n\n```bash\ngit clone https://github.com/AstraBert/gut\ncd gut/\nuv sync\n```\n\n### Run from Source\n\n```bash\nuvx --from . gut-ai\n```\n\n## \ud83d\udee0\ufe0f How It Works\n\ngut uses an AI-powered workflow built with [llama-index-workflows](https://github.com/run-llama/workflows-py) that follows these steps:\n\n**Gut interface**\n\n1. **Command Analysis**: Analyzes your natural language input to understand intent\n2. **Command Selection**: Chooses between `git` and `gh` based on your requirements\n3. **Parameter Mapping**: Determines the specific subcommands and options needed\n4. **Explanation Generation**: Creates a clear explanation of what the command will do\n5. **Human Validation**: Shows you the command and explanation for approval\n6. **Execution**: Runs the command if approved, or restarts the process with your feedback\n\n**Gut --command and --question**\n\n1. **Command Analysis**: Analyzes your command and question, producing an explanation and a potential fix for it.\n2. **Human Validation**: Shows you the explanation and, if there, the corrected command and waits for approval\n3. **Execution**: Runs the command if approved, or restarts the process with your feedback\n\nThe entire experience runs in a beautiful [Rich](https://github.com/Textualize/rich) console interface with structured inputs and outputs using Pydantic models.\n\n## \ud83d\udccb Requirements\n\n- **Groq API Key**: Required for AI functionality\n- **Git**: Must be installed and configured\n- **GitHub CLI (optional)**: Required only for GitHub-related commands (`gh`)\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please read our [Contributing Guide](CONTRIBUTING.md) to get started.\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n## \ud83d\ude4b\u200d\u2640\ufe0f Support\n\n- \ud83d\udc1b **Bug Reports**: [Open an issue](https://github.com/AstraBert/gut/issues)\n- \ud83d\udca1 **Feature Requests**: [Start a discussion](https://github.com/AstraBert/gut/discussions)\n- \ud83d\udce7 **Questions**: Check existing [issues](https://github.com/AstraBert/gut/issues) and [discussions](https://github.com/AstraBert/gut/discussions)\n\n---\n\n_Made with \u2764\ufe0f for developers who want to git things done faster_\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Add your description here",
    "version": "0.3.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "135b444912065742bec480d30aec4d4cdf7f401cae224499c5f98c41ac071e96",
                "md5": "9d53dbc7913a83fb9e185d4715fb8d49",
                "sha256": "3931de83ced0945fd1a32324df5cbad81e6c5bc80bd9760de223d6f539c740d6"
            },
            "downloads": -1,
            "filename": "gut_ai-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d53dbc7913a83fb9e185d4715fb8d49",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 12689,
            "upload_time": "2025-07-30T11:47:47",
            "upload_time_iso_8601": "2025-07-30T11:47:47.604248Z",
            "url": "https://files.pythonhosted.org/packages/13/5b/444912065742bec480d30aec4d4cdf7f401cae224499c5f98c41ac071e96/gut_ai-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "252d0989a274c60be0373bd4fde86279cd9eb56ef9351e7d5ab2288092e3b6d9",
                "md5": "cb0702d82233a08de32ead260b3eb0ed",
                "sha256": "df5fa44aae7c7faa1abea3ceee9330a130b4b6e2c007584c97c7a92ab7797ad5"
            },
            "downloads": -1,
            "filename": "gut_ai-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "cb0702d82233a08de32ead260b3eb0ed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 74291,
            "upload_time": "2025-07-30T11:47:48",
            "upload_time_iso_8601": "2025-07-30T11:47:48.471285Z",
            "url": "https://files.pythonhosted.org/packages/25/2d/0989a274c60be0373bd4fde86279cd9eb56ef9351e7d5ab2288092e3b6d9/gut_ai-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-30 11:47:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gut-ai"
}
        
Elapsed time: 0.86264s