Name | popyson-git-scribe JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A CLI tool to generate commit messages and pull requests using LLM. |
upload_time | 2025-07-14 23:20:23 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
git
ai
llm
commit
developer-tools
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# git-scribe
<p align="center">
<img src="https://raw.githubusercontent.com/popyson1648/git-llm/main/logo.png" alt="git-scribe logo" width="200"/>
</p>
<p align="center">
<strong>Your AI-powered git assistant for crafting perfect commits and pull requests.</strong>
</p>
<p align="center">
<a href="#features">Features</a> •
<a href="#installation">Installation</a> •
<a href="#usage">Usage</a> •
<a href="#customization">Customization</a> •
<a href="#contributing">Contributing</a>
</p>
---
`git-scribe` is a command-line tool that leverages Large Language Models (LLMs) to automatically generate high-quality, conventional commit messages and pull request descriptions. It acts as a smart wrapper around your daily `git` commands, streamlining your workflow and improving your commit history.
## Features
- **AI-Generated Commit Messages**: Automatically generates well-formatted commit messages from your staged changes.
- **AI-Generated Pull Requests**: Creates detailed pull request titles and bodies from your branch diffs.
- **Full `git commit` Compatibility**: Supports passthrough of common `git commit` options like `--all` and `--amend`.
- **Full `gh pr create` Compatibility**: Supports common `gh pr create` options like `--reviewer`, `--label`, `--milestone`, and `--draft`.
- **Interactive Review & Edit**: Always prompts you to review and edit the AI-generated content before any action is taken.
- **Customizable Prompts**: Easily customize the AI's behavior by editing simple markdown files.
## Installation
### Prerequisites
- [Git](https://git-scm.com/)
- [Python 3.8+](https://www.python.org/)
### 1. Install `git-scribe`
You can install the tool directly from this GitHub repository:
```bash
pip install git+https://github.com/popyson1648/git-llm.git
```
*(Note: Once published to PyPI, this will become `pip install git-scribe`)*
### 2. Initial Setup
After installation, run the `init` command to create the necessary configuration files:
```bash
git-scribe init
```
This will create a new directory at `~/.config/git-scribe/`.
### 3. Configure API Keys
Open the newly created configuration file at `~/.config/git-scribe/config.toml` and add your API keys:
```toml
[api_keys]
gemini = "YOUR_GEMINI_API_KEY"
github = "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN"
```
- **Gemini API Key**: Get yours from [Google AI Studio](https://aistudio.google.com/app/apikey).
- **GitHub Personal Access Token**: Create one [here](https://github.com/settings/tokens) with `repo` scope.
## Usage
### Creating a Commit
1. Stage your files as you normally would (`git add .`).
2. Run the `commit` command. `git-scribe` will generate a message for you to review.
```bash
git-scribe commit
```
You can also pass through `git commit` arguments:
```bash
# Commit all tracked files, not just staged ones
git-scribe commit --all
# Amend the previous commit
git-scribe commit --amend
```
### Creating a Pull Request
1. Push your feature branch to the remote repository.
2. Run the `pr` command.
```bash
# Create a PR against the 'main' branch
git-scribe pr --base main
```
Add reviewers, labels, and other attributes just like you would with `gh pr create`:
```bash
git-scribe pr --base main --reviewer <user> --label "bug,enhancement" --draft
```
## Command Reference
### `git-scribe commit [OPTIONS]`
Accepts most standard `git commit` options, including but not limited to:
- `--all`, `-a`
- `--amend`
- `--author=<author>`
- `--date=<date>`
- `--no-verify`
### `git-scribe pr [OPTIONS]`
Accepts the following options, compatible with `gh pr create`:
- `--base <branch>`, `-B <branch>`
- `--head <branch>`, `-H <branch>`
- `--reviewer <handle>`, `-r <handle>` (can be specified multiple times)
- `--assignee <login>`, `-a <login>` (can be specified multiple times)
- `--label <name>`, `-l <name>` (can be specified multiple times)
- `--milestone <name>`, `-m <name>`
- `--draft`, `-d`
## Customization
You can fully customize the AI's tone, language, and output format by editing the prompt files located in `~/.config/git-scribe/`.
- **System Prompts (`system_*.md`)**: These files instruct the AI on its role and the strict output format it must follow.
- **User Prompts (`user_*.md`)**: These files are for you. You can add your own project-specific guidelines, examples, or context to further guide the AI. They are empty by default and can be safely left that way.
## Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.
### Development Setup
1. Clone the repository.
2. Create a virtual environment and activate it.
3. Install the package in editable mode with development dependencies:
```bash
pip install -e .[dev]
```
4. Run tests:
```bash
pytest
```
## License
This project is licensed under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "popyson-git-scribe",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "git, ai, llm, commit, developer-tools, cli",
"author": null,
"author_email": "popyson <popyson@example.com>",
"download_url": "https://files.pythonhosted.org/packages/fd/ce/e97d84989d7dad9f34c97112390d88dd753ac79cc0393f435025885c7df7/popyson_git_scribe-0.2.0.tar.gz",
"platform": null,
"description": "# git-scribe\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/popyson1648/git-llm/main/logo.png\" alt=\"git-scribe logo\" width=\"200\"/>\n</p>\n\n<p align=\"center\">\n <strong>Your AI-powered git assistant for crafting perfect commits and pull requests.</strong>\n</p>\n\n<p align=\"center\">\n <a href=\"#features\">Features</a> \u2022\n <a href=\"#installation\">Installation</a> \u2022\n <a href=\"#usage\">Usage</a> \u2022\n <a href=\"#customization\">Customization</a> \u2022\n <a href=\"#contributing\">Contributing</a>\n</p>\n\n---\n\n`git-scribe` is a command-line tool that leverages Large Language Models (LLMs) to automatically generate high-quality, conventional commit messages and pull request descriptions. It acts as a smart wrapper around your daily `git` commands, streamlining your workflow and improving your commit history.\n\n## Features\n\n- **AI-Generated Commit Messages**: Automatically generates well-formatted commit messages from your staged changes.\n- **AI-Generated Pull Requests**: Creates detailed pull request titles and bodies from your branch diffs.\n- **Full `git commit` Compatibility**: Supports passthrough of common `git commit` options like `--all` and `--amend`.\n- **Full `gh pr create` Compatibility**: Supports common `gh pr create` options like `--reviewer`, `--label`, `--milestone`, and `--draft`.\n- **Interactive Review & Edit**: Always prompts you to review and edit the AI-generated content before any action is taken.\n- **Customizable Prompts**: Easily customize the AI's behavior by editing simple markdown files.\n\n## Installation\n\n### Prerequisites\n\n- [Git](https://git-scm.com/)\n- [Python 3.8+](https://www.python.org/)\n\n### 1. Install `git-scribe`\n\nYou can install the tool directly from this GitHub repository:\n\n```bash\npip install git+https://github.com/popyson1648/git-llm.git\n```\n\n*(Note: Once published to PyPI, this will become `pip install git-scribe`)*\n\n### 2. Initial Setup\n\nAfter installation, run the `init` command to create the necessary configuration files:\n\n```bash\ngit-scribe init\n```\n\nThis will create a new directory at `~/.config/git-scribe/`.\n\n### 3. Configure API Keys\n\nOpen the newly created configuration file at `~/.config/git-scribe/config.toml` and add your API keys:\n\n```toml\n[api_keys]\ngemini = \"YOUR_GEMINI_API_KEY\"\ngithub = \"YOUR_GITHUB_PERSONAL_ACCESS_TOKEN\"\n```\n\n- **Gemini API Key**: Get yours from [Google AI Studio](https://aistudio.google.com/app/apikey).\n- **GitHub Personal Access Token**: Create one [here](https://github.com/settings/tokens) with `repo` scope.\n\n## Usage\n\n### Creating a Commit\n\n1. Stage your files as you normally would (`git add .`).\n2. Run the `commit` command. `git-scribe` will generate a message for you to review.\n\n```bash\ngit-scribe commit\n```\n\nYou can also pass through `git commit` arguments:\n\n```bash\n# Commit all tracked files, not just staged ones\ngit-scribe commit --all\n\n# Amend the previous commit\ngit-scribe commit --amend\n```\n\n### Creating a Pull Request\n\n1. Push your feature branch to the remote repository.\n2. Run the `pr` command.\n\n```bash\n# Create a PR against the 'main' branch\ngit-scribe pr --base main\n```\n\nAdd reviewers, labels, and other attributes just like you would with `gh pr create`:\n\n```bash\ngit-scribe pr --base main --reviewer <user> --label \"bug,enhancement\" --draft\n```\n\n## Command Reference\n\n### `git-scribe commit [OPTIONS]`\n\nAccepts most standard `git commit` options, including but not limited to:\n- `--all`, `-a`\n- `--amend`\n- `--author=<author>`\n- `--date=<date>`\n- `--no-verify`\n\n### `git-scribe pr [OPTIONS]`\n\nAccepts the following options, compatible with `gh pr create`:\n- `--base <branch>`, `-B <branch>`\n- `--head <branch>`, `-H <branch>`\n- `--reviewer <handle>`, `-r <handle>` (can be specified multiple times)\n- `--assignee <login>`, `-a <login>` (can be specified multiple times)\n- `--label <name>`, `-l <name>` (can be specified multiple times)\n- `--milestone <name>`, `-m <name>`\n- `--draft`, `-d`\n\n## Customization\n\nYou can fully customize the AI's tone, language, and output format by editing the prompt files located in `~/.config/git-scribe/`.\n\n- **System Prompts (`system_*.md`)**: These files instruct the AI on its role and the strict output format it must follow.\n- **User Prompts (`user_*.md`)**: These files are for you. You can add your own project-specific guidelines, examples, or context to further guide the AI. They are empty by default and can be safely left that way.\n\n## Contributing\n\nContributions are welcome! Please feel free to open an issue or submit a pull request.\n\n### Development Setup\n\n1. Clone the repository.\n2. Create a virtual environment and activate it.\n3. Install the package in editable mode with development dependencies:\n ```bash\n pip install -e .[dev]\n ```\n4. Run tests:\n ```bash\n pytest\n ```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI tool to generate commit messages and pull requests using LLM.",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/popyson1648/git-scribe/issues",
"Homepage": "https://github.com/popyson1648/git-scribe"
},
"split_keywords": [
"git",
" ai",
" llm",
" commit",
" developer-tools",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "83c154fce49dcc73fee6df3a84029956f315a1b620cef9c19bac237ec30cf806",
"md5": "7b230516f507fcf3f4a09168d4ffabb6",
"sha256": "19d8e498039cc97ea416f5f6de43a1fa9f1d7c91bcbdb5f53c21272b4b8ac624"
},
"downloads": -1,
"filename": "popyson_git_scribe-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7b230516f507fcf3f4a09168d4ffabb6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14808,
"upload_time": "2025-07-14T23:20:21",
"upload_time_iso_8601": "2025-07-14T23:20:21.664073Z",
"url": "https://files.pythonhosted.org/packages/83/c1/54fce49dcc73fee6df3a84029956f315a1b620cef9c19bac237ec30cf806/popyson_git_scribe-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fdcee97d84989d7dad9f34c97112390d88dd753ac79cc0393f435025885c7df7",
"md5": "c19617e1bff3be580bab2b801d3e3f6d",
"sha256": "57b692737522ec4987fe83d4a430a01030b0e37ca206e3f368b4c29b00e0fba7"
},
"downloads": -1,
"filename": "popyson_git_scribe-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "c19617e1bff3be580bab2b801d3e3f6d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13339,
"upload_time": "2025-07-14T23:20:23",
"upload_time_iso_8601": "2025-07-14T23:20:23.429200Z",
"url": "https://files.pythonhosted.org/packages/fd/ce/e97d84989d7dad9f34c97112390d88dd753ac79cc0393f435025885c7df7/popyson_git_scribe-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 23:20:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "popyson1648",
"github_project": "git-scribe",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "popyson-git-scribe"
}