Structured Changelog¶
A canonical, deterministic changelog framework with JSON IR and Markdown rendering.
Structured Changelog provides a machine-readable JSON Intermediate Representation (IR) as the source of truth for your changelog, with deterministic Markdown generation for human readability. It supports optional security metadata (CVE, GHSA, SARIF) and SBOM information.
Overview¶
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CHANGELOG.json │ ───> │ Renderer │ ───> │ CHANGELOG.md │
│ (Canonical IR) │ │ (Deterministic) │ │ (Human-Readable)│
└─────────────────┘ └─────────────────┘ └─────────────────┘
Key Principles¶
- JSON IR is canonical — Markdown is derived, not the source of truth
- Deterministic rendering — Same input always produces identical output
- Keep a Changelog format — Compatible with keepachangelog.com
- Semantic Versioning — Follows semver.org conventions
- Extensible metadata — Optional security (CVE/GHSA/SARIF) and SBOM fields
- Spec + tooling together — Single source of truth for humans and machines
Installation¶
Homebrew (macOS/Linux)¶
This installs the schangelog CLI (also available as structured-changelog).
Go Install¶
Go Library¶
Quick Start¶
Define your changelog in JSON¶
{
"irVersion": "1.0",
"project": "my-project",
"releases": [
{
"version": "1.0.0",
"date": "2026-01-03",
"added": [
{ "description": "Initial release with core features" }
]
}
]
}
Generate Markdown¶
package main
import (
"fmt"
"github.com/grokify/structured-changelog/changelog"
"github.com/grokify/structured-changelog/renderer"
)
func main() {
cl, err := changelog.LoadFile("CHANGELOG.json")
if err != nil {
panic(err)
}
md := renderer.RenderMarkdown(cl)
fmt.Println(md)
}
CLI Usage¶
# Validate a changelog
schangelog validate CHANGELOG.json
# Generate Markdown
schangelog generate CHANGELOG.json -o CHANGELOG.md
# Initialize from git tags
schangelog init --from-tags -o CHANGELOG.json
# Merge changelog files
schangelog merge base.json additions.json -o CHANGELOG.json
# Parse commits for LLM-assisted generation
schangelog parse-commits --since=v1.0.0
Documentation¶
- JSON IR Specification — Full schema documentation
- Security Metadata — CVE, GHSA, SARIF fields
- SBOM Metadata — Component tracking
- LLM Guide — AI-assisted changelog generation with TOON format
- Localization Guide — I18N support for 6 languages
- Release Notes Guide — CHANGELOG vs RELEASE_NOTES