Metadata-Version: 2.4
Name: git-scribe-cli
Version: 0.1.2
Summary: Intelligence Layer between local code changes and remote repository. Automates commit messages and PR descriptions using LLMs.
Project-URL: Homepage, https://github.com/example/git-scribe-cli
Project-URL: Repository, https://github.com/example/git-scribe-cli
Author-email: Akash <akash@example.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.8
Requires-Dist: gitpython>=3.1.0
Requires-Dist: mccabe>=0.7.0
Requires-Dist: openai>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.9.0
Description-Content-Type: text/markdown

# 🖋️ git-scribe-cli

**The Intelligence Layer for your Git workflow.**

`git-scribe-cli` automates the narrative of your code. It turns your changes into meaningful, conventional commit messages and detailed Pull Request descriptions using the power of LLMs (OpenAI GPT-4o). It also acts as a "Team Lead" by performing pre-flight readiness checks before you commit.

---

## ✨ Features

- **🤖 AI-Generated Commits:** content-aware, semantic messages (Conventional Commits).
- **📝 One-Command PRs:** Generates full PR descriptions with summaries, type of change, and checklists.
- **🛡️ Review Readiness Checks:**
    - ⚠️ Warns if you modify logic without adding tests.
    - 🔒 Scans for potential secrets/keys in your code.
    - 🐍 Checks specific files for missing migrations (e.g., Django models).
- **✨ Beautiful TUI:** Built with `Rich` for a premium terminal experience.

---

## 🚀 Installation

### From PyPI (Coming Soon)
```bash
pip install git-scribe-cli
```

### From Source
```bash
git clone https://github.com/akash1551/git-scribe-cli.git
cd git-scribe-cli
pip install .
```

---

## ⚙️ Configuration

`git-scribe-cli` requires an OpenAI API Key to function.

```bash
export OPENAI_API_KEY="sk-..."
```

Add this to your `.bashrc` or `.zshrc` to make it permanent.

---

## 📖 Usage

### 1. Smart Commit (`scribe commit`)

Stage your changes and run:

```bash
scribe commit
```

**What happens:**
1.  **Readiness Check:** Scans your staged changes for issues (missing tests, secrets).
2.  **Generation:** An LLM analyzes your diff and proposes a commit message.
3.  **Review:** You see the formatted message.
    - Press **`a`** to Accept.
    - Press **`e`** to Edit.
    - Press **`c`** to Cancel.

### 2. PR Description (`scribe pr`)

Ready to push? Generate a PR description based on your branch history:

```bash
scribe pr --main-branch master
```

**What happens:**
1.  **Analysis:** Reads all commits on your current branch that are ahead of `master` (or `main`).
2.  **Generation:** Creates a Markdown-formatted PR description.
3.  **Save:** Options to save it to `PULL_REQUEST_TEMPLATE.md` or copy it.

---

## 🛠️ Development

To contribute or modify `git-scribe`:

1.  Clone the repo.
2.  Install dependencies: `pip install -e .`
3.  Run the tool: `python src/main.py commit`

---

## 📄 License

MIT
