Releases: magifd2/llm-cli
Releases · magifd2/llm-cli
v1.0.1
v1.0.0
v1.0.0 - 2025-08-12
✨ Features
- Config File Path Option: Introduced a global
--config(-c) flag to specify the path to the configuration file, overriding the default location. - Enhanced Profile Check Command with Configuration Validation: The
llm-cli profile checkcommand now performs provider-specific configuration validation.- Introduced a new
llm.ConfigValidatorinterface, implemented by each LLM provider. - Each provider's
ValidateConfig()method checks for essential settings (e.g.,model,api-key,aws-region,project-id,credentials-file) and their validity. - The
checkcommand now reports detailed validation errors, helping users identify and fix misconfigurations early.
- Introduced a new
♻️ Refactor
- Credential File Path Resolution: Implemented logic to resolve
credentials-filepaths relative to theconfig.jsonfile's location, and expanded~(tilde) to the user's home directory, ensuring correct path resolution regardless of the current working directory. - Provider Configuration Validation Interface: Defined
llm.ConfigValidatorinterface and implementedValidateConfig()method across all LLM providers (ollama,openai,openai2,bedrock,vertexai,vertexai2,mock) to centralize and standardize configuration validation logic.
v0.0.12
v0.0.12 - 2025-08-08
✨ Features
- Advanced OpenAI-Compatible Provider (
openai2): Introduced a newopenai2provider for OpenAI-compatible APIs (like LM Studio) that adds dynamic and flexible model resolution.- The
modelsetting can now be a comma-separated priority list (e.g.,"my-model,auto"). - The provider queries the server's
/v1/modelsendpoint and uses the first available model that matches an entry in the priority list, simplifying workflows by reducing the need for frequent profile edits.
- The
♻️ Refactor
- Provider Package Separation: Restructured the
internal/llmpackage by moving each provider into its own self-contained sub-package (e.g.,internal/llm/openai). This major refactoring enforces strict module independence, significantly improving maintainability and paving the way for robust unit testing.
v0.0.11
v0.0.11 - 2025-08-08
✨ Features
- Enhanced Vertex AI Provider (
vertexai2): Added a newvertexai2provider that offers a more robust workaround for the Vertex AI SDK's lack of native system prompt support. This provider primes the conversation by injecting the system prompt as the first turn in the chat history, leading to more consistent model behavior.
v0.0.10
v0.0.10 - 2025-08-05
⬆️ Dependency Updates
- Updated various Go modules to their latest versions for improved performance and security.
🗑️ Removed
- Zsh Completion Script Installation: Removed the automatic installation of the Zsh completion script during
make installdue to environment-specific issues. Users can still generate the script manually usingllm-cli completion zsh.
v0.0.9
v0.0.9 - 2025-08-03
✨ Features
- OpenAI API Key File Support: Added support for loading OpenAI API keys from a JSON file specified by
credentials-file.- The JSON file should contain the API key under the
openai_api_keyfield. credentials-filetakes precedence overapi_keydirectly set in the profile.
- The JSON file should contain the API key under the
- Enhanced Profile Check Command: The
llm-cli profile checkcommand now verifies the existence of credential files specified in profiles.- Displays warnings if a specified credential file does not exist or cannot be resolved.
🐛 Bug Fixes
- Correct Profile Check Logic: Fixed an issue in
llm-cli profile checkwhere it would unnecessarily prompt to update 'limits' settings even when they already matched standard default values.- The command now only prompts for updates if the 'limits' are at their zero value or meaningfully different from the standard defaults.
- Build Fix: Resolved unused import in
cmd/root.gothat causedgovulncheckerrors during build.
📝 Documentation
- Updated READMEs: Clarified
~(tilde) path notation and added usage examples for OpenAI API key file support inREADME.mdandREADME.ja.md.
♻️ Refactor
- Error Handling: Centralized error handling in
main.goandcmd/root.gofor consistent error processing and exit codes.
v0.0.8
v0.0.8 - 2025-08-03
✨ Features
- Profile Check Command: Added
llm-cli profile checkcommand to verify and migrate configuration profiles.- Checks all profiles for consistency, especially for newly introduced settings like 'limits'.
- Prompts the user to update profiles with default or unconfigured 'limits' settings to standard default values.
- Includes a
--confirmor-yflag for non-interactive operation. - Creates a timestamped backup of the
config.jsonfile in~/.config/llm-cli/backups/before saving any changes, ensuring data safety. - Enhanced the
profile showcommand to display 'limits' information.
🐛 Bug Fixes
- DoS Protection Enhancements: Addressed remaining issues related to DoS protection and UTF-8 safety.
- Modified
readAndProcessStreamto stop reading input once theMaxPromptSizeByteslimit is reached, even in "warn" mode, preventing large files from being fully loaded into memory. - Updated
truncateStringByBytesto be UTF-8 aware, ensuring that string truncation for size limiting does not corrupt multi-byte characters.
- Modified
- Configuration Loading Consistency: Ensured
Limitsstruct is always initialized with default values when loading configuration, even if not explicitly present in the config file. This guarantees consistent behavior across all profiles.
v0.0.7
v0.0.7 - 2025-08-03
✨ Features
- DoS Protection via Size Limits: Implemented configurable input and output size limits to prevent accidental resource exhaustion.
- Added a new
limitsobject to profiles inconfig.json. promptcommand now checks these limits, with configurable behavior (stoporwarn) on excess.addcommand supports setting limits for new profiles via flags (e.g.,--limits-max-prompt-size-bytes).setcommand can now configure limits using dot notation (e.g.,limits.on_input_exceeded).listcommand now displays the configured limits for each profile.
- Added a new
- Improve UX with Spinner: Added a spinner to the
promptcommand when not using--streammode to provide visual feedback during long-running operations. The spinner is only displayed in interactive terminals.
🐛 Bug Fixes
- CLI Behavior: Suppressed the automatic display of usage instructions on runtime errors (e.g., API failures) to provide cleaner error output.
♻️ Refactor
- Improve Testability of Profile Commands: Refactored
profilesubcommands (add,set,use,remove) to return errors instead of callingos.Exit, making them testable. The test suite was updated to execute commands directly and validate their behavior, improving test reliability.
v0.0.6
v0.0.6 - 2025-08-02
✨ Features
- Vulnerability Check Integration: Added
govulncheckto Makefile and integrated it into the build process to automatically scan for known vulnerabilities. - macOS Ad-hoc Signing: Implemented ad-hoc signing for macOS universal binaries in the Makefile to allow execution on machines other than the build machine.
🐛 Bug Fixes
- Build Fix: Corrected a syntax error in
cmd/list.gowhere theospackage import was missing quotes, resolving persistent "missing import path" build errors.
🔒 Security
- Enhanced Configuration File Permissions: Implemented more restrictive file permissions for
~/.config/llm-cli/config.json(changed from0644to0600) and its parent directory (changed from0755to0700) to enhance the security of sensitive information like API keys.
v0.0.5
v0.0.5 - 2025-08-02
✨ Features
- Google Cloud Vertex AI Provider Support: Added support for interacting with Google Cloud Vertex AI.
- Enhanced
profile addCommand: Theprofile addcommand now allows specifying parameters such as provider, model, endpoint, API key, AWS credentials, GCP Project ID, location, and credentials file path in a single command.
♻️ Refactor
- Vertex AI SDK Migration: Migrated to the latest
google.golang.org/genaiSDK, including fixes for service account authentication, correctClientobject usage, and proper streaming iterator handling. - Runtime Expansion of Credential File Paths: Changed the expansion of
credentials_filepaths to occur at runtime instead of at configuration time, providing greater flexibility in dynamic home directory environments.
📝 Documentation
- Updated Development Log: Added detailed history of Vertex AI SDK migration and current SDK status to
DEVELOPMENT_LOG.md. - Updated Related Documentation:
README.ja.mdandREADME.en.mdhave been updated to reflect the addition of the Vertex AI provider and the enhancedprofile addcommand usage, and system prompt handling approach. - Revised Provider Development Guide: Removed specific provider implementation details from
DEVELOPING_PROVIDERS.ja.mdandDEVELOPING_PROVIDERS.en.md. - Updated Changelogs:
CHANGELOG.ja.mdandCHANGELOG.en.mdhave been updated.
♻️ Refactor
- Code Audit and Quality Improvements: Performed a full code audit and fixed potential bugs and vulnerabilities. Hardened against command injection in
profile edit, centralized config path management, and improved error messages to enhance robustness and maintainability.