tcxcommit

A TypeScript CLI that reads a Git diff and asks OpenRouter for a conventional commit message. Developers can accept, regenerate, or exit before committing.

tcxcommitClick to zoom
Role
Creator
Timeline
2 Weeks
Team
Solo
Status
Completed

Built with

  • TypeScript
  • Node.js
  • OpenRouter
  • npm

The brief

A commit message should explain the changes, but writing one interrupts the development flow. tcxcommit generates a suggestion from the diff and leaves the decision with the developer.

Built the CLI flow, Git integration, OpenRouter request handling, local configuration, and npm package.

Implementation notes

  1. Generate from the diff

    The tool reads the staged diff through Git and sends it to OpenRouter as the context for a conventional commit suggestion.

  2. Require a review step

    The terminal presents the message and lets the user accept, regenerate, or exit. Committing and the optional push are separate steps in the flow.

  3. Support configured access

    The CLI supports a personal OpenRouter key and a configured trial path. Local configuration records the selected key and trial state.

Current result

An npm-distributed developer tool with an interactive commit workflow and documented handling for missing changes, network failures, and rate limits.

The terminal workflow

Run the CLI from a Git repository. It stages changes automatically, reads the staged diff, and requests a message. Review the result before accepting it; regeneration and exit are available in the same flow. A push is optional after the commit.

The automatic staging behavior matters when reviewing this tool because it affects what enters the diff. The generated message is only as useful as the changes it receives.

Distribution and configuration

The package can be run through npm installation or npx. Configuration lives on the user's machine, with environment variables also supported for provider access. The repository documents the request flow and failure cases alongside the code.

npx tcxcommit
"You have a right to perform your prescribed duty, but you are not entitled to the fruits of actions."
Bhagavad Gita

Design by SahilCodex
© 2026. Built with hands.