Skip to main content

A beautiful git changelog generator with semantic search capabilities

Project description

Itera

A beautiful git changelog generator with semantic search capabilities. Itera helps you generate detailed, well-formatted changelogs from your git repository and provides powerful semantic search functionality to find relevant commits.

Features

  • 🎨 Beautiful, rich-formatted changelogs
  • 🔍 Semantic search through commits using OpenAI embeddings
  • 📊 Detailed commit summaries with tags and change types
  • 📅 Date range filtering for changelogs
  • 🔎 Specific commit lookup
  • 📈 Commit history visualization
  • 🤖 AI-powered commit analysis

Installation

pip install itera

Usage

Basic Usage

from itera import Itera

# Initialize with default settings (uses OPENAI_KEY from environment)
changelog = Itera()

# Or initialize with explicit API key
changelog = Itera(openai_api_key="your-api-key")

# Generate changelog for last 30 commits
changes = changelog.generate_changelog(num_commits=30)

# Get latest changes
latest = changelog.get_latest_changes(num_commits=1)

CLI Commands and Options

Itera provides several CLI commands for different use cases:

Show All Commits

itera all [OPTIONS]

Options:
  -l, --limit INTEGER  Number of commits to show (default: 10)

Example:

# Show last 20 commits
itera all --limit 20

# Show last 10 commits (default)
itera all

Show Specific Commit

itera show [OPTIONS]

Options:
  -h, --hash TEXT  Specific commit hash to show changelog for (required)

Example:

# Show changelog for specific commit
itera show --hash abc123

# Using short option
itera show -h abc123

Show Commits in Date Range

itera range [OPTIONS]

Options:
  -s, --start TEXT  Start date (YYYY-MM-DD) [required]
  -e, --end TEXT    End date (YYYY-MM-DD) [required]

Example:

# Show commits between dates
itera range --start 2024-01-01 --end 2024-03-01

# Using short options
itera range -s 2024-01-01 -e 2024-03-01

Python API Parameters

Itera Class

Itera(
    repo_path: str = '.',              # Path to git repository
    storage_dir: Optional[str] = None, # Custom storage directory for changelogs
    openai_api_key: Optional[str] = None # OpenAI API key
)

Methods

# Generate changelog
generate_changelog(
    num_commits: int = 30,  # Number of commits to process
    use_cache: bool = True  # Whether to use cached results
) -> List[Dict[str, Any]]

# Get latest changes
get_latest_changes(
    num_commits: int = 1  # Number of most recent commits to process
) -> List[Dict[str, Any]]

Output Format

Each commit in the changelog contains:

{
    'commit_hash': str,        # First 8 characters of commit hash
    'author': str,            # Commit author
    'date': str,             # ISO format date (YYYY-MM-DD HH:MM:SS)
    'human_readable_date': str, # Friendly date format
    'message': str,          # Commit message
    'summary': {
        'summary': str,      # Detailed bullet-point summary
        'blurb': str,       # Brief overview
        'tags': List[str],  # Changed elements/files
        'changes_type': List[str]  # Types of changes (added/modified/deleted)
    }
}

Environment Variables

  • OPENAI_KEY: Your OpenAI API key (optional, can be passed directly to the Itera class)

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

MIT

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

itera-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

itera-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file itera-0.1.0.tar.gz.

File metadata

  • Download URL: itera-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for itera-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d292d78dc65ee0d943adcc863bc66818302e9851482b8d7719553f401ca9f87
MD5 3afb226c7a71e160164e9b7870ebd85b
BLAKE2b-256 6246c0b3d190f3efe55f42a6d01b9a293bf157a5453679ffd4c5b3bec27ac841

See more details on using hashes here.

File details

Details for the file itera-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: itera-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for itera-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef8f678be871ea97e1e7a003f7a66a563f9736c7e086e7425f7d5a8c7c8971ef
MD5 01019653f906eddeb99228384dd76f48
BLAKE2b-256 aa27404f742c2befa6c2feca5b4f300159b4180cba65264967fa5c7805fb0d05

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