A lightweight global CLI for conventional commits. Install once, use in any repo — no per-project config needed.
Pick the scenario that matches your setup.
Install globally, stage your changes, and run gcv.
No config file required — committy uses conventional commit defaults
out of the box.
# Install once
npm install -g @hussmarsidi/committy
# Stage your changes
git add .
# Run the interactive prompt
gcv
? Type: feat
? Scope: (optional, press Enter to skip)
? Message: add dark mode toggle
→ git commit -m "feat: add dark mode toggle"
In a hurry? Skip the prompt entirely:
gcv feat add dark mode toggle
Run gcv init at your repo root to scaffold a shared
config. Commit .gc.json and every developer gets the
same types, scopes, branch rules, and git hooks automatically on
npm install.
gcv init
? Add default conventional commit types? Yes
? Add scopes now? Yes
? Scope name: api
? Team prefix (optional, press Enter to skip): BACKEND
? Add another scope? Yes
? Scope name: web
? Team prefix (optional, press Enter to skip): FRONTEND
? Add another scope? No
? Add branch naming conventions? Yes
? Add default branch types? Yes
? Add custom patterns? No
? Install git hooks for branch validation? Yes
Created .gc.json
Installed git hooks (core.hooksPath): .gc/hooks
wrote .gc/hooks/post-checkout
Once the config is committed, scope-based commits include the team prefix automatically:
gcv feat api add rate limiting
→ git commit -m "feat(api): BACKEND add rate limiting"
Team prefixes are useful when downstream tooling (Jira, Linear,
Slack integrations) parses commit messages by team. Scopes without
a prefix produce feat(web): message as normal.
After shipping features, gcv bump reads your commits,
infers the semver type, writes the changelog, bumps
package.json, commits, and tags — one command.
# Working tree must be clean before running
gcv bump
Fetching remote tags...
Detected: minor
Current: 1.3.0
Next: 1.4.0
Bumped 1.3.0 → 1.4.0 (minor)
Tagged v1.4.0
# The release commit committy creates:
git log --oneline -3
a1b2c3d chore(release): v1.4.0
e4f5g6h feat(api): add rate limiting
i7j8k9l fix(web): resolve broken avatar upload
The release commit is chore(release): v1.4.0 — a
conventional commit — so it won't surface as a feature or fix in
your next changelog.
Not sure what's about to happen? Run
gcv bump --dry-run first.
Run gcv with no arguments for the interactive prompt.
Pass arguments to commit inline — committy falls back to the prompt
for any missing fields.
# Interactive
gcv
# Inline: type + message
gcv fix update readme
→ git commit -m "fix: update readme"
# Inline: type + scope + message (3 args — always unambiguous)
gcv feat auth add login page
→ git commit -m "feat(auth): add login page"
With exactly 2 args, the second token is checked against your
configured scopes. If it matches a scope, committy treats it as
the scope and prompts for a message. If it doesn't match, it's
treated as the message.
Example: gcv fix auth — if auth is a
configured scope, you'll be prompted for a message instead of
committing. Use 3 args to be explicit:
gcv fix auth <message>.
| Args | Parsed as |
|---|---|
| gcv | interactive prompt |
| gcv <type> <message> | type + message — when 2nd arg is not a known scope |
| gcv <type> <scope> | type + scope — prompts for message when 2nd arg is a known scope |
| gcv <type> <scope> <message...> | type + scope + message — explicit, no ambiguity |
Interactive branch name builder that reads your
branches config, prompts for each placeholder, and
runs git switch -c. Pass a full name inline to skip
the prompt.
# Interactive — guided by your branch config
gcv branch
? Pattern: {type}/{description}
? Type: feat
? Description: add-login-page
→ git switch -c feat/add-login-page
# Inline — validates against config, then creates
gcv branch feat/add-login-page
→ git switch -c feat/add-login-page
# Validate only — exits 0 or 1, no branch created
gcv branch validate feat/add-login-page
If no branches config is present, inline create still
works — it just skips validation. Description input is
auto-kebab-cased: spaces become hyphens, uppercase is lowered.
The post-checkout hook installed by
gcv init validates branch names even when someone uses
git switch directly, bypassing gcv branch.
If gcv isn't installed on a machine, the hook exits
cleanly — it never breaks the workflow.
| Environment | What gets written |
|---|---|
| No Husky |
.gc/hooks/post-checkout +
prepare script sets
core.hooksPath
|
| Husky detected |
.gc/hooks/post-checkout + delegation line
appended to .husky/post-checkout
|
gcv changelog prints to stdout — it does not write a
file. Use it to preview, pipe, or compose. gcv bump is
what writes CHANGELOG.md.
# Preview unreleased commits
gcv changelog
# Preview from a specific tag
gcv changelog --from v1.2.0
# Pipe to clipboard
gcv changelog | pbcopy
# Write to a release notes file manually
gcv changelog > RELEASE_NOTES.md
| Flag | Description |
|---|---|
| --from <tag> | Start range from a specific git tag or commit |
Only conventional commits appear in the output — non-conventional commits are silently excluded.
Requires a clean working tree. Reads commits since the last tag,
infers the semver bump type, generates the changelog, updates
package.json, commits, and tags — in one step.
# Auto-detect bump type from commits
gcv bump
Bumped 1.3.0 → 1.4.0 (minor)
Tagged v1.4.0
# Override bump type manually
gcv bump --major
gcv bump --minor
gcv bump --patch
# Preview what would happen — no files written
gcv bump --dry-run
Detected: minor
Current: 1.3.0
Next: 1.4.0
--dry-run: no files written, no commit, no tag.
# Bump and changelog — skip tagging
gcv bump --no-tag
| Flag | Description |
|---|---|
| --major | Force a major bump |
| --minor | Force a minor bump |
| --patch | Force a patch bump |
| --dry-run | Print detected type and next version — no changes made |
| --no-tag | Skip git tag creation |
Bump type is inferred from commits: feat → minor ·
fix / chore / others → patch · breaking
change footer → major.
If CHANGELOG.md doesn't exist when you first run
gcv bump, it generates the full commit history before
prepending the new release — no setup needed on a greenfield repo.
Scaffolds a .gc.json in the current directory through
an interactive prompt. Commit this file so the whole team shares the
same configuration.
gcv init
The prompt walks through:
| Step | What it does |
|---|---|
| Commit types | Use conventional commit defaults or define your own |
| Scopes | Add scope names with optional team prefixes |
| Branch conventions | Add branch patterns and allowed types (optional) |
| Git hooks | Install post-checkout for branch validation (optional) |
If .gc.json already exists, init asks before
overwriting. If you're not at the repo root, it warns you before
writing.
Optional. committy walks up from your current directory to find the nearest config. Malformed JSON prints an error and exits — no silent fallback.
{
"types": ["feat", "fix", "chore", "docs", "refactor", "test"],
"scopes": [
{ "name": "api", "team": "BACKEND" },
{ "name": "web", "team": "FRONTEND" },
{ "name": "deps" }
],
"branches": {
"allowed": ["{type}/{description}", "{type}/{ticket}-{description}"],
"types": ["feat", "fix", "hotfix", "release", "chore"]
}
}
| Field | Type | Required | Description |
|---|---|---|---|
| types | string[] | Yes | Non-empty list of allowed commit types |
| scopes | object[] | Yes | Scope definitions — can be empty [] |
| scopes[].name | string | Yes | Scope identifier used in commits |
| scopes[].team | string | No |
Prefix inserted before the commit message — e.g.
feat(api): BACKEND message
|
| branches | object | No | Omit to skip branch validation entirely |
| branches.allowed | string[] | Yes* |
Patterns using {type},
{ticket}, {description}
placeholders
|
| branches.types | string[] | Yes* |
Allowed values for the {type} placeholder
|
* Required when branches is present. Placeholder
rules: {type} matches values from
branches.types; {ticket} matches
PROJ-123 format; {description} matches
kebab-case words.
Default types when no config is present:
feat fix chore docs refactor test style perf ci build revert
| Command | Description |
|---|---|
| gcv | Interactive commit prompt |
| gcv <type> [scope] <message> | Inline commit |
| gcv branch | Interactive branch name builder |
| gcv branch <name> | Inline branch create — validates then runs git switch -c |
| gcv branch validate <name> | Validate a branch name — exits 0 or 1 |
| gcv init | Scaffold .gc.json and optionally install git hooks |
| gcv changelog | Print unreleased commits to stdout |
| gcv changelog --from <tag> | Print from a specific tag |
| gcv bump | Auto-detect semver, write changelog, commit, tag |
| gcv bump --major/--minor/--patch | Override bump type |
| gcv bump --dry-run | Preview bump — no changes made |
| gcv bump --no-tag | Bump and changelog without git tag |
| gcv --help / -h | Print usage |
| gcv --version / -v | Print installed version |