1.1.0 • Published 4 months ago

airelease v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

airelease - AI-Powered Release Message Generator

Inspired by aicommits, airelease helps automate the generation of release messages based on commit titles between release versions.

How to Use

1. Installation

To install airelease, run:

npm i -g airelease@latest

2. Retrieve API Key

Get your API key from one of the following providers:

3. Set API Key

Configure the API key for your chosen provider by running:

# For OpenAI
airelease config set OPENAI_KEY=<your-openai-api-key>

# For Anthropic
airelease config set ANTHROPIC_API_KEY=<your-anthropic-api-key>
airelease config set api_provider=anthropic

This will create a .airelease file in your home directory.

Note: By default, OpenAI is used as the API provider. You can switch between providers using the api_provider setting.

4. Configure Editor (Optional)

Set your preferred editor for editing release messages:

# Direct selection
airelease config set editor=vim

The tool will automatically detect installed editors on your system and provide recommendations.

5. Upgrading

To check the installed version:

airelease --version

If it's not the latest version, update with:

npm update -g airelease

Usage

airelease <major|minor|patch> -t <target-tag> -a <api-provider>

Description

  • Target Version: Specify the release version type (major, minor, or patch) to generate the release message.

  • Target Tag (-t): Specify the previous tag version to generate the release message. If omitted, the tool uses the latest previous tag.

  • API Provider (-a): Specify the API provider to use ("openai" or "anthropic"). If omitted, the configured default is used.

Interactive Options

After generating a release message, you'll have three options:

  1. Just commit - Proceed with the AI-generated message
  2. Edit message - Open the message in your configured editor
  3. Cancel release - Abort the release process

How It Works

This CLI tool uses git log to gather all commit logs filtered by the specified release version. It then sends the collected logs to the chosen AI provider (OpenAI or Anthropic), which generates an AI-powered release note.

When editing messages, the tool opens your configured text editor (or system default) with full multiline support, allowing you to format your release notes with proper spacing and structure.

Configurable Options

OptionDescriptionDefaultCommand
api_providerAI provider to useopenaiairelease config set api_provider=<provider>
OPENAI_KEYYour OpenAI API keyairelease config set OPENAI_KEY=<key>
ANTHROPIC_API_KEYYour Anthropic API keyairelease config set ANTHROPIC_API_KEY=<key>
modelAI model to useProvider-specificairelease config set model=<model>
localeLanguage for generated messagesenairelease config set locale=<locale>
editorText editor for message editingPlatform defaultairelease config set editor=<editor>
timeoutAPI timeout in milliseconds10000airelease config set timeout=<ms>

Models

OpenAI Models

  • gpt-3.5-turbo (default)
  • gpt-4
  • gpt-4-turbo
  • gpt-4o

Anthropic Models

  • claude-3-opus-latest
  • claude-3-5-haiku-latest (default)
  • claude-3-7-sonnet-latest

Contributing

If you'd like to contribute to airelease, here's how to set up your development environment:

  1. Clone the repository:

    git clone https://github.com/Coldsewoo/airelease.git
    cd airelease
  2. Install dependencies:

    npm install
  3. Make your changes and test locally:

    npm run build
    ./dist/cli.mjs <command>

Maintainers

1.1.0

4 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.11

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago