Skip to main content

Chronicler automates development documentation by using Git history and language models to generate commit descriptions and release notes.

Project description

Chronicler PyPI - Version

Introduction

Chronicler is an innovative Python tool designed to streamline and automate the documentation process for development projects. By leveraging Git and various language processing technologies, it provides an intuitive interface for tracking changes, generating comprehensive documentation, and ensuring seamless integration with version control workflows.

Chronicler can draft commit descriptions from the current repository status and release notes from the difference between two Git branches. It supports local Ollama models by default and OpenAI models when OPENAI_API_KEY is configured.

Getting Started

Prerequisites

  • Python 3.10 or higher
  • Git
  • uv

Installation

Install from PyPI:

uv tool install py-chronicler

Clone the repository:

git clone https://github.com/jasuca/chronicler.git
cd chronicler

Install the project and development tools with uv:

uv sync --group dev

Run the CLI from the project checkout:

uv run chronicler --help

requirements.txt is retained as a compatibility entry point for tools that still call pip install -r requirements.txt; project dependencies and release metadata live in pyproject.toml.

Usage

To use Chronicler, run the following command:

chronicler release [OPTIONS] LEFT_BRANCH RIGHT_BRANCH [PATH]
chronicler commit [OPTIONS] [PATH]

Options

  • commit Generate commit description
  • release Generate release notes
  • --llm [ollama|openai]: Select the language model provider.
  • --llm-model TEXT: Specify the provider model. The default is llama2.
  • --help: Display the help message.

Examples

Comparing two branches: chronicler release main develop /path/to/repo

Generate current repo commit: chronicler commit

Generate current repo commit using Ollama(mistral): chronicler commit --llm=ollama --llm-model=mistral .

Generate release notes with OpenAI:

OPENAI_API_KEY=... chronicler release v0.1.1 main . --llm=openai --llm-model=gpt-3.5-turbo-instruct

Development

Run tests:

uv run pytest

Run the CI lint checks locally:

uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

Build release artifacts:

uv run python -m build

If you already synced the dev environment and want to avoid creating an isolated build environment, use:

uv build --no-build-isolation

The package is published to PyPI as py-chronicler. The console command installed by the package is chronicler.

Contributing

We welcome contributions to the Chronicler project! If you have suggestions for improvements or want to contribute code, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_chronicler-0.1.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_chronicler-0.1.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file py_chronicler-0.1.2.tar.gz.

File metadata

  • Download URL: py_chronicler-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_chronicler-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8a045326d82fbeb95de87a44fbbfbc88b77393c801acc1df462a5b58d1b16e3b
MD5 2ead61312ddd2d5e9574a249c48f47a9
BLAKE2b-256 29884ca511bb9f0ec305411987186d77ffb419cce81f49de2a697aab709d30b8

See more details on using hashes here.

File details

Details for the file py_chronicler-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: py_chronicler-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_chronicler-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4098c883cfc8c1eb10bb4dc06e74a5ba48f6639912d225d0398503431085cd10
MD5 d199dbf81588df855849bbc2b628d41c
BLAKE2b-256 58c5574bc11e94cd1035f678df6c365401e445372884b08bee240a1a0f783b52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page