Open
Description
Enhance the version
and self-update
commands to display release notes for versions between the current installed version and the latest available version, helping users make informed decisions about updates.
Detailed Requirements
-
Version Command Enhancement
- When checking for updates (
--check-updates
or-c
), if a new version is available, display the release notes for all versions between the current and latest. - Add a new option to show only release notes without checking for updates.
- When checking for updates (
-
Self-Update Command Enhancement
- Before confirming an update, show the release notes to inform the user about the changes.
- Provide a clear, formatted display of all release notes from the current version to the latest version.
-
Release Notes Handling
- Fetch release notes from GitHub API for each relevant version.
- Format the notes in a readable way, preserving markdown formatting if possible.
- Handle cases where release notes might not be available.
- Implement caching to avoid redundant API calls.
-
UI/UX Considerations
- Use consistent styling for release notes display.
- Provide an option to view full or summarized release notes.
- Add clear visual separation between versions.
Example Output for Commands
Here are examples of how the enhanced commands would look with release notes:
1. Version Command with Release Notes (ctx version -c
)
+-------------------------+
| Context Generator |
+-------------------------+
Current version: 1.3.0
[SECTION]
Checking for updates...
[OK] A new version is available: 1.5.0
Release notes for new versions:
╔═══════════════════════════════════════════════╗
║ Version 1.5.0 (Released March 12, 2025) ║
╚═══════════════════════════════════════════════╝
• Added new ComposerSource type for including dependencies
• Enhanced PHP-Docs modifier with improved route extraction
• Fixed issue with URL source and non-standard HTML content
• Performance improvement for large Git repositories
╔═══════════════════════════════════════════════╗
║ Version 1.4.0 (Released February 18, 2025) ║
╚═══════════════════════════════════════════════╝
• Added environment variable support for all source types
• Improved error handling for GitHub API rate limiting
• New sanitizer modifier option for handling sensitive data
• Fixed UTF-8 encoding issues in markdown output
You can update by running:
ctx self-update
Or with these alternative methods:
- curl -sSL https://raw.githubusercontent.com/butschster/context-generator/main/download-latest.sh | sh
- Download from: https://github.com/butschster/context-generator/releases/download/1.5.0/context-generator.phar
2. Version Command with Only Release Notes (ctx version --notes
)
+-------------------------+
| Context Generator |
+-------------------------+
Current version: 1.3.0
[SECTION]
Release notes for available versions:
╔═══════════════════════════════════════════════╗
║ Version 1.5.0 (Released March 12, 2025) ║
╚═══════════════════════════════════════════════╝
• Added new ComposerSource type for including dependencies
• Enhanced PHP-Docs modifier with improved route extraction
• Fixed issue with URL source and non-standard HTML content
• Performance improvement for large Git repositories
╔═══════════════════════════════════════════════╗
║ Version 1.4.0 (Released February 18, 2025) ║
╚═══════════════════════════════════════════════╝
• Added environment variable support for all source types
• Improved error handling for GitHub API rate limiting
• New sanitizer modifier option for handling sensitive data
• Fixed UTF-8 encoding issues in markdown output
╔═══════════════════════════════════════════════╗
║ Version 1.3.0 (Your current version) ║
╚═══════════════════════════════════════════════╝
• Added Git Diff Source for reviewing recent changes
• New tree view visualization for file sources
• Improved JSON schema for better IDE integration
• Fixed multiple path handling in GitHub source
3. Self-Update Command with Release Notes (ctx self-update
)
+-------------------------+
| Context Generator Self Update |
+-------------------------+
Current version: 1.3.0
[SECTION]
Checking for updates...
[OK] A new version is available: 1.5.0
Release notes for new versions:
╔═══════════════════════════════════════════════╗
║ Version 1.5.0 (Released March 12, 2025) ║
╚═══════════════════════════════════════════════╝
• Added new ComposerSource type for including dependencies
• Enhanced PHP-Docs modifier with improved route extraction
• Fixed issue with URL source and non-standard HTML content
• Performance improvement for large Git repositories
╔═══════════════════════════════════════════════╗
║ Version 1.4.0 (Released February 18, 2025) ║
╚═══════════════════════════════════════════════╝
• Added environment variable support for all source types
• Improved error handling for GitHub API rate limiting
• New sanitizer modifier option for handling sensitive data
• Fixed UTF-8 encoding issues in markdown output
Do you want to update now? (yes/no) [yes]:
[SECTION]
Downloading the latest version...
Requesting from: https://github.com/butschster/context-generator/releases/download/1.5.0/ctx.phar
Downloaded new version to temporary file: /tmp/context-generator-6073b29e1d234.phar
[SECTION]
Installing the update...
Replacing current PHAR at: /usr/local/bin/ctx
Successfully replaced the PHAR file
[OK] Successfully updated to version 1.5.0
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog