GLINR Studio LogoTypeWeaver

CLI Reference

Complete command-line interface reference for CommitWeave

Edit on GitHub

commitweave ai

Generate commit messages using AI analysis of your staged changes.

Synopsis

commitweave ai [options]

Options

OptionAliasDescriptionDefault
--model <model>-mAI model to usegpt-4-turbo
--context <text>-cAdditional context for AI
--temperature <num>-tAI creativity (0.0-1.0)0.6
--max-tokens <num>Max tokens for AI response120
--provider <name>-pAI provider (openai, anthropic)openai
--fallback-fEnable fallback providerfalse
--dry-run-nShow message without committingfalse

Examples

# Basic AI commit generation
commitweave ai

# Use specific model with context
commitweave ai --model gpt-4 --context "Refactoring authentication flow"

# High creativity with fallback
commitweave ai --temperature 0.8 --fallback

# Preview without committing
commitweave ai --dry-run

Exit Codes

CodeMeaning
0Success - commit generated and applied
1General error
4No staged changes found
5AI service error or rate limit
6Invalid API key or configuration

Rate Limiting: Exit code 5 often indicates you've hit API rate limits. Wait 60 seconds and retry, or switch to a different AI provider with --fallback flag.

commitweave quick

Fast commit generation with minimal prompts.

Synopsis

commitweave quick [options]

Options

OptionAliasDescriptionDefault
--type <type>-tCommit typeRequired
--scope <scope>-sCommit scopeOptional
--message <text>-mCustom message override
--breaking-bMark as breaking changefalse
--no-emojiDisable emoji prefixfalse

Examples

# Quick feature commit
commitweave quick --type feat --scope auth

# Bug fix with custom message
commitweave quick --type fix --message "resolve login timeout issue"

# Breaking change
commitweave quick --type feat --scope api --breaking

# Simple docs update
commitweave quick --type docs --no-emoji

Exit Codes

CodeMeaning
0Success - commit created
1General error
2Missing required arguments
4No staged changes found

commitweave commit

Interactive commit creation with guided prompts.

Synopsis

commitweave commit [options]

Options

OptionAliasDescriptionDefault
--interactive-iForce interactive modetrue
--skip-scopeSkip scope selectionfalse
--skip-bodySkip body inputfalse
--skip-breakingSkip breaking change promptfalse
--template <path>Use custom template
--editor <cmd>-eOverride default editor$EDITOR

Examples

# Interactive commit creation
commitweave commit

# Skip certain prompts
commitweave commit --skip-scope --skip-body

# Use custom template
commitweave commit --template ./custom-commit.txt

# Force specific editor
commitweave commit --editor "code --wait"

Exit Codes

CodeMeaning
0Success - interactive commit completed
1General error
3Git repository not found
4No staged changes found
7User cancelled operation

commitweave validate

Validate commit messages against conventional commit standards.

Synopsis

commitweave validate [options] [range]

Options

OptionAliasDescriptionDefault
--range <range>-rGit commit range to validateHEAD~10..HEAD
--config <path>-cCustom validation config.commitweave.json
--strict-sEnable strict validation modefalse
--fixAuto-fix simple issuesfalse
--format <fmt>-fOutput format (text, json)text

Examples

# Validate last 10 commits
commitweave validate

# Validate specific range
commitweave validate --range main..feature-branch

# Strict validation with JSON output
commitweave validate --strict --format json

# Validate and auto-fix
commitweave validate --fix --range HEAD~5..HEAD

Exit Codes

CodeMeaning
0All commits are valid
1Validation failures found
2Invalid range or arguments
3Git repository not found
8Configuration validation error

commitweave doctor

Diagnose and fix common CommitWeave configuration issues.

Synopsis

commitweave doctor [options]

Options

OptionAliasDescriptionDefault
--fix-fAuto-fix detected issuesfalse
--check-all-aRun comprehensive checksfalse
--skip-networkSkip network connectivity testsfalse
--output <file>-oSave report to file

Examples

# Basic health check
commitweave doctor

# Comprehensive check with auto-fix
commitweave doctor --check-all --fix

# Check without network tests
commitweave doctor --skip-network

# Save diagnostic report
commitweave doctor --output health-report.json

Exit Codes

CodeMeaning
0All checks passed
1Issues found (fixable)
2Critical issues found
5Network connectivity issues
6Configuration problems

commitweave export

Export CommitWeave configuration or commit history.

Synopsis

commitweave export <type> [options]

Options

OptionAliasDescriptionDefault
--format <fmt>-fExport format (json, yaml, csv)json
--output <file>-oOutput file pathstdout
--range <range>-rGit commit range for historyHEAD~100..HEAD
--template-tExport as templatefalse

Examples

# Export configuration
commitweave export config --format yaml --output config.yaml

# Export commit history
commitweave export history --range main..develop --format csv

# Export as template
commitweave export config --template --output team-template.json

Exit Codes

CodeMeaning
0Export completed successfully
1General export error
2Invalid export type or format
9File write permissions error

commitweave import

Import CommitWeave configuration from various sources.

Synopsis

commitweave import <source> [options]

Options

OptionAliasDescriptionDefault
--file <path>-fImport from file
--url <url>-uImport from URL
--merge-mMerge with existing configfalse
--backup-bBackup existing configtrue
--validate-vValidate before importtrue

Examples

# Import from file
commitweave import --file ./team-config.json

# Import from URL with merge
commitweave import --url https://example.com/config.json --merge

# Import without validation
commitweave import --file config.yaml --validate false

Exit Codes

CodeMeaning
0Import completed successfully
1Import failed
2Invalid source or format
6Validation failed
9Backup creation failed

commitweave list

List and manage CommitWeave configurations and templates.

Synopsis

commitweave list [type] [options]

Options

OptionAliasDescriptionDefault
--format <fmt>-fOutput format (table, json, yaml)table
--filter <pattern>Filter by name pattern
--show-paths-pShow full file pathsfalse
--active-only-aShow only active configurationfalse

Examples

# List all configurations
commitweave list

# List configurations in JSON format
commitweave list --format json

# List with full paths
commitweave list configs --show-paths

# Filter by pattern
commitweave list --filter "team-*"

Exit Codes

CodeMeaning
0Listing completed successfully
1General error
2Invalid list type or format
6Configuration access error

commitweave reset

Reset CommitWeave configuration to defaults or previous state.

Synopsis

commitweave reset [target] [options]

Options

OptionAliasDescriptionDefault
--hardComplete reset (delete custom configs)false
--backup <path>-bCreate backup before resetAuto-generated
--confirm-ySkip confirmation promptsfalse
--dry-run-nShow what would be resetfalse

Examples

# Soft reset to defaults
commitweave reset

# Hard reset with confirmation
commitweave reset --hard --confirm

# Preview reset changes
commitweave reset --dry-run

# Reset with custom backup location
commitweave reset --backup ./backups/config-backup.json

Exit Codes

CodeMeaning
0Reset completed successfully
1Reset failed
6Configuration error
7User cancelled operation
9Backup creation failed

commitweave help

Display help information for CommitWeave commands.

Synopsis

commitweave help [command] [options]

Options

OptionAliasDescriptionDefault
--format <fmt>-fHelp format (text, markdown)text
--examples-eInclude examples in outputfalse
--all-aShow help for all commandsfalse

Examples

# General help
commitweave help

# Help for specific command
commitweave help ai

# Help with examples
commitweave help commit --examples

# All commands help
commitweave help --all

Exit Codes

CodeMeaning
0Help displayed successfully
2Invalid command name

Global Options

These options are available for all commands:

OptionAliasDescriptionDefault
--version-VShow version number
--help-hShow help for command
--config <path>-cCustom config file path.commitweave.json
--verbose-vEnable verbose outputfalse
--quiet-qSuppress output except errorsfalse
--no-colorDisable colored outputfalse

Environment Variables

CommitWeave respects these environment variables:

# AI Configuration
OPENAI_API_KEY="your-openai-key"
CLAUDE_API_KEY="your-anthropic-key"
COMMITWEAVE_AI_MODEL="gpt-4-turbo"

# Default Settings  
COMMITWEAVE_CONFIG="/path/to/config.json"
COMMITWEAVE_EDITOR="code --wait"
COMMITWEAVE_TEMPLATE="/path/to/template.txt"

# Git Integration
COMMITWEAVE_GPG_SIGN="true"
COMMITWEAVE_SIGNOFF="true"
COMMITWEAVE_NO_VERIFY="false"

Master CommitWeave with these essential resources: