di-sukharev / di-sukharev/opencommit

πŸ“š [Feature]: Proposal for User-customizable Prompts through Configuration Files

Open
#212 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.5k
Forks
445
Avg merge
18m
Merged PRs (30d)
2

Description

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. πŸ› οΈ

https://github.com/di-sukharev/opencommit/issues/205
https://github.com/di-sukharev/opencommit/issues/191
https://github.com/di-sukharev/opencommit/issues/180 (Partially)
https://github.com/di-sukharev/opencommit/issues/135 (Partially)
https://github.com/di-sukharev/opencommit/issues/175
https://github.com/di-sukharev/opencommit/issues/155
https://github.com/di-sukharev/opencommit/issues/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! πŸ™

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up β€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked issues 205, 191, 180, 135, 175, 155, and 61 to clarify overlapping requirements. The issue names no implementation files or tests; done would require agreed prompt-file format, user-file loading with default fallback, and a decision on update backups and templating.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.