Usage

Using tcxcommit is simple! Just run the command in your git repository and let AI generate your commit message.

Basic Usage

Run tcxcommit in your project directory:

tcxcommit

Step by Step Process

  1. Start - Run tcxcommit in your git repository
  2. Confirm - Press Enter to continue (or Ctrl+C to exit)
  3. API Choice - Choose between your own API key or free trials
  4. Auto Stage - All changes are automatically staged
  5. Generate - AI analyzes your diff and generates a commit message
  6. Review - Review the generated message
  7. Commit - Accept to commit, or regenerate for a new message
  8. Push - Optionally push to remote

Example Output

Here's what a typical session looks like:

Getting Started with tcxcommit
  v1.0.0 — AI commit helper

  Continue? [Y/n] y

  Free trials remaining: 5

  Choose API option:
    1. Use my own API key
    2. Use free trials (5 left)

  > Use free trials

  Using free trial

  Generating commit message...

  ┌──────────────────────────────────────────────────┐
  │                                                  │
  │   feat: Add user authentication module           │
  │   - Implement JWT-based login                    │
  │   - Add password hashing with bcrypt             │
  │   - Create auth middleware                       │
  │                                                  │
  └──────────────────────────────────────────────────┘

  Choose:
    1. Accept & Commit
    2. Regenerate
    3. Exit

  > Accept & Commit

  ┌──────────────────────────────────────────────────┐
  │                                                  │
  │   Committed!                                      │
  │                                                  │
  └──────────────────────────────────────────────────┘

  Push to remote? [Y/n] y

  ┌──────────────────────────────────────────────────┐
  │                                                  │
  │   Pushed!                                         │
  │                                                  │
  └──────────────────────────────────────────────────┘

Tips

  • Stage specific files - Use git add <files> before running to only commit specific changes
  • Regenerate if needed - If you don't like the first suggestion, choose "Regenerate"
  • Add your API key - For unlimited usage, add your own OpenRouter key

Commands

First Time Setup

tcxcommit
# Follow the prompts to:
# 1. Choose API method (free trials or your own key)
# 2. Enter API key if you choose "own"
# 3. Key is saved automatically

Using Your Own API Key

# When prompted, select "Use my own API key"
# Enter your OpenRouter API key
# The key is saved to .env for future use

Troubleshooting

No changes found

Make sure you have staged changes before running:

git add .
tcxcommit

Rate limit exceeded

Add your own API key for unlimited usage:

# Run tcxcommit and choose "Add my own API key"

Not a git repository

Initialize a git repository first:

git init
git add .
tcxcommit

Next Steps

That's it! You're ready to use tcxcommit. Happy coding!