npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tcxcommit

v1.0.15

Published

AI-powered git commit message generator

Readme

tcxcommit

AI-powered git commit message generator that writes your commit messages for you!

Description

tcxcommit is a command-line tool that uses artificial intelligence to generate meaningful and conventional git commit messages. Simply stage your changes and let tcxcommit create the perfect commit message for you. It supports both free trials and your own OpenRouter API key.

Features

  • AI-powered commit message generation
  • Conventional commit format support (feat:, fix:, docs:, refactor:, etc.)
  • Free to start with 5 trial commits
  • Option to use your own OpenRouter API key for unlimited usage
  • Automatic change staging
  • Git push support after commit
  • Clean and beautiful terminal interface
  • Rate limit handling
  • Network error handling

Installation

Prerequisites

  • Node.js 18 or higher
  • Git installed and configured
  • Internet connection (for AI API calls)

Install via npm

npm install -g tcxcommit

Install via npx (no installation required)

npx tcxcommit

Usage

Basic Usage

  1. Navigate to your git repository
  2. Make some changes to your files
  3. Run the following command:
tcxcommit
  1. Follow the interactive prompts:
    • Press Enter to continue
    • Choose API option (free trials or your own key)
    • Wait for AI to generate commit message
    • Accept, regenerate, or exit
    • Choose to push to remote after commit

Using with Git

tcxcommit automatically stages your changes before generating the commit message. You can also manually stage files:

# Stage specific file
git add filename.js

# Stage all changes
git add .

# Stage specific folder
git add src/

API Key Options

Option 1: Free Trials

By default, tcxcommit provides 5 free trial commits using OpenRouter's free AI model. This is useful for testing or occasional use.

  • No API key required
  • 5 free commits included
  • Shows remaining trials on each run
  • When exhausted, prompts to add your own key

Option 2: Your Own API Key

For unlimited commits, you can use your own OpenRouter API key:

  1. Visit OpenRouter.ai to get a free API key
  2. Run tcxcommit
  3. Select "Use my own API key" when prompted
  4. Enter your API key
  5. The key is saved locally for future use

Your API key is stored securely on your machine and is never shared with anyone except OpenRouter for generating commit messages.

Commands

# Start tcxcommit
tcxcommit

# Or use npx without installing
npx tcxcommit

How It Works

tcxcommit follows this simple flow:

  1. Checks for git repository in current directory
  2. Stages all changes automatically using git add .
  3. Gets the staged diff using git diff --cached
  4. Sends the diff to OpenRouter AI API
  5. AI generates a conventional commit message
  6. Displays the suggested message
  7. User accepts, regenerates, or exits
  8. If accepted, commits with the generated message
  9. Optionally pushes to remote repository

Troubleshooting

No changes found

Error: No changes found

Solution: Make some changes to your files and try again. tcxcommit requires at least one staged change to generate a commit message.

Rate limit exceeded

Error: Rate limit exceeded

Solution: Use your own OpenRouter API key for unlimited commits. The free trials have rate limits.

Network error

Error: Network error. Please check your internet connection.

Solution: Ensure you have an active internet connection and try again.

Git not installed

Error: Git is not installed or not in PATH

Solution: Install Git and ensure it's available in your system PATH.

Not a git repository

Error: Not a git repository

Solution: Initialize a git repository first:

git init

Permission denied (Linux/Mac)

If you get permission errors during installation:

sudo npm install -g tcxcommit

Or fix npm permissions:

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g tcxcommit

Configuration

tcxcommit stores its configuration in the following location:

  • Linux/macOS: ~/.tcxcommit/config.json
  • Windows: C:\Users\YourUsername\.tcxcommit\config.json

The configuration file contains:

  • Your API key (if set)
  • Number of free trials remaining

Project Structure

tcxcommit/
├── src/
│   ├── cli.ts              # Entry point
│   ├── index.ts            # Main application logic
│   ├── api/
│   │   └── openrouter.ts   # OpenRouter API integration
│   ├── ui/
│   │   ├── header.ts       # Terminal header display
│   │   └── spinner.ts      # Loading spinner
│   └── utils/
│       ├── apiKey.ts       # API key management
│       └── git.ts          # Git operations
├── dist/                   # Compiled JavaScript (published)
├── package.json
├── tsconfig.json
└── README.md

Security

  • Your API key is stored locally in the configuration file
  • Keys are never sent to any server except OpenRouter
  • The default free trials use a shared key for demonstration purposes
  • No data is collected or analytics are sent anywhere

Technologies Used

  • Node.js - JavaScript runtime
  • TypeScript - Programming language
  • OpenRouter - AI API provider
  • Chalk - Terminal string styling
  • Prompts - Interactive CLI prompts

License

ISC License

Author

tcxcommit is created and maintained by the community.

Support

If you encounter any issues or have suggestions:

  • Open an issue on GitHub: https://github.com/sahilcodexx/tcxcommit/issues
  • Check the source code on GitHub: https://github.com/sahilcodexx/tcxcommit

Acknowledgments