8000 Add configuration file support to `llm-commit` · Issue #11 · GNtousakis/llm-commit · GitHub
[go: up one dir, main page]

Skip to content

Add configuration file support to llm-commit #11

Open

Description

@glenux

Summary

Introduce support for configuration files in llm-commit to allow users to define default settings such as commit message schemes and default hints.

Expected Benefits :

  • simplifies usage by minimizing repeated command-line options.
  • Enables project-specific or user-specific defaults

Problem

Currently, all configuration options for llm-commit (e.g., message schemes, hints) must be specified via command-line arguments. This requires users to repeatedly provide the same options, which can be tedious and error-prone, especially in larger projects or across multiple repositories.

Proposed solution

Implement a configuration file system with support for:

  • System-global config: /etc/llm-commit/config.yml
  • User-global config: $HOME/.config/llm-commit/config.yml
  • Per-project config: Located in the repository’s top-level directory (same directory as .git)
  • Explicit config file: Allow users to specify an alternate config file via -c FILE or --config FILE

Configuration options supported:

  • Default message format (e.g., default, semantic, conventional, etc.)
  • Default hint text for context

Priority rule:

  • Command-line arguments always override values from configuration files.
  • Priority order:
    Command-line > Per-project config > User-global config > System-global config

Example usage:

# config.yml example
format: semantic
hint: "General code cleanup and refactoring."
llm commit --config ./custom-config.yml

Possible considerations

  • Error handling for invalid/missing configuration files.
  • Backward compatibility (to ensure existing workflows remain unaffected).

Activity

  1. glenux commented on Mar 17, 2025

    @glenux
    ContributorAuthor

    Note: for consistency with configuration file, perhaps it would be worth introducing -f --format (ex: --format semantic) (and make --semantic and --conventional aliases of the new command, or remove them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0