Commit Graph
95 Commits
Author SHA1 Message Date
sankalp cc94b53d48 chore(root): bump version to 0.2.4
- Updated version in `pyproject.toml` and `setup.py` to `0.2.4`
- Lockfile (`uv.lock`) updated to reflect dependency changes
V.0.2.4
2025-12-30 14:40:57 +05:45
sankalp b09de402cc feat(devgen): add max_groups config option 2025-12-25 09:36:05 +05:45
sankalp c121a7fa59 feat(devgen/modules): add interactive commit review and smart file grouping
- New Features:
  - Added `check` parameter to enable interactive commit message review
  - Implemented user confirmation/editing/abort workflow using questionary
  - Added smart file grouping with configurable max_groups limit
  - Files are now merged into parent directories when group count exceeds limit

- Enhancements:
  - Improved `group_files()` method with hierarchical merging logic
  - Added graceful KeyboardInterrupt handling during user review
  - Enhanced logging for group merging operations
```
2025-12-25 09:35:33 +05:45
sankalp 525aebadf4 feat(devgen/modules): enhance commit generation with manifest context and custom templates
- New Features:
  - Added `_get_manifest_context()` to extract project metadata from manifest files (pyproject.toml, package.json, etc.) for richer commit message context.
  - Added support for custom commit message templates via `custom_template` config.
  - Added emoji instruction toggle based on global `use_emoji` setting.

- Enhancements:
  - Improved error handling for git push failures with specific hints for "no upstream branch" scenarios.
  - Optimized manifest context extraction by truncating large files to avoid token bloat.
  - Refactored prompt generation to dynamically include manifest context and custom templates.
```
2025-12-25 00:04:54 +05:45
sankalp 1219c1ad81 feat(devgen/templates/commit): add context to commit message template
- New Features:
  - Added `{{ context }}` variable to the commit message template to provide additional context.
- Enhancements:
  - Removed the emoji usage line from the template to simplify the output.
```
2025-12-25 00:04:50 +05:45
sankalp cfa891dcde feat(devgen/cli): add config info command and improve undo commit message formatting 2025-12-25 00:04:48 +05:45
sankalp 286c46d2b5 feat(root): enhance commit generation with context-aware features
- Add shell completion support for bash/zsh/fish via `devgen --install-completion`
- Introduce `devgen commit undo` to revert the last AI-generated commit while preserving staged changes
- Implement context-aware commit generation by analyzing project manifests (`package.json`, `pyproject.toml`, etc.) and lock files for accurate dependency updates
- Add support for custom Jinja2 templates in `~/.devgen.yaml` with `custom_template` configuration
- Update documentation to reflect new features and provide template variable reference

This release significantly improves commit accuracy by leveraging project context and offers greater customization through templates and shell integration.
```
2025-12-25 00:04:44 +05:45
sankalp f2ff3327c3 feat(devgen): add custom template rendering function
- New Features:
  - Introduced `render_custom_template()` function to render Jinja2 templates from strings.
  - Enables dynamic template rendering without requiring file-based templates.
```
2025-12-25 00:04:40 +05:45
sankalp 37e5d94373 feat(devgen): enhance sanitize_ai_commit_message to handle bolding and labels
- Improve header detection by stripping bolding and cleaning labels like "1. Title:", "### Message:", etc.
- Stop processing lines when encountering a sponsor section
```
2025-12-24 23:49:37 +05:45
sankalp 40c9b3ca57 refactor(devgen/templates/commit): update commit message template guidelines
- Simplify and clarify the structure of commit message generation guidelines.
- Replace "Format" with "Guidelines" for better readability.
- Remove redundant section numbering.
- Streamline emoji usage instruction into a single line.
- Clarify that the output should exclude labels like "Title:" or "Format:".

**Enhancements:**
- Improved template structure for better maintainability.
- More concise and direct instructions for users.
2025-12-24 23:49:34 +05:45
sankalp 4d309c313d 1. Title: feat(root): add TODO.md for project roadmap and tasks 2025-12-24 23:44:23 +05:45
sankalp ba747c727c feat(devgen): improve sanitize_ai_commit_message function
The `sanitize_ai_commit_message` function in `devgen/utils.py` has been enhanced for better readability and maintainability. The changes include minor formatting improvements and a more consistent regex pattern definition.

**Enhancements & Refinements:**
- Improved code formatting by removing trailing whitespace and adding a comma after `re.IGNORECASE` in the regex pattern for better readability.
- Enhanced comment clarity by fixing a minor typo in the regex examples section.
```
2025-12-24 23:34:35 +05:45
sankalp 3635887a85 feat(devgen/modules): enhance changelog and license generation with improved file handling
This update introduces improvements to the changelog generator's file handling logic, including proper prepending of new entries and automatic header management. It also refines the license generator's template directory structure and cleans up minor formatting issues in the commit generator.

**New Features**
- Added intelligent changelog prepending logic that preserves existing headers and maintains proper formatting when updating files
- Implemented automatic `# CHANGELOG` header insertion for new changelog files

**Enhancements & Refinements**
- Changed changelog version headers from `#` to `##` for better markdown hierarchy
- Updated license generator to use `templates/licenses` directory instead of `prompt_templates/licenses`
- Removed unnecessary whitespace and improved code formatting in commit generator
- Enhanced changelog file writing logic to handle both new and existing files more robustly
```
2025-12-24 23:34:32 +05:45
sankalp a7507255c7 feat(root): update devgen-cli to version 0.2.3
The dependency `devgen-cli` has been upgraded from version 0.2.2 to 0.2.3 in the project's lockfile.

- **Enhancements & Refinements**
  - Updated `devgen-cli` dependency to version 0.2.3 in `uv.lock`
```
2025-12-24 23:29:47 +05:45
sankalp d373f95388 refactor(devgen): enhance AI commit message sanitization
The `sanitize_ai_commit_message` function has been significantly improved to better handle AI-generated commit messages, including support for bolded headers, more robust header detection, and a fallback mechanism for non-conventional messages.

**Enhancements & Refinements:**
- Added comprehensive docstring explaining the function's purpose and behavior
- Improved regex pattern to match conventional commit headers with optional bolding (e.g., **feat: ...**)
- Added case-insensitive matching for commit types
- Implemented a state-based approach with `found_header` flag for clearer logic
- Added automatic removal of bold markers (**) from headers
- Introduced fallback behavior to return the first non-empty line if no conventional header is found
- Improved code structure with better variable naming and comments
- Added early return for empty input strings

**Bug Fixes:**
- Fixed potential issue where the function could return empty strings for non-conventional messages
- Resolved edge case handling for messages without proper headers
```
2025-12-24 23:29:45 +05:45
sankalp fe7da77ed6 chore(root): Bump version to 0.2.3 V.0.2.3 2025-12-14 07:58:09 +05:45
sankalp 407458149b fix: remove invalid debug argument from OpenAI and OpenRouter providers
The debug argument is used internally by devgen but is not accepted by the OpenAI API client. This change filters it out from kwargs before the API call to prevent TypeError.
2025-12-14 07:57:16 +05:45
sankalp e9a45cf140 chore(root): Bump version to 0.2.2
This commit updates the project's version from 0.2.1 to 0.2.2 across the `pyproject.toml`, `setup.py`, and `uv.lock` files.
V.0.2.2
2025-12-14 00:55:19 +05:45
sankalp 70e150611b refactor(docs): Overhaul README for improved clarity and quick start
The `README.md` has undergone a significant rewrite and restructuring to enhance readability, streamline the onboarding process, and better communicate the value proposition of DevGen. This includes a new introduction, a consolidated "Why DevGen?" section, simplified quick start guides, and a dedicated feature deep dive.

*   **Enhancements & Refinements**
    *   **Improved Introduction**: Added a concise tagline and refined the introductory paragraph, positioning DevGen as an AI co-pilot for Git and project management.
    *   **Streamlined Feature Presentation**: Replaced the previous feature list with a "Why DevGen?" section, highlighting key benefits such as AI Brain (multi-provider support), battle-tested compliance (Conventional Commits, Semantic Versioning), lightning-fast performance, and zero-friction setup.
    *   **Simplified Quick Start**: Refined the initial setup and commit generation steps for a quicker onboarding experience.
    *   **Enhanced Feature Deep Dive**: Introduced a dedicated section to provide detailed usage examples for AI-powered commits, changelogs, release notes, gitignore, and license generation.
    *   **Improved Installation Instructions**: Emphasized `pipx` and `uv` as recommended installation methods for isolated and fast CLI management.
    *   **Concise Configuration Table**: Replaced verbose configuration details with a clear markdown table for easier reference.
    *   **Updated PyPI Link**: Corrected the PyPI link to `devgen-cli`.
    *   **Minor Visual Updates**: Refined badge presentation and added a centered footer with author attribution.

*   **Refactoring**
    *   **Major Content Restructuring**: Completely reordered and rewrote large sections, removing redundant information and consolidating related content to improve overall flow and conciseness.
    *   **Removed Command Reference**: Integrated command examples directly into relevant usage sections, eliminating a separate, lengthy command reference.
    *   **Removed Redundant Sections**: Consolidated information previously found in "Use Cases" and "Requirements" into other sections, streamlining the document.
2025-12-13 22:26:20 +05:45
sankalp f85da0461f feat(dry-run): Display dry run messages on console
**Enhancements & Refinements**
* Dry run commit messages are now displayed directly on the console during execution.
* Utilizes rich `Panel` and `Markdown` to provide a structured and readable console output for dry run messages.
* Offers immediate visual feedback for generated commits when performing a dry run.
2025-12-13 21:42:33 +05:45
sankalp 7c15e2183b refactor(docs): Overhaul README for improved clarity and quick start
The `README.md` has undergone a significant rewrite and restructuring to enhance readability, streamline the onboarding process, and better communicate the value proposition of DevGen. This includes a new introduction, a consolidated "Why DevGen?" section, simplified quick start guides, and a dedicated feature deep dive.

*   **Enhancements & Refinements**
    *   **Improved Introduction**: Added a concise tagline and refined the introductory paragraph, positioning DevGen as an AI co-pilot for Git and project management.
    *   **Streamlined Feature Presentation**: Replaced the previous feature list with a "Why DevGen?" section, highlighting key benefits such as AI Brain (multi-provider support), battle-tested compliance (Conventional Commits, Semantic Versioning), lightning-fast performance, and zero-friction setup.
    *   **Simplified Quick Start**: Refined the initial setup and commit generation steps for a quicker onboarding experience.
    *   **Enhanced Feature Deep Dive**: Introduced a dedicated section to provide detailed usage examples for AI-powered commits, changelogs, release notes, gitignore, and license generation.
    *   **Improved Installation Instructions**: Emphasized `pipx` and `uv` as recommended installation methods for isolated and fast CLI management.
    *   **Concise Configuration Table**: Replaced verbose configuration details with a clear markdown table for easier reference.
    *   **Updated PyPI Link**: Corrected the PyPI link to `devgen-cli`.
    *   **Minor Visual Updates**: Refined badge presentation and added a centered footer with author attribution.

*   **Refactoring**
    *   **Major Content Restructuring**: Completely reordered and rewrote large sections, removing redundant information and consolidating related content to improve overall flow and conciseness.
    *   **Removed Command Reference**: Integrated command examples directly into relevant usage sections, eliminating a separate, lengthy command reference.
    *   **Removed Redundant Sections**: Consolidated information previously found in "Use Cases" and "Requirements" into other sections, streamlining the document.
2025-12-13 21:42:33 +05:45
sankalp a2f3657269 feat(git): Introduce a robust utility for running git commands
This commit introduces a new `run_git_command` utility function within `devgen.utils` to centralize and standardize the execution of Git commands. This improves code reusability and error handling for Git-related operations.

*   **New Features**
    *   Add `run_git_command` to `devgen/utils.py` to provide a standardized, robust way to execute Git commands, capture output, and handle errors.
    *   Expose `run_git_command` in `__all__` for public use.
*   **Enhancements & Refinements**
    *   Refactor `get_git_staged_files` to utilize the new `run_git_command` utility, reducing code duplication and improving consistency.
2025-12-13 21:19:18 +05:45
sankalp c50f8a4b89 refactor(modules): Standardize git command execution
This commit refactors the way git commands are executed across the `changelog_generator` and `commit_generator` modules, leveraging a shared utility function and enhancing error handling.

*   **Enhancements & Refinements**
    *   Replaced the internal `_exec_git` method in both `ChangelogGenerator` and `CommitEngine` with the common `run_git_command` utility from `devgen.utils`.
    *   Standardized and improved error handling for git command failures by wrapping `run_git_command` calls in `try-except subprocess.CalledProcessError` blocks, providing more precise logging and raising `CommitEngineError` where applicable.
    *   Adjusted error handling for `git reset HEAD` operations to gracefully ignore potential failures, ensuring smoother execution for non-critical resets.
    *   Refined the `is_ahead_of_remote` check in `CommitEngine` to correctly handle scenarios with no upstream configured by using `check=False` for `run_git_command` and broadening error catch.
2025-12-13 21:19:18 +05:45
sankalp a488d5e4ac fix(root): Update PyPI information and correct documentation links
This commit clarifies the project's name on PyPI and ensures all external links in the README are accurate.

*   **Enhancements & Refinements**
    *   Added a note to the README clarifying the project's name on PyPI as `devgen-cli`.
    *   Refined the project description for improved readability by adjusting punctuation.
*   **Bug Fixes**
    *   Corrected the repository case in the license badge URL.
    *   Updated the PyPI project URL to `https://pypi.org/project/devgen0cli` for accuracy.
2025-12-13 21:19:18 +05:45
sankalp 48836797b9 build(packaging): Remove .egg-info build artifacts
This commit removes the entire `devgen_cli.egg-info` directory and its contents from the repository. This cleanup is part of streamlining the project's packaging and build process, as `.egg-info` directories typically contain transient metadata generated during package installation or building, and are generally not intended to be version controlled.

*   **Enhancements & Refinements**
    *   Deleted the `devgen_cli.egg-info` directory, which contained build-time metadata.
    *   Removed `PKG-INFO`, `SOURCES.txt`, `dependency_links.txt`, `entry_points.txt`, `requires.txt`, and `top_level.txt`.
    *   Improved project hygiene by no longer tracking generated packaging metadata in version control.
    *   Streamlined project build artifacts, potentially reflecting a modernization of the packaging setup.
2025-12-12 19:11:51 +05:45
sankalp 09151decad feat(root): Prepare for new devgen_cli component
*   **New Features**
    *   Add `devgen_cli.egg-info/` to `.gitignore` to exclude build artifacts for the new `devgen_cli` component from version control.
2025-12-12 19:11:43 +05:45
sankalp 24dc7f57b4 build(packaging): Remove custom dependency link declarations
This commit updates the package metadata by removing declarations of custom dependency links and applies a minor file formatting correction.

*   **Enhancements & Refinements**
    *   Removed all declarations from `devgen_cli.egg-info/dependency_links.txt`, simplifying the package's metadata and indicating that no custom dependency links are used.
    *   Corrected the file format of `devgen_cli.egg-info/SOURCES.txt` by adding a missing newline at the end of the file, improving file integrity.
2025-12-12 19:09:24 +05:45
sankalp 449a955d15 refactor(commit_generator): Improve code readability and styling
Minor code cleanup to enhance readability and adhere to styling conventions.

*   **Enhancements & Refinements**:
    *   Wrapped long lines for better readability in logger configuration, console theme definition, commit message panel printing, and dry run output.
    *   Removed an unnecessary f-string from the commit generation status message.
2025-12-12 19:07:55 +05:45
sankalp 87ed8bf878 docs(root): Update PyPI badge URL
**Enhancements & Refinements**
*   Corrected the PyPI badge URL in `README.md` from `devgen` to `devgen-cli` to reflect the accurate package name.
2025-12-12 19:04:42 +05:45
sankalp 6e4b177fe3 feat(commit-engine): Enhance console output with rich library
The commit engine now leverages the `rich` library to provide a more visually appealing and informative console experience during various stages of the commit generation and execution process.

*   **New Features**
    *   Integrate the `rich` library for enhanced and structured console output.
    *   Introduce a custom `rich` theme for consistent styling of info, warning, and danger messages.

*   **Enhancements & Refinements**
    *   Display visual feedback with `rich` status spinners during AI message generation and remote push operations.
    *   Present generated commit messages in a formatted `rich` Panel with Markdown rendering for improved readability.
    *   Provide clearer, color-coded `rich` console messages for staging files, dry run completion, overall process completion, and identifying failed groups.
    *   Propagate the `debug` flag to the logger to control console output during debugging sessions, aligning logger and console behavior.
2025-12-12 18:57:46 +05:45
sankalp 8db30f14bc fix(devgen-cli): Update devgen-cli to v0.2.1
- **Bug Fixes**
    - `devgen-cli`: Updated the internal CLI tool to version `0.2.1`, addressing minor issues or improving stability.
2025-12-12 18:56:37 +05:45
sankalp d502849daf feat(commit-engine): Enhance console output with rich library
The commit engine now leverages the `rich` library to provide a more visually appealing and informative console experience during various stages of the commit generation and execution process.

*   **New Features**
    *   Integrate the `rich` library for enhanced and structured console output.
    *   Introduce a custom `rich` theme for consistent styling of info, warning, and danger messages.

*   **Enhancements & Refinements**
    *   Display visual feedback with `rich` status spinners during AI message generation and remote push operations.
    *   Present generated commit messages in a formatted `rich` Panel with Markdown rendering for improved readability.
    *   Provide clearer, color-coded `rich` console messages for staging files, dry run completion, overall process completion, and identifying failed groups.
    *   Propagate the `debug` flag to the logger to control console output during debugging sessions, aligning logger and console behavior.
2025-12-12 18:56:26 +05:45
sankalp f3c68aaf29 ci(.github/workflows): Update GitHub Actions and Python version
This update refines the `publish.yml` workflow by bumping the versions of several GitHub Actions and adjusting the Python version used for publishing.

*   **Enhancements & Refinements**
    *   Updated `actions/checkout` from v4 to v6.
    *   Updated `actions/setup-python` from v4 to v6.
    *   Changed the target Python version for the workflow from 3.12 to 3.10.
2025-12-12 18:56:25 +05:45
sankalp 7f6b247b40 feat(cli): Introduce AI-powered developer toolkit
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.
2025-12-12 18:56:25 +05:45
sankalp 6e7525241d bumped new version with fixes V.0.2.1 2025-12-12 18:46:48 +05:45
sankalp b7faa9e17c update 2025-12-12 12:23:54 +05:45
sankalp 97a0b34f9c change package name to devgen-cli for pypi compatiable 2025-12-12 12:22:39 +05:45
sankalp b975ffc5e3 change package name to devgen-cli for pypi compatiable 2025-12-12 12:22:30 +05:45
sankalp 98eeaf7e8f bump to new version V.0.2.0 2025-12-12 12:15:19 +05:45
sankalp 7e7b5d4396 Merge pull request #1 from S4NKALP/rewrite
Rewrite Version
2025-12-12 12:13:20 +05:45
sankalp c76eae9178 update 2025-12-12 12:12:27 +05:45
sankalp 9e93b496f1 update 2025-12-12 12:10:01 +05:45
sankalp 6aede08b0d update 2025-12-12 12:06:36 +05:45
sankalp bef83a2fba update 2025-12-12 11:31:27 +05:45
sankalp 8f0e09d1d5 updates 2025-12-12 11:11:34 +05:45
sankalp dec9c15b7a updates 2025-12-12 11:10:30 +05:45
sankalp b5362ade00 chore: add workflow to publish package to PyPI on release 2025-11-28 02:01:09 +05:45
sankalp 2e563fd8bb chore(release): update node version to v20 for release workflow 2025-08-25 16:34:38 +05:45
sankalp c483de6eea feat(release): add workflow to automatically publish package on release creation V.0.1.1 2025-08-25 16:31:21 +05:45
sankalp 753bd00472 chore(release): update release workflow to trigger on tag creation 2025-08-25 16:26:27 +05:45