GitSmith: AI powered configurable conventional commits CLI for teams and solo developers.
gitsmith is a AI powered configurable Conventional Commits CLI that adapts to every project through a single .commitconfig.json file. Install it once globally, drop a config in any repo, and ship clean, consistent commits every time. Optional AI assist turns "what did you do?" into a perfectly formatted commit using a free NVIDIA model, so you stop fighting the type, scope, and wording every time you commit.
Use gitsmith --ai to force the AI prompt and generate suggestions from your NVIDIA AI API key.
- Keeps commit messages consistent across teams and repos
- Supports custom project formats through
.commitconfig.json - Uses optional NVIDIA AI API suggestions for faster commit writing
- Falls back to manual prompts when AI is disabled or key is missing
- Runs safety checks before commit to reduce mistakes
- Project-aware commit format via
.commitconfig.json - Interactive prompts powered by
enquirer - Config validation with clear errors (
zod) - Config file discovery by walking up directories (
find-up) - Git safety checks (must be git repo, must have staged files)
- Commit preview + confirmation before running
git commit initcommand that generates a conventional default config- Optional AI suggestions powered by the NVIDIA AI API
npm install -g gitsmithThen run the CLI command:
gitsmith --help- Go to your project:
cd your-project- Initialize config:
gitsmith init- Edit
.commitconfig.jsonas needed. - Stage files:
git add .- Run commit flow:
gitsmithgitsmithorgitsmith commit: Start interactive commit flowgitsmith --ai: Force AI prompt for this rungitsmith --no-ai: Skip AI prompt for this rungitsmith init: Create.commitconfig.jsonin current directorygitsmith init --force: Overwrite existing configgitsmith key:set [key]: Save or overwrite NVIDIA API keygitsmith key:show: Show masked keygitsmith key:remove: Remove saved keygitsmith key:reset: Alias forkey:removegitsmith key:status: Show saved key status
.commitconfig.json supports:
types: string[](required)askScope: boolean(required)scopes?: string[]askTicket: boolean(required)ticketPrefix?: stringaskBreaking: boolean(required)format: string(required)headerMaxLength?: number
Available format tokens:
{type}{scope}{ticket}{message}{breaking}(!when true, otherwise empty)
{
"types": ["feat", "fix", "docs", "chore", "refactor", "test", "style"],
"askScope": true,
"scopes": ["auth", "ui", "api", "db", "config"],
"askTicket": false,
"askBreaking": true,
"format": "{type}({scope}): {message}",
"headerMaxLength": 72,
"ai": {
"enabled": true,
"askByDefault": true
}
}Given:
type = featscope = authticket = PROJ-123message = add login flow
and format:
{type}({scope}): {ticket} {message}
final commit header:
feat(auth): PROJ-123 add login flow
AI is optional and fully additive. If your project has no ai block, behavior stays exactly the same.
npm install -g gitsmith
gitsmith key:set
gitsmithGet a free key from build.nvidia.com.
{
"types": ["feat", "fix", "docs", "chore", "refactor", "test", "style"],
"askScope": true,
"scopes": ["auth", "ui", "api", "db", "config"],
"askTicket": false,
"askBreaking": true,
"format": "{type}({scope}): {message}",
"ai": {
"enabled": true,
"provider": "nvidia",
"model": "nvidia/llama-3.3-nemotron-super-49b-v1",
"endpoint": "https://integrate.api.nvidia.com/v1/chat/completions",
"askByDefault": true,
"allowNewScopes": true
}
}| Command | Purpose |
|---|---|
gitsmith key:set |
Prompt and save key |
gitsmith key:set <key> |
Save key non-interactively |
gitsmith key:show |
Show masked key |
gitsmith key:remove |
Remove key after confirmation |
gitsmith key:reset |
Alias for key:remove |
gitsmith key:status |
Show provider/source/saved time |
Set GITSMITH_AI_KEY in the environment. It overrides the saved local file.
Only the free-text description entered by the user is sent to AI. Source code and git diffs are not sent.
gitsmith --ai: force AI prompt for this rungitsmith --no-ai: skip AI prompt for this run
npm install
npm linkNow test in any git repo:
gitsmith init
git add .
gitsmith- Set final npm package name in
package.json - Ensure version is correct (first release:
0.1.0) - Run:
npm run lint
npm publish- License: MIT
- Contributions welcome via pull requests
- See
CONTRIBUTING.mdandCODE_OF_CONDUCT.md
