@arseno25/comet
v1.7.0
Published
AI commit message assistant with secure diff redaction and modern terminal UX.
Maintainers
Readme
☄Comet (Commit assistant, catchy)
Install
npm install -g @arseno25/cometRun without permanent install:
npx @arseno25/comet init
npx @arseno25/cometRequirements
- Node.js 22 or newer
- Git installed and available
- An API key for your chosen provider
Quick Start
# 1. Set up config
comet init
# 2. Stage changes
git add .
# 3. Generate commit
cometcomet init now walks through provider setup, output preferences, push behavior, and default panel visibility for:
Safe SendAnalysisQualityWarnings
Commands
Main Command
cometGenerate a commit message from staged changes, show preview, and commit if approved.
Preview
comet preview
comet preview --jsonGenerate commit message without running git commit.
Analyze
comet analyze
comet analyze --jsonAnalyze staged changes without committing.
Review
comet review
comet review --jsonShow staged diff risks and highlights.
Squash
comet squash main
comet squash main HEAD --jsonGenerate a squash-ready commit message for a commit range.
Config
comet config set provider openai-compatible
comet config set model gpt-4o-mini
comet config set apiKey your_api_key
comet config get
comet config unset apiKey
comet config pathDoctor
comet doctor
comet doctor --jsonShow environment diagnostics.
Init
comet initCreate or update the global Comet config with interactive prompts for provider, model, API key, language, output defaults, push behavior, and panel visibility.
Hook
comet hook install
comet hook status
comet hook uninstallManage prepare-commit-msg hook.
Changelog
comet changelog
comet changelog --from v1.0.0 --version 2.0.0
comet changelog --jsonGenerate formatted changelog from commit history.
Release Notes
comet release-notes v1.0.0
comet release-notes v1.0.0 --version 2.0.0
comet release-notes v1.0.0 --jsonGenerate release notes with contributor stats.
Runtime Flags
Output
comet --emoji
comet --description
comet --one-line
comet --omit-scope
comet --whyProvider
comet --provider openai-compatible
comet --model gpt-4o-mini
comet --base-url https://api.example.com
comet --lang enPrivacy
comet --privacy-mode standardOptions: standard, strict, local-only
Workflow
comet --preview
comet --json
comet --yes
comet --push
comet --no-pushForce Output
comet --type fix
comet --scope authConfig
Config is resolved in order:
CLI flags > environment variables > project config > global config > defaultGlobal Config
~/.comet/config.envProject Override
Comet looks for:
.comet.env
.cometrc
.cometrc.jsonImportant Config Keys
# Provider
COMET_PROVIDER=openai
COMET_MODEL=gpt-4o-mini
COMET_BASE_URL=
COMET_API_KEY=
# Output
COMET_LANGUAGE=en
COMET_DESCRIPTION=true
COMET_EMOJI=false
COMET_ONE_LINE=false
COMET_OMIT_SCOPE=false
COMET_WHY=false
# Git
COMET_AUTO_COMMIT=false
COMET_GIT_PUSH=false
COMET_STAGE_ALL=false
# Security
COMET_REDACT_SECRETS=true
COMET_PRIVACY_MODE=standard
COMET_EXCLUDE_FILES=
# Panel Visibility
COMET_SHOW_SAFE_SEND=false
COMET_SHOW_ANALYSIS=false
COMET_SHOW_QUALITY=false
COMET_SHOW_WARNINGS=false
COMET_VERBOSE=falsePanel Visibility
These values control which extra panels appear in the commit preview:
COMET_SHOW_SAFE_SEND: show included files, skipped files, and redaction summaryCOMET_SHOW_ANALYSIS: show inferred type, scope, confidence, rationale, and issue keyCOMET_SHOW_QUALITY: show quality score, suggestions, and warnings for the generated commitCOMET_SHOW_WARNINGS: show runtime warnings such as fallback generation or token truncation
You can set them during comet init or later with comet config set.
Output Format
Standard
feat(auth): add role-based login validationWith Body
feat(auth): add role-based login validation
- validate user roles during login
- protect dashboard routes with session guardOne Line
feat(auth): add role-based login validationWith Emoji
✨ feat(auth): add role-based login validationWorkflows
Standard
git add .
cometPreview Only
git add .
comet --previewJSON Output
git add .
comet preview --json
comet analyze --json
comet doctor --jsonForce Type/Scope
git add .
comet --type fix --scope authAuto Push
comet config set gitPush true
git add .
cometLibrary API
import { analyzeStagedChanges, generateCommitBundle } from "@arseno25/comet";
const analysis = await analyzeStagedChanges();
const bundle = await generateCommitBundle();Troubleshooting
No staged changes
git add .
cometOr enable:
comet config set stageAll trueMissing API key
comet config get apiKey
comet doctor
comet config set apiKey your_api_keyCheck active config
comet doctor
comet config pathLicense
MIT. See LICENSE.
