gitmuse


Namegitmuse JSON
Version 0.3.9 PyPI version JSON
download
home_pageNone
SummaryGitMuse is an AI-powered tool that helps developers craft meaningful and descriptive Git commit messages.
upload_time2024-10-07 15:10:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords cli commit-messages git gpt openai productivity
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GitMuse

GitMuse is an AI-powered tool that helps developers craft meaningful and descriptive Git commit messages. By analyzing your staged changes, GitMuse provides intelligent suggestions for your commit messages, making your Git history more informative and easier to navigate.

[![Release](https://github.com/Arakiss/gitmuse/actions/workflows/release.yml/badge.svg?branch=main&event=status)](https://github.com/Arakiss/gitmuse/actions/workflows/release.yml)

## Key Features

- **No Configuration Needed**: Works out-of-the-box with Llama 3.2 and Ollama.
- **AI-Powered Commit Messages**: Leverages OpenAI's GPT models, or Ollama for locally hosted models, to generate context-aware commit messages.
- **Git Integration**: Seamlessly integrates with your existing Git workflow.
- **Customizable**: Configure AI providers, commit message styles, and other preferences via a JSON configuration file.
- **Interactive CLI**: User-friendly command-line interface with rich formatting for easy interaction.
- **Diff Analysis**: Intelligent analysis of your staged changes to provide accurate commit message suggestions.

## Installation

```bash
pip install gitmuse
```

**Note**: GitMuse requires Python 3.11 or higher and Ollama installed with the Llama 3.2 model downloaded for zero configuration.

## Usage

1. Ensure that Ollama is running:

   ```bash
   ollama serve
   ```

2. Stage your changes as you normally would:

   ```bash
   git add .
   ```

3. Instead of using `git commit`, use GitMuse:

   ```bash
   gitmuse commit
   ```

4. GitMuse will analyze your changes and suggest a commit message.
5. You can view the diff, edit the commit message, and confirm or cancel the commit.
6. If confirmed, GitMuse will create the commit with the generated or edited message.

## Development Status

GitMuse is currently in active development and is fully functional with Llama 3.2 by default, requiring no additional configuration as long as Ollama is installed and the model is downloaded. It also works with OpenAI and any of their models by default. The project now includes improved error handling, logging, and a more interactive CLI experience.

## Configuration (Optional)

GitMuse can be configured to match your preferences. You can create a `gitmuse.json` file in one of the following locations (in order of precedence):

1. In your current project directory
2. In your home directory: `~/.config/gitmuse/gitmuse.json`
3. In the global configuration directory: `/etc/gitmuse/gitmuse.json`

The configuration file should follow this structure:

```json
{
  "version": 1,
  "ai": {
    "provider": "ollama",
    "openai": {
      "model": "gpt-4",
      "apiKey": "YOUR_API_KEY_HERE",
      "organizationId": "YOUR_ORG_ID_HERE",
      "max_tokens": 1000,
      "temperature": 0.7
    },
    "ollama": {
      "model": "llama3.2",
      "url": "http://localhost:11434",
      "max_tokens": 1000,
      "temperature": 0.7
    }
  },
  "commit": {
    "style": "conventional",
    "maxLength": 72,
    "includeScope": true,
    "includeBody": true,
    "includeFooter": true,
    "conventionalCommitTypes": {
      "feat": "โœจ",
      "fix": "๐Ÿ›",
      "docs": "๐Ÿ“",
      "style": "๐Ÿ’Ž",
      "refactor": "โ™ป๏ธ",
      "perf": "โšก",
      "test": "๐Ÿงช",
      "build": "๐Ÿ—๏ธ",
      "ci": "๐Ÿš€",
      "chore": "๐Ÿงน"
    }
  },
  "prompts": {
    "commitMessage": {
      "useDefault": true,
      "customTemplate": ""
    }
  },
  "logging": {
    "level": "INFO",
    "format": "console",
    "file": ""
  }
}
```

For more configuration options, refer to the `gitmuse-schema.json` file in the repository.

## Roadmap

- **Support for Additional AI Providers**:
  - Groq
  - AWS Bedrock
  - Azure OpenAI Service

## FAQ

### Why does GitMuse work by default with Ollama and Llama 3.2?

Llama 3.2 from Meta is one of the most advanced open-source language models available, offering high precision, support for function calling, and multilingual capabilities. It's an excellent default choice for generating high-quality, context-aware commit messages, excelling in various tasks including general knowledge, multilingual translation, and contextual understanding.

### What should I do if I encounter issues during installation?

1. **Upgrade pip**:

   ```bash
   python -m pip install --upgrade pip
   ```

2. **Check Python version**: Ensure you are using Python 3.11 or higher:

   ```bash
   python --version
   ```

### GitMuse is installed but the `gitmuse` command is not found. What should I do?

1. **Check PATH**: Ensure that your Python `bin` directory is in your system's PATH. Add it to your PATH by modifying your shell configuration file (e.g., `.bashrc`, `.zshrc`):

   ```bash
   export PATH="$HOME/.local/bin:$PATH"
   ```

2. **Reinstall GitMuse**: Sometimes reinstalling the package can resolve PATH issues:

   ```bash
   pip uninstall gitmuse
   pip install gitmuse
   ```

### GitMuse is not generating commit messages as expected. What can I do?

1. **Check configuration**: Ensure your `gitmuse.json` configuration file is correctly set up if you have one.

2. **Update GitMuse**: Make sure you have the latest version of GitMuse:

   ```bash
   pip install --upgrade gitmuse
   ```

3. **Review error messages**: If there are error messages, review them for clues about what might be wrong. Ensure all dependencies are correctly installed.

4. **Check Ollama**: If using Ollama, make sure it's running and the Llama 3.2 model is properly installed.

5. **Logging**: Check the logs for more detailed information about any issues. You can adjust the logging level in the configuration file for more verbose output.

## Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.

## Support

For support, visit our [GitHub Issues](https://github.com/Arakiss/gitmuse/issues).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gitmuse",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "cli, commit-messages, git, gpt, openai, productivity",
    "author": null,
    "author_email": "Petru Arakiss <petruarakiss@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/60/bf/dfa9665078d387177f4594e8efe77d0da93197f501d075415de4dcd27777/gitmuse-0.3.9.tar.gz",
    "platform": null,
    "description": "# GitMuse\n\nGitMuse is an AI-powered tool that helps developers craft meaningful and descriptive Git commit messages. By analyzing your staged changes, GitMuse provides intelligent suggestions for your commit messages, making your Git history more informative and easier to navigate.\n\n[![Release](https://github.com/Arakiss/gitmuse/actions/workflows/release.yml/badge.svg?branch=main&event=status)](https://github.com/Arakiss/gitmuse/actions/workflows/release.yml)\n\n## Key Features\n\n- **No Configuration Needed**: Works out-of-the-box with Llama 3.2 and Ollama.\n- **AI-Powered Commit Messages**: Leverages OpenAI's GPT models, or Ollama for locally hosted models, to generate context-aware commit messages.\n- **Git Integration**: Seamlessly integrates with your existing Git workflow.\n- **Customizable**: Configure AI providers, commit message styles, and other preferences via a JSON configuration file.\n- **Interactive CLI**: User-friendly command-line interface with rich formatting for easy interaction.\n- **Diff Analysis**: Intelligent analysis of your staged changes to provide accurate commit message suggestions.\n\n## Installation\n\n```bash\npip install gitmuse\n```\n\n**Note**: GitMuse requires Python 3.11 or higher and Ollama installed with the Llama 3.2 model downloaded for zero configuration.\n\n## Usage\n\n1. Ensure that Ollama is running:\n\n   ```bash\n   ollama serve\n   ```\n\n2. Stage your changes as you normally would:\n\n   ```bash\n   git add .\n   ```\n\n3. Instead of using `git commit`, use GitMuse:\n\n   ```bash\n   gitmuse commit\n   ```\n\n4. GitMuse will analyze your changes and suggest a commit message.\n5. You can view the diff, edit the commit message, and confirm or cancel the commit.\n6. If confirmed, GitMuse will create the commit with the generated or edited message.\n\n## Development Status\n\nGitMuse is currently in active development and is fully functional with Llama 3.2 by default, requiring no additional configuration as long as Ollama is installed and the model is downloaded. It also works with OpenAI and any of their models by default. The project now includes improved error handling, logging, and a more interactive CLI experience.\n\n## Configuration (Optional)\n\nGitMuse can be configured to match your preferences. You can create a `gitmuse.json` file in one of the following locations (in order of precedence):\n\n1. In your current project directory\n2. In your home directory: `~/.config/gitmuse/gitmuse.json`\n3. In the global configuration directory: `/etc/gitmuse/gitmuse.json`\n\nThe configuration file should follow this structure:\n\n```json\n{\n  \"version\": 1,\n  \"ai\": {\n    \"provider\": \"ollama\",\n    \"openai\": {\n      \"model\": \"gpt-4\",\n      \"apiKey\": \"YOUR_API_KEY_HERE\",\n      \"organizationId\": \"YOUR_ORG_ID_HERE\",\n      \"max_tokens\": 1000,\n      \"temperature\": 0.7\n    },\n    \"ollama\": {\n      \"model\": \"llama3.2\",\n      \"url\": \"http://localhost:11434\",\n      \"max_tokens\": 1000,\n      \"temperature\": 0.7\n    }\n  },\n  \"commit\": {\n    \"style\": \"conventional\",\n    \"maxLength\": 72,\n    \"includeScope\": true,\n    \"includeBody\": true,\n    \"includeFooter\": true,\n    \"conventionalCommitTypes\": {\n      \"feat\": \"\u2728\",\n      \"fix\": \"\ud83d\udc1b\",\n      \"docs\": \"\ud83d\udcdd\",\n      \"style\": \"\ud83d\udc8e\",\n      \"refactor\": \"\u267b\ufe0f\",\n      \"perf\": \"\u26a1\",\n      \"test\": \"\ud83e\uddea\",\n      \"build\": \"\ud83c\udfd7\ufe0f\",\n      \"ci\": \"\ud83d\ude80\",\n      \"chore\": \"\ud83e\uddf9\"\n    }\n  },\n  \"prompts\": {\n    \"commitMessage\": {\n      \"useDefault\": true,\n      \"customTemplate\": \"\"\n    }\n  },\n  \"logging\": {\n    \"level\": \"INFO\",\n    \"format\": \"console\",\n    \"file\": \"\"\n  }\n}\n```\n\nFor more configuration options, refer to the `gitmuse-schema.json` file in the repository.\n\n## Roadmap\n\n- **Support for Additional AI Providers**:\n  - Groq\n  - AWS Bedrock\n  - Azure OpenAI Service\n\n## FAQ\n\n### Why does GitMuse work by default with Ollama and Llama 3.2?\n\nLlama 3.2 from Meta is one of the most advanced open-source language models available, offering high precision, support for function calling, and multilingual capabilities. It's an excellent default choice for generating high-quality, context-aware commit messages, excelling in various tasks including general knowledge, multilingual translation, and contextual understanding.\n\n### What should I do if I encounter issues during installation?\n\n1. **Upgrade pip**:\n\n   ```bash\n   python -m pip install --upgrade pip\n   ```\n\n2. **Check Python version**: Ensure you are using Python 3.11 or higher:\n\n   ```bash\n   python --version\n   ```\n\n### GitMuse is installed but the `gitmuse` command is not found. What should I do?\n\n1. **Check PATH**: Ensure that your Python `bin` directory is in your system's PATH. Add it to your PATH by modifying your shell configuration file (e.g., `.bashrc`, `.zshrc`):\n\n   ```bash\n   export PATH=\"$HOME/.local/bin:$PATH\"\n   ```\n\n2. **Reinstall GitMuse**: Sometimes reinstalling the package can resolve PATH issues:\n\n   ```bash\n   pip uninstall gitmuse\n   pip install gitmuse\n   ```\n\n### GitMuse is not generating commit messages as expected. What can I do?\n\n1. **Check configuration**: Ensure your `gitmuse.json` configuration file is correctly set up if you have one.\n\n2. **Update GitMuse**: Make sure you have the latest version of GitMuse:\n\n   ```bash\n   pip install --upgrade gitmuse\n   ```\n\n3. **Review error messages**: If there are error messages, review them for clues about what might be wrong. Ensure all dependencies are correctly installed.\n\n4. **Check Ollama**: If using Ollama, make sure it's running and the Llama 3.2 model is properly installed.\n\n5. **Logging**: Check the logs for more detailed information about any issues. You can adjust the logging level in the configuration file for more verbose output.\n\n## Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.\n\n## Support\n\nFor support, visit our [GitHub Issues](https://github.com/Arakiss/gitmuse/issues).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "GitMuse is an AI-powered tool that helps developers craft meaningful and descriptive Git commit messages.",
    "version": "0.3.9",
    "project_urls": {
        "documentation": "https://github.com/Arakiss/gitmuse/wiki",
        "homepage": "https://github.com/Arakiss/gitmuse",
        "repository": "https://github.com/Arakiss/gitmuse"
    },
    "split_keywords": [
        "cli",
        " commit-messages",
        " git",
        " gpt",
        " openai",
        " productivity"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "79f932b1bef81d42e6e67de1b0fb9f94923120b862bf38e28b6b022508185603",
                "md5": "4b4040c8454118e3ada52752e53f134a",
                "sha256": "5448cc88edd9c48062304b05660aca461a181c89646fbeabd8d0616b3a46f970"
            },
            "downloads": -1,
            "filename": "gitmuse-0.3.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b4040c8454118e3ada52752e53f134a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 34504,
            "upload_time": "2024-10-07T15:10:53",
            "upload_time_iso_8601": "2024-10-07T15:10:53.505487Z",
            "url": "https://files.pythonhosted.org/packages/79/f9/32b1bef81d42e6e67de1b0fb9f94923120b862bf38e28b6b022508185603/gitmuse-0.3.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "60bfdfa9665078d387177f4594e8efe77d0da93197f501d075415de4dcd27777",
                "md5": "c27169da101e492433bcf2271ccc9726",
                "sha256": "ffbcb6c7f08bb2cfe12c5ef18ebd7bcec59e9d7d3a0b412dba37fe13ae438ab8"
            },
            "downloads": -1,
            "filename": "gitmuse-0.3.9.tar.gz",
            "has_sig": false,
            "md5_digest": "c27169da101e492433bcf2271ccc9726",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 25909,
            "upload_time": "2024-10-07T15:10:55",
            "upload_time_iso_8601": "2024-10-07T15:10:55.027109Z",
            "url": "https://files.pythonhosted.org/packages/60/bf/dfa9665078d387177f4594e8efe77d0da93197f501d075415de4dcd27777/gitmuse-0.3.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-07 15:10:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Arakiss",
    "github_project": "gitmuse",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gitmuse"
}
        
Elapsed time: 0.51504s