Metadata-Version: 2.2
Name: brose-changelog-cli
Version: 0.1.0
Summary: AI-powered changelog generator from git commits
Author-email: bruno <contact@brunorodriguez.dev>
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Documentation
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.115.8
Requires-Dist: jinja2>=3.1.5
Requires-Dist: markdown>=3.7
Requires-Dist: openai>=1.61.1
Requires-Dist: pydantic>=2.10.6
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: typer>=0.15.1
Requires-Dist: uvicorn>=0.34.0
Provides-Extra: web
Requires-Dist: fastapi>=0.115.8; extra == "web"
Requires-Dist: uvicorn>=0.34.0; extra == "web"
Requires-Dist: jinja2>=3.1.5; extra == "web"
Requires-Dist: markdown>=3.7; extra == "web"

# brose-changelog-cli

An AI-powered changelog generator that creates structured, user-friendly changelogs from your git history.

## Features

- 🤖 AI-powered analysis of git commits
- 📝 Structured changelog generation
- 🌐 Web viewer for changelogs
- 🔍 Smart filtering of relevant changes
- 🎯 Relevance scoring for changes
- 🚫 Automatic exclusion of non-essential files

## Installation

```bash
uv install brose-changelog-cli
```

## Usage

### Generate Changelog

Create or update your changelog based on new git commits:

```bash
changelog generate
```

This will:
- Analyze new commits in your repository
- Generate structured changelog entries
- Create/update `changelog/changelog.json`
- Generate a formatted `CHANGELOG.md`

### Web Viewer

Launch a web interface to view your changelog:

```bash
changelog web
```

By default, the web viewer runs at `http://127.0.0.1:8000`. You can customize the host and port:

```bash
changelog web --host 0.0.0.0 --port 3000
```

## Configuration

1. Set up your OpenAI API key:
```bash
export OPENAI_API_KEY=your-api-key
```

2. Optional: Create a `.env` file:
```
OPENAI_API_KEY=your-api-key
```

## How It Works

1. **Commit Analysis**: The tool analyzes your git commits, excluding non-essential files like documentation, tests, and configuration files.

2. **AI Processing**: Each commit is processed through OpenAI's GPT model to:
   - Categorize changes (Added, Fixed, Changed, Removed)
   - Generate user-friendly descriptions
   - Assign relevance scores (1-10)

3. **Changelog Generation**: Changes are organized by:
   - Week
   - Commit
   - Change category
   - Relevance (prioritizing high-impact changes)

## Requirements

- Python ≥ 3.12
- Git repository
- OpenAI API key

## Optional Dependencies

Web viewer requires additional packages:
- FastAPI
- Uvicorn
- Jinja2
- Markdown

These are automatically installed when using the `[web]` extra:

```bash
uv install "brose-changelog-cli[web]"
```
