@xiatiandeairen/smartcommit
v0.1.1
Published
Commit message auto-generation CLI
Downloads
6
Maintainers
Readme
commitgen
Auto-generate Conventional Commit messages from staged Git changes.
Usage
# Generate commit message (requires staged changes)
npx commitgen generate
# Copy to clipboard
npx commitgen generate --copy
# Use remote model
npx commitgen generate --model remote
# Verbose logging
npx commitgen generate --verboseOptions
--model, -m-local(default) orremote--style, -s-conventional(default) orcustom--copy, -c- Copy generated message to clipboard--verbose, -v- Enable debug logging
Config
Create .commitgenrc.json in project root:
{
"model": "local",
"style": "conventional",
"output": "stdout",
"remote": {
"baseUrl": "https://api.example.com"
}
}For remote API, set COMMITGEN_API_URL and COMMITGEN_API_KEY env vars, or use config above.
Or add commitgen field to package.json.
Development
pnpm install
pnpm build
pnpm test