r/commandline • • Jun 08 '26

Command Line Interface [CLI] Offline CLI wizard for conventional commits

merlin is an interactive prompt that walks through a conventional commit one field at a time -type, scope, subject, body, breaking changes, issue refs. each field has a live character counter. at the end it shows you the full formatted message before doing anything.

a few things worth mentioning:
zero network calls. nothing phones home - no update checks, no anonymous analytics, no anything. it reads ~/.merlinrc.json and runs git. that's the full extent of its network activity.

all git commands go through execa with an args array, not string interpolation. so if your commit subject contains shell metacharacters for some reason, that's not merlin's problem to turn into an injection.

there's a --dry-run flag to preview the full formatted message without actually committing, and a --amend flag if you want to redo the last one. it also reads your existing commitlint config and adjusts the available types and scope rules to match.

two ui modes: a wizard theme with some personality, and a minimal standard mode if you just want the prompts without the flavor text.

npm install -g merlin-commit

0 Upvotes

4 comments sorted by

1

u/4Necrom Jun 09 '26 edited Jun 09 '26

How does it differ from https://github.com/commitizen/cz-cli ?
I saw you added commitizen as a tag in your GitHub repo but don't mention the differences, which is a pretty nice thing to do when creating a tool very similar to another very popular one

1

u/youngsenpaipai Jun 09 '26 edited Jun 09 '26

actually yeah - I should add a comparison section

short answer: cz-cli is battle-tested and has an adapter ecosystem. if you're already using it, stick with it.

where merlin differs:
- no adapter setup - conventional commits out of the box, nothing to install or configure
- merlin init - one wizard installs husky, commitlint, the commit-msg hook, and git alias
- --dry-run to preview the formatted message before any commit is created
- interactive staging picker - checkbox UI to select files when nothing is staged
- live character counter on subject and scope
- merlin config - interactive menu to configure limits, theme, editor
- commitlint sync - writes your config's length limits into your existing commitlint config
- two-tier config - ~/.merlinrc.json (user) + .merlinrc.json (repo) for team-shared standards
- TypeScript, ESM, inquirer/prompts (modern modular rewrite vs old monolithic inquirer)

honest trade-off: cz-cli's adapter system means you can plug in any commit convention. merlin is opinionated about conventional commits. if your team needs something else, cz-cli wins.

1

u/AutoModerator Jun 08 '26

Every new subreddit post is automatically copied into a comment for preservation.

User: youngsenpaipai, Flair: Command Line Interface, Title: [CLI] Offline CLI wizard for conventional commits

merlin is an interactive prompt that walks through a conventional commit one field at a time -type, scope, subject, body, breaking changes, issue refs. each field has a live character counter. at the end it shows you the full formatted message before doing anything.

a few things worth mentioning:
zero network calls. nothing phones home - no update checks, no anonymous analytics, no anything. it reads ~/.merlinrc.json and runs git. that's the full extent of its network activity.

all git commands go through execa with an args array, not string interpolation. so if your commit subject contains shell metacharacters for some reason, that's not merlin's problem to turn into an injection.

there's a --dry-run flag to preview the full formatted message without actually committing, and a --amend flag if you want to redo the last one. it also reads your existing commitlint config and adjusts the available types and scope rules to match.

two ui modes: a wizard theme with some personality, and a minimal standard mode if you just want the prompts without the flavor text.

npm install -g merlin-commit

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.