VT Code uses git-cliff for automated changelog generation from Git commit history. This provides consistent, well-formatted changelogs that follow conventional commit standards.
Install git-cliff using Cargo:
cargo install git-cliffOr use it via Docker without installation:
docker run --rm -v "$(pwd):/app" -w /app ghcr.io/orhunp/git-cliff:latest --config cliff.tomlThe configuration file cliff.toml is located at the project root. It defines:
- Commit parsing rules: How to parse conventional commits
- Grouping: How to organize commits by type (Features, Bug Fixes, etc.)
- Filtering: Which commits to exclude (version bumps, release commits)
- Template: The Markdown format for changelog entries
CHANGELOG.md is linted by scripts/check_markdown.py, so the template is kept lint-clean by construction.
When editing cliff.toml, regenerate and lint the result:
git-cliff --config cliff.toml -o /tmp/changelog.md
bun x --silent markdownlint-cli2@0.23.3 --config .markdownlint-cli2.jsonc /tmp/changelog.mdKeep exactly one blank line around headings and lists. git-cliff's \ line-continuation swallows the newline
and any following blank lines or indentation, so a blank line survives only when the preceding line does not
end with \. Keep the author space inside the {% if %} for commit.remote.username, otherwise a missing
username leaves a trailing space (MD009). The header emits a file-level markdownlint-disable for the rules
that arbitrary commit subjects can violate: MD012 (a full regeneration leaves a blank line at end-of-file),
MD013 (unbounded line length), MD024 (tags that normalize to the same version heading), and MD033 (subjects
containing <Type>). These depend on commit text, not on the template.
The following conventional commit types are recognized:
| Type | Section | Included |
|---|---|---|
feat |
Features | v |
fix |
Bug Fixes | v |
perf |
Performance | v |
refactor |
Refactors | v |
security |
Security | v |
docs |
Documentation | v |
test |
Tests | v |
build |
Build | v |
ci |
CI | v |
deps |
Dependencies | v |
chore |
Chores | x (excluded) |
git-cliff can operate in two modes:
Online mode (recommended): Fetches GitHub usernames from commit metadata
export GITHUB_TOKEN=$(gh auth token) # Get token from gh CLI
git-cliff --config cliff.toml --tag "0.82.4" --unreleasedBenefits:
- Shows actual GitHub usernames with @ prefix (e.g.,
@vinhnx) - Works with outside contributors automatically
- No hardcoded email mappings needed
Offline mode: Uses git commit author name (no API calls)
git-cliff --config cliff.toml --tag "0.82.4" --unreleasedNote: Offline mode shows the full git author name as-is (e.g., Vinh Nguyen).
The release script automatically detects and uses your GitHub token if available.
# Generate changelog for a specific version (for releases)
git-cliff --config cliff.toml --tag "0.82.4" --unreleased --output CHANGELOG.md
# Preview before writing
git-cliff --config cliff.toml --tag "0.82.4" --unreleased# Generate complete changelog from all tags
git-cliff --config cliff.toml --output CHANGELOG.md
# Preview without writing to file
git-cliff --config cliff.toml# Last 3 versions
git-cliff --config cliff.toml --latest 3
# Last version only
git-cliff --config cliff.toml --latest 1# Specific tag range
git-cliff --config cliff.toml v0.80.0..v0.82.0
# From specific tag to HEAD
git-cliff --config cliff.toml v0.80.0..HEADThe release script (scripts/release.sh) automatically uses git-cliff when available:
- Check for git-cliff: Script checks if
git-cliffis installed - Generate changelog: Creates formatted changelog entry for the new version
- Generate release notes: Creates GitHub Release body from changelog
- Fallback: If git-cliff is not available, uses built-in changelog generator
# Dry run to preview changelog
./scripts/release.sh --patch --dry-run
# Create release (git-cliff will be used automatically)
./scripts/release.sh --patchVT Code follows Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
# Feature
feat(wizard): implement freeform text input for wizard modals
# Bug fix
fix(indexer): resolve memory leak in document processing
# Refactor
refactor(core): simplify agent state management
# Documentation
docs(prompts): enhance system prompt guidelines
# Performance
perf(search): optimize tree-sitter parsing speedThe following commit patterns are automatically excluded from the changelog:
chore(release):- Release automation commitsbump version- Version number updatesupdate version- Version-related updatesrelease v*- Release tag commitsupdate homebrew- Homebrew formula updatesupdate changelog- Changelog update commitsupdate TODO/update TODOs/update project TODO(any case) - Owner-onlydocs/project/TODO.mdchurnupdate project(exact, any case) - Owner-only project-file churn- Bare
Update .../Updates ...subjects (any case, e.g.Update README,Update docs) - Owner maintenance noise. Conventional commits that merely contain "update" (e.g.docs: update ...,refactor: update TODO with ...) are still included.
git-cliff matches commit_parsers and exclude_patterns against the full commit
message (subject + body). Every skip/exclude pattern in cliff.toml is therefore
anchored to the subject line (^ matches message start; [^\n]* cannot cross a
newline). Without this anchoring, a commit whose body merely mentions an excluded
file — for example a merge-conflict note like # Conflicts: docs/project/TODO.md —
is dropped from the changelog even though its subject describes a real change. This
silently hid 29 real entries (including conventional ones such as
refactor: update TODO with ..., because the old unanchored skip rules sat before
the type-group rules and first-match-wins skipped them too) until the patterns
were anchored. When adding new skip rules, keep them subject-anchored.
To customize the changelog format, edit cliff.toml:
[git.commit_parsers]
{ message = "^style", group = "Styles" },Edit the order in the template body section:
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}
{% for commit in commits %}
- {{ commit.message }}
{% endfor %}
{% endfor %}
The template uses Tera templating:
## {{ version }} - {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group }}
{% for commit in commits %}
- {{ commit.message | upper_first }} ({% if commit.remote.username %}@{{ commit.remote.username }}{% endif %})
{% endfor %}
{% endfor %}
# Install git-cliff
cargo install git-cliff
# Verify installation
git-cliff --versionCheck that commit messages follow conventional commit format:
# View recent commits
git log --oneline -10
# Test parsing with git-cliff
git-cliff --config cliff.toml --unreleasedgit-cliff fetches GitHub usernames from commit metadata. Ensure:
- Commits are associated with a GitHub account
- Git remote is properly configured
- Network access is available for API calls