Skip to content

📚 [Feature]: Proposal for User-customizable Prompts through Configuration Files #212

Open
@sebastienfi

Description

@sebastienfi

Description

👋 Hi amazing OpenCommit maintainers and community! 🌟 First of all, a huge thanks to the code owners for the incredible work on OpenCommit. 🚀 I have a proposal that could make OpenCommit even more awesome. I'd love to hear your thoughts! 🧠

Currently, OpenCommit uses fixed prompts which are not customizable by users. Adding an ability for users to fine-tune the prompts would open up new possibilities and even facilitate community contributions for better prompts. 🛠️

#205
#191
#180 (Partially)
#135 (Partially)
#175
#155
#61

Suggested Solution

Let's allow OpenCommit to check for user-specific prompt files in ~/.opencommit/ (Or $HOME). If present, it should use them, else fallback to the global defaults. This way, users can create and modify prompts as they like.

  1. Define a format for prompt files (Pure Text/JSON/YAML).
  2. Use a template engine like Handlebars for dynamic content insertion.
  3. At startup, check if ~/.opencommit/ prompts exists, and load prompts from there if it does.
  4. On update, backup user's custom prompts if global defaults changed.

Alternatives

  • Instead of files, we could use a database, but that adds complexity. Using files is simple and transparent.
  • Allow customization only through UI, but this limits the extensibility and contributions.

Additional Context

This feature addresses many requests from the community about customizing commit message formats, prefixes, and ticket numbers. It’s a versatile solution that keeps everyone's preferences in mind. 🤗

💙 Looking forward to the community's feedback and insights! 🙏

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