Skip to main content

kacs

CI PyPI version Python 3.9+ License: MIT

Keep a changelog, stupid!

A minimal Python CLI tool that generates changelogs from git commit messages using LLM analysis. Perfect for CI/CD pipelines and automated release workflows.

Features

  • 🚀 Minimal dependencies - Only requires ask2api + Python stdlib
  • 📝 Multiple formats - Keep a Changelog, GitHub, GitLab, or custom templates
  • 🤖 LLM-powered analysis - Automatically categorizes commits into Added, Changed, Fixed, etc.
  • ⚡ CI/CD ready - Fast execution suitable for automated workflows
  • 🎯 Git tag based - Extract commits between any two git tags

Installation

pip install kacs

Setup

Set your API key as an environment variable:

export ASK2API_API_KEY="your-api-key"
# or
export OPENAI_API_KEY="your-openai-key"

Usage

Basic Usage

# Generate changelog between two tags
kacs --from-tag v1.0.0 --to-tag v1.1.0

# With custom date
kacs --from-tag v1.0.0 --to-tag v1.1.0 --date 2017-07-17

# Save to file
kacs --from-tag v1.0.0 --to-tag v1.1.0 --output CHANGELOG.md

Templates

# Use GitHub format
kacs --from-tag v1.0.0 --to-tag v1.1.0 --template github

# Use GitLab format
kacs --from-tag v1.0.0 --to-tag v1.1.0 --template gitlab

# Use custom template
kacs --from-tag v1.0.0 --to-tag v1.1.0 --custom-template ./my-template.j2

Commit Links

# Include commit links (auto-detects repository URL)
kacs --from-tag v1.0.0 --to-tag v1.1.0 --include-links

# With explicit repository URL
kacs --from-tag v1.0.0 --to-tag v1.1.0 --include-links --repo-url https://github.com/user/repo

Example Output

Keep a Changelog format (default):

## [1.1.0] - 2024-01-15

### Added
- New user authentication system
- Support for multiple database backends

### Changed
- Improved error handling in API endpoints
- Updated documentation structure

### Fixed
- Fixed memory leak in background tasks
- Resolved issue with concurrent requests

GitHub format:

## What's Changed in 1.1.0

### ✨ New Features
* New user authentication system
* Support for multiple database backends

### 🐛 Bug Fixes
* Fixed memory leak in background tasks

**Full Changelog**: https://github.com/user/repo/compare/v1.0.0...v1.1.0

CI/CD Integration

# GitHub Actions example
- name: Generate Changelog
  run: |
    pip install kacs
    kacs --from-tag ${{ github.event.release.tag_name }} --to-tag HEAD --output CHANGELOG.md
  env:
    ASK2API_API_KEY: ${{ secrets.ASK2API_API_KEY }}

Documentation

  • Template System - Learn about built-in templates and creating custom ones

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

Links

Metadata

Release files for kacs 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kacs 0.6.0
File Size Uploaded
kacs-0.6.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kacs 0.6.0
File Interpreter ABI Platform
kacs-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / kacs-0.6.0.tar.gz

Download URL kacs-0.6.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dc3a1d113cdd7351ec6e1ca4e9e8bc0bf508cd96f41fe2dec1111519c1fa44f1
BLAKE2b-256 checksum
How to use checksums
f4b5f9f5cf3cc4e5cb61546f715fa0149efebe3a7edae5ac18404d6d55fd1f26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / kacs-0.6.0-py3-none-any.whl

Download URL kacs-0.6.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0315e8903b519abb95fc14efdc14200cdcc0830bf97a24dcdd8d046cc560a0d
BLAKE2b-256 checksum
How to use checksums
9a409f3e8af3b8266daad3607edbcb55d745e28e650f8ab57831e6bb939c0ff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page