Skip to content

Releases: magifd2/llm-cli

v1.0.1

20 Aug 09:40

Choose a tag to compare

v1.0.1 - 2025-08-20

🐛 Bug Fixes

  • Streaming Response Panic: Fixed a "panic: close of closed channel" error that occurred when using the --stream option. Ensured responseChan is closed only once using sync.Once.

v1.0.0

12 Aug 13:42

Choose a tag to compare

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 check command now performs provider-specific configuration validation.
    • Introduced a new llm.ConfigValidator interface, 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 check command now reports detailed validation errors, helping users identify and fix misconfigurations early.

♻️ Refactor

  • Credential File Path Resolution: Implemented logic to resolve credentials-file paths relative to the config.json file'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.ConfigValidator interface and implemented ValidateConfig() method across all LLM providers (ollama, openai, openai2, bedrock, vertexai, vertexai2, mock) to centralize and standardize configuration validation logic.

v0.0.12

08 Aug 16:13

Choose a tag to compare

v0.0.12 - 2025-08-08

✨ Features

  • Advanced OpenAI-Compatible Provider (openai2): Introduced a new openai2 provider for OpenAI-compatible APIs (like LM Studio) that adds dynamic and flexible model resolution.
    • The model setting can now be a comma-separated priority list (e.g., "my-model,auto").
    • The provider queries the server's /v1/models endpoint and uses the first available model that matches an entry in the priority list, simplifying workflows by reducing the need for frequent profile edits.

♻️ Refactor

  • Provider Package Separation: Restructured the internal/llm package 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

07 Aug 18:19

Choose a tag to compare

v0.0.11 - 2025-08-08

✨ Features

  • Enhanced Vertex AI Provider (vertexai2): Added a new vertexai2 provider 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

05 Aug 00:01

Choose a tag to compare

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 install due to environment-specific issues. Users can still generate the script manually using llm-cli completion zsh.

v0.0.9

03 Aug 06:53

Choose a tag to compare

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_key field.
    • credentials-file takes precedence over api_key directly set in the profile.
  • Enhanced Profile Check Command: The llm-cli profile check command 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 check where 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.go that caused govulncheck errors during build.

📝 Documentation

  • Updated READMEs: Clarified ~ (tilde) path notation and added usage examples for OpenAI API key file support in README.md and README.ja.md.

♻️ Refactor

  • Error Handling: Centralized error handling in main.go and cmd/root.go for consistent error processing and exit codes.

v0.0.8

02 Aug 18:46

Choose a tag to compare

v0.0.8 - 2025-08-03

✨ Features

  • Profile Check Command: Added llm-cli profile check command 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 --confirm or -y flag for non-interactive operation.
    • Creates a timestamped backup of the config.json file in ~/.config/llm-cli/backups/ before saving any changes, ensuring data safety.
    • Enhanced the profile show command to display 'limits' information.

🐛 Bug Fixes

  • DoS Protection Enhancements: Addressed remaining issues related to DoS protection and UTF-8 safety.
    • Modified readAndProcessStream to stop reading input once the MaxPromptSizeBytes limit is reached, even in "warn" mode, preventing large files from being fully loaded into memory.
    • Updated truncateStringByBytes to be UTF-8 aware, ensuring that string truncation for size limiting does not corrupt multi-byte characters.
  • Configuration Loading Consistency: Ensured Limits struct 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

02 Aug 16:30

Choose a tag to compare

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 limits object to profiles in config.json.
    • prompt command now checks these limits, with configurable behavior (stop or warn) on excess.
    • add command supports setting limits for new profiles via flags (e.g., --limits-max-prompt-size-bytes).
    • set command can now configure limits using dot notation (e.g., limits.on_input_exceeded).
    • list command now displays the configured limits for each profile.
  • Improve UX with Spinner: Added a spinner to the prompt command when not using --stream mode 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 profile subcommands (add, set, use, remove) to return errors instead of calling os.Exit, making them testable. The test suite was updated to execute commands directly and validate their behavior, improving test reliability.

v0.0.6

02 Aug 12:30

Choose a tag to compare

v0.0.6 - 2025-08-02

✨ Features

  • Vulnerability Check Integration: Added govulncheck to 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.go where the os package 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 from 0644 to 0600) and its parent directory (changed from 0755 to 0700) to enhance the security of sensitive information like API keys.

v0.0.5

02 Aug 06:47

Choose a tag to compare

v0.0.5 - 2025-08-02

✨ Features

  • Google Cloud Vertex AI Provider Support: Added support for interacting with Google Cloud Vertex AI.
  • Enhanced profile add Command: The profile add command 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/genai SDK, including fixes for service account authentication, correct Client object usage, and proper streaming iterator handling.
  • Runtime Expansion of Credential File Paths: Changed the expansion of credentials_file paths 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.md and README.en.md have been updated to reflect the addition of the Vertex AI provider and the enhanced profile add command usage, and system prompt handling approach.
  • Revised Provider Development Guide: Removed specific provider implementation details from DEVELOPING_PROVIDERS.ja.md and DEVELOPING_PROVIDERS.en.md.
  • Updated Changelogs: CHANGELOG.ja.md and CHANGELOG.en.md have 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.