Release v0.2.1 of DevGen CLI, a comprehensive toolkit automating common Git and project management tasks through AI. This initial packaging defines the project's metadata and a wide array of developer-centric features.
* **New Features**
* **AI-Powered Commit Messages:** Automatically generate semantic commit messages based on staged changes, adhering to Conventional Commits format.
* **Changelog Generation:** Create detailed changelogs from Git history, with categories for BREAKING CHANGES, Features, Bug Fixes, Documentation, and Other Changes.
* **Release Note Generation:** Produce structured release notes from Git history, ready for publication.
* **Gitignore File Generation:** Generate `.gitignore` files by selecting from GitHub's official templates, supporting interactive selection, multiple templates, and offline mode.
* **License File Generation:** Interactively generate various open-source license files (e.g., MIT, Apache-2.0, GPL-3.0), customizable with author name and year.
* **Multi-Provider AI Support:** Seamless integration with leading AI providers including Gemini, OpenAI, Anthropic, HuggingFace, and OpenRouter.
* **Enhancements & Refinements**
* **Unified CLI:** Provides a single command-line interface for all development automation tools.
* **Interactive Configuration:** Simple setup process for AI providers, models, and API keys via `devgen setup config`, stored persistently in `~/.devgen.yaml`.
* **Flexible Commit Workflow:** Offers options for dry runs, direct commits, automatic pushes, and force rebuilding of AI-generated commit messages.
* **Commit Caching:** Includes commands to list and clear cached commit messages for improved workflow.
* **Detailed Command Reference:** Comprehensive documentation for all `devgen` commands and their specific options.
* **Project Metadata:** Updated `PKG-INFO` with project summary, homepage, author details, license, keywords, classifiers, and Python requirements.
* **Dependency Management:** Specifies required Python packages including `anthropic`, `google-generativeai`, `openai`, `typer`, and `rich`.
* **Python 3.10+ Compatibility:** Ensures support for modern Python environments.
25 lines
802 B
Python
25 lines
802 B
Python
def get_provider(name):
|
|
name_lower = name.lower()
|
|
if name_lower == "gemini":
|
|
from devgen.providers.gemini import GeminiProvider
|
|
|
|
return GeminiProvider()
|
|
elif name_lower == "openai":
|
|
from devgen.providers.openai import OpenaiProvider
|
|
|
|
return OpenaiProvider()
|
|
elif name_lower == "huggingface":
|
|
from devgen.providers.huggingface import HuggingfaceProvider
|
|
|
|
return HuggingfaceProvider()
|
|
elif name_lower == "openrouter":
|
|
from devgen.providers.openrouter import OpenrouterProvider
|
|
|
|
return OpenrouterProvider()
|
|
elif name_lower == "anthropic":
|
|
from devgen.providers.anthropic import AnthropicProvider
|
|
|
|
return AnthropicProvider()
|
|
|
|
raise NotImplementedError(f"Provider '{name}' is not implemented yet.")
|