Skip to main content
Keeping a CHANGELOG.md up to date is crucial, but it can be a tedious task. This recipe will show you how to use ChatCLI’s @git command to analyze your recent changes and generate a release notes proposal in seconds.

The Problem

After completing a series of commits for a new version, you need to summarize what was done. The manual process usually involves:
  1. Running git log --oneline to see the commits.
  2. Analyzing each commit message.
  3. Grouping changes by type (New Features, Bug Fixes, etc.).
  4. Writing a summary in Markdown.
Let’s automate this.

Ingredients

For this recipe, you will need:
  • To be in the root folder of a Git repository.
  • To have some committed changes since the last tag/version.

Step by Step

1

Start ChatCLI and Use the @git Command

The @git command automatically collects crucial information from your repository: the current branch, file status, diffs, and most importantly, recent commits.Let’s combine this with a clear prompt, instructing the AI on the format we want.
@git > Analyze the commits and code changes and generate a release notes proposal for version v1.2.0. Group the changes into sections such as "New Features", "Bug Fixes", and "Internal Improvements". Use Markdown format.
Deconstructing the Prompt:
  • @git >: The command injects all Git context. The > operator separates the context from our instruction.
  • “Analyze the commits and changes…”: We ask the AI to not only read the commit messages but also correlate them with the code diffs provided.
  • “generate a release notes proposal…”: We make the final goal clear.
  • “Group the changes into sections…”: We give the AI a clear structure to follow, ensuring a consistent result.
2

Analyze and Refine the AI Response

ChatCLI will send the context to the AI, which will process the information and return a formatted response.Example AI Response:
Sure! Based on the commits and code changes, here is a release notes proposal for **v1.2.0**.

---

### Release Notes - v1.2.0

This release introduces the powerful persistent context management system and improves Agent Mode performance.

#### New Features

-   **Persistent Context Management (`/context`)**: It is now possible to create, save, attach, and manage project "snapshots" for reuse across different sessions. This includes the `create`, `attach`, `list`, and `delete` subcommands.
-   **Smart File Mode (`@file --mode=smart`)**: A new mode that allows the AI to select the most relevant files for the user's question, ideal for large codebases.

#### Bug Fixes

-   Fixed a bug in Agent Mode where the `p` key to toggle the view did not work correctly on Windows.
-   Resolved a concurrency issue that could cause a panic when canceling a request (`Ctrl+C`) during file processing.

#### Internal Improvements

-   Optimized file processing in the `@file` command, resulting in up to 30% faster reading in directories with many small files.
-   Refactored `LLMManager` to allow more flexible configuration of retry policies (attempts and backoff).

---
3

Use the Result

Now you have a high-quality draft for your release notes. Simply copy the text, paste it into your CHANGELOG.md or your GitHub release description, make any fine-tuning adjustments you see fit, and you are done!
You turned a 15-minute task into a single 15-second command.

Next Steps