-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Overview
Introduce a shell alias/function/helper that can take git diff output, feed it into Codex with a suitable prompt, and return a well-structured commit message.
The tool should be written generically so it can work in any Git repo, and then extended with a dotfiles-specific wrapper that defaults to ~/.dotfiles.
Example
Generic usage:
⇒ git -C /path/to/repo diff repoPath/to/file | codex "Generate a concise commit message for this diff"Dotfiles-specific wrapper:
⇒ git -C ~/.dotfiles/bin diff dotfiles-create-bin | codex "Generate a concise commit message for this dotfiles change"Goals
- Provide a smooth workflow for drafting commit messages without copy/pasting diffs.
- Ensure generated commit messages are consistent, scoped, and conventional.
- Make the generic helper reusable across repos.
- Provide a dotfiles-scoped alias/function that builds on the generic helper.
Proposed Approach
-
Implement a generic helper script/alias (e.g.,
codex-git-commit-msg):- Runs
git diff(or accepts an existing diff via pipe). - Pipes the diff into Codex with a commit-message prompt.
- Outputs the proposed commit message.
- Runs
-
Add a dotfiles wrapper (e.g.,
codex-dotfiles-commit-msg) that:- Uses
git -C ~/.dotfilesautomatically. - Provides a dotfiles-specific prompt context.
- Uses
References
- Codex CLI docs:
codex -h
Metadata
Metadata
Assignees
Labels
No labels