Skip to content

nathanielheitsch/chlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chlog

Buy Me A Coffee

Overview

chlog is a powerful and flexible CLI (Command-Line Interface) application written in Python, designed to leverage AI in generating meaningful changelogs between two git commits. It's a must-have tool for developers who want to automate their changelog generation process.

Table of Contents

  1. Requirements
  2. Installation
  3. Usage
  4. Contributing
  5. License

Requirements

  • Python 3.7 or later
  • Git installed in your system

Installation

From Source Code

  1. Clone the repository:
    git clone https://github.com/nathanielheitsch/chlog.git
  2. Navigate into the cloned repository:
    cd chlog
  3. Install the requirements:
    pip install -r requirements.txt
  4. Run the script:
    python main.py

Usage

chlog requires two parameters:

  1. new_commit (optional): The latest commit hash. By default, it is set to None.
  2. old_commit (optional): The previous commit hash. By default, it is set to None.

Optional Flags:

  1. --token (optional): API Token for AI Services [default: None]
  2. --title (optional): Title of the changelog [default: None]

Basic usage:

python main.py [NEW_COMMIT] [OLD_COMMIT]

Using an API Token:

If you wish to use an API token for AI services, you can do so with the --token option:

python main.py --token YOUR_API_TOKEN [NEW_COMMIT] [OLD_COMMIT]

API Token Storage

While the --token option is available for single uses, chlog also supports persistently storing your API token as an environment variable for repeated use. Here's how you can set it up:

Unix/Linux/MacOS

Open your terminal, and add the following to your ~/.bashrc, ~/.bash_profile, or ~/.zshrc file:

export CHLOG_API_KEY="your-api-token"

Then, source the file:

source ~/.bashrc

Or, replace ~/.bashrc with whichever file you appended the export line to.

Windows

In Powershell, you can set an environment variable like this:

$env:CHLOG_API_KEY="your-api-token"

Remember to replace "your-api-token" with your actual API token.

For permanently setting the environment variable on Windows, follow these steps:

  1. Right-click on Computer.
  2. Click on 'Properties'.
  3. Click on 'Advanced system settings'.
  4. In the System Properties window, click on the 'Environment Variables' button.
  5. Click on the 'New' button under the 'User variables' or 'System variables' section (depending on your needs), and enter CHLOG_API_KEY as the variable name and your actual API token as the variable value.

Now, whenever you use chlog, it will automatically read your API token from the environment variable CHLOG_API_KEY. This eliminates the need to input your API token each time you use the tool.

Help:

If you need more information, use the --help option:

python main.py --help

This will provide you with the necessary information on how to use the application.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages