Manual commit message
It would be good to have an option where instead of using LLM commit messages or falling back to a deterministic message, it would ask the user to input the commit message.
My current issues with the current implementation is
- LLM commit messages although small, they still consume usage
- Fallback messages do not follow team guidelines for messages when using something like commit lint
Thanks for the suggestion! I searched the codebase and confirmed there is no existing option for manually providing commit messages. Currently, wt step commit either generates a message via a configured LLM command or falls back to a deterministic message like "Changes to N files" — there's no --message flag or interactive prompt.
The closest related functionality:
--show-promptonwt step commitoutputs the rendered LLM prompt to stdout, which can be piped to other tools — but it doesn't help with manual input.commit.generation.commandin config lets you set an arbitrary shell command, so in theory you could point it at something likecator a script that opens$EDITOR, but that's a workaround rather than a proper feature.
A --message flag (similar to git commit -m) would be a straightforward addition that addresses both concerns (avoiding LLM usage costs and following team commit message conventions).
I'll leave it for a maintainer to evaluate and prioritize.
thanks for the suggestion @viicslen
commit.generation.commandin config lets you set an arbitrary shell command, so in theory you could point it at something likecator a script that opens$EDITOR, but that's a workaround rather than a proper feature.
this sounds pretty good! @worktrunk-bot could we add an example to the "tips & practices" of this? one for changing the config and another using env vars as part of an an alias?
Added a "Manual commit messages" section to tips & patterns in #1469 with two recipes:
Config-based — set commit.generation.command to read from the terminal:
[commit.generation]
command = "cat > /dev/null && exec < /dev/tty && IFS= read -rp 'Commit message: ' msg && printf '%s' \"$msg\""
Env var alias — override per-command without changing the default LLM config:
# Pass a fixed message via env var
wtcm() { WORKTRUNK_COMMIT__GENERATION__COMMAND="echo $1" wt step commit; }
# Usage: wtcm "fix: resolve auth timeout"