Cmarta Commit

Documentation

Cmarta Commit Documentation

AI-powered commit message generator that creates conventional commit messages based on your git changes.

Installation

Prerequisites

  • Node.js (version 14 or higher)
  • Git repository
  • Active internet connection

Install the CLI Tool

npm install -g cmarta-commit

Verify Installation

cmarta-commit --version

Getting Started

1. Create an Account

Visit Cmarta Commit and create an account.

2. Generate an API Key

  1. Log into your dashboard
  2. Navigate to the "API Keys" section
  3. Click "Generate New Key"
  4. Copy and save your API key (you won't be able to see it again)

3. Configure the CLI Tool

cmarta-commit setup

Enter your API key when prompted. The key will be securely stored in your home directory.

Basic Usage

Generate AI-Powered Commit Messages

Navigate to your git repository and stage your changes:

git add .
cmarta-commit

Or stage and commit in one command:

cmarta-commit -a

Interactive Flow

After running the command, you'll see:

🤖 Generating commit message...

✨ Generated commit message:
"feat(auth): implement two-factor authentication"

? What would you like to do?
❯ Commit with this message
  Edit the message
  Generate a new message

  Cancel

Command Options

  • Commit with this message: Uses the AI-generated message as-is
  • Edit the message: Opens an editor to modify the message
  • Generate a new message: Creates a new AI-generated message
  • Cancel: Exits without committing

Dashboard

Access your web dashboard at /dashboard

Usage Overview

  • Monthly usage vs. plan limits
  • Success rate percentage
  • All-time API usage
  • Subscription details

Usage Analytics

  • 14-day usage trends
  • Token consumption charts
  • Daily averages
  • Request/Token view toggle

API Key Management

  • Generate new API keys
  • View creation dates
  • Last usage tracking
  • Secure key display

CLI Commands Reference

Core Commands

# Setup API key
cmarta-commit setup

# Generate and commit (interactive)
cmarta-commit

# Auto-stage and generate commit
cmarta-commit -a
cmarta-commit --all

# Auto-commit without confirmation
cmarta-commit -y
cmarta-commit --auto

# Combine options
cmarta-commit -a -y

Help and Information

# Show version
cmarta-commit --version

# Show help
cmarta-commit --help

Configuration

Config File Location

The CLI stores configuration in:

  • Linux/macOS: ~/.cmarta-commit-config.json
  • Windows: %USERPROFILE%\.cmarta-commit-config.json

Config Structure

{
  "apiKey": "sk_your_api_key_here"
}

Updating Configuration

Re-run setup to update your API key:

cmarta-commit setup

Troubleshooting

Common Issues

"Not a git repository"

git init

"No staged changes found"

# Stage your changes first
git add .
# Or use the auto-stage flag
cmarta-commit -a

"Invalid API key"

cmarta-commit setup

"Rate limit exceeded"

  • Check your usage in the dashboard
  • Consider upgrading your plan

API Usage

Understanding Usage Limits

Free Plan

  • 100 requests per month
  • Basic usage analytics
  • Standard support

Pro Plan

  • 1,000 requests per month
  • Advanced analytics
  • Priority support
  • Early access to features

Optimizing Usage

Best Practices

  • Stage Relevant Changes: Only stage files you want to commit
  • Batch Related Changes: Group related changes in single commits
  • Review Generated Messages: AI suggestions may need minor adjustments

Need help? Visit your dashboard or contact support.

Version 1.0.0 | Last Updated: December 2024