Skip to content

Conversation

@doganarif
Copy link

Overview

This PR introduces configuration file support to the llmcat script. Users can now customize default settings without passing command-line options every time they run the tool.

Changes Made

  • Configuration File Loading:

    • The script checks for a configuration file at the location specified by the environment variable LLMCAT_CONFIG. If not set, it defaults to $HOME/.llmcatrc.
    • If the file exists, it is sourced at the start of the script, allowing users to override default variables (e.g., QUIET, DEBUG, custom_ignores, etc.).
  • Usage Example:

    • Users can create a ~/.llmcatrc file with their custom settings:
      # ~/.llmcatrc
      QUIET="false"
      custom_ignores="*.log|*.tmp"
      DEBUG="true"
    • These settings will be automatically loaded when llmcat is executed.

Benefits

  • User Customization:
    Provides a flexible way for users to persistently set their preferences without needing to specify them on every invocation.
  • Simplified Command-Line Usage:
    Reduces the need for repetitive flags and arguments, streamlining the command-line experience.

Future Work

This feature lays the groundwork for additional enhancements (e.g., extended configuration options, more advanced defaults, etc.) that can be built upon in future PRs.

Please review and let me know if any changes are needed. Thanks!

- Load configuration from ${LLMCAT_CONFIG:-$HOME/.llmcatrc} if the file exists.
- Allow users to override default settings (e.g., QUIET, DEBUG, custom_ignores)
  without needing to pass them as command-line arguments.
- Simplify the user experience by enabling persistent configuration.

This update lays the foundation for further customization and future enhancements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant