Smart changelog generator with interactive web editor. Built with Bun + TypeScript.
- π Analyze Git commits with pattern filtering
- π Interactive web editor
- π·οΈ 4 commit types: Feature, Bug Fix, Security, Refactor
- π¦ Group multiple commits into one entry
- π Export to Markdown, HTML, or JSON
- π― Filter, search, and sort in HTML output
- Bun installed
# Clone and install
git clone git@github.com:BElluu/Changeolog.git
cd Changeolog
bun install
# Link globally
bun linkNote: On Linux/Mac, you may need to make the CLI executable:
chmod +x src/cli.tsNote: After running bun link, you can use Changeolog instead of bun run src/cli.ts.
# Basic usage
bun run src/cli.ts analyze --from v1.0.0
# Or after linking: Changeolog analyze --from v1.0.0
# With pattern filter (e.g., version numbers)
bun run src/cli.ts analyze --from v1.0.0 --pattern "\\[25\\.4\\.\\d+\\.\\d+\\]"
# Custom range and repository path
bun run src/cli.ts analyze --from abc123 --to def456 --repo /path/to/repo
# Custom application name (appears in changelog header)
bun run src/cli.ts analyze --from v1.0.0 --name "My Awesome App"
# Show help
bun run src/cli.ts --helpThis creates .Changeolog_stage.json with all commits.
Available Options:
--from <ref>- Start commit/tag (required)--to <ref>- End commit/tag (default: HEAD)--repo <path>- Repository path (default: current directory)--pattern <regex>- Message pattern filter--name <name>- Application name for changelog (default: "Changeolog")
# Start web editor on default port (3000)
bun run src/cli.ts web
# Start on custom port
bun run src/cli.ts web --port 8080Open http://localhost:3000 (or your custom port) in your browser.
Web Editor Features:
- β Include/exclude commits
- π·οΈ Change commit types (Feature, Bug, Security, Refactor)
- βοΈ Edit commit messages
- π¦ Group multiple commits into one entry
- π Search by message, author, or hash
- π― Filter by type
βοΈ Sort by date, author, type, or message- πΎ Export to Markdown, HTML, or JSON
In the web interface, click:
- π Markdown - Generate CHANGELOG.md
- π HTML - Generate interactive HTML with filters
- Choose template: Full (with summary, dates, references) or Simple (type and description only)
- Choose language: English or Polish
- π JSON - Generate structured JSON
HTML Export Options:
- Full template: Includes summary statistics, filters, search, and detailed table with dates and authors
- Simple template: Minimal design with only type badges and descriptions
- Language: English or Polish (affects section titles and labels)
bun run src/cli.ts cleanFilter commits by message pattern:
# Only commits with version numbers like [25.4.101.504]
bun run src/cli.ts analyze --from v1.0.0 --pattern "\\[25\\.4\\.\\d+\\.\\d+\\]"
# Only commits starting with ticket number
bun run src/cli.ts analyze --from v1.0.0 --pattern "^JIRA-\\d+"
# Only commits with specific prefix
bun run src/cli.ts analyze --from v1.0.0 --pattern "^\\[RELEASE\\]"In the web editor:
- Select multiple commits using checkboxes
- Click "π¦ Group Selected"
- Enter a group message
- Select group type
- Click "Create Group"
Groups appear as single entries in the changelog with a badge showing commit count.
Commit types are automatically detected from commit messages. The classifier supports both English and Polish keywords.
| Type | Emoji | Color | Auto-detected from |
|---|---|---|---|
| Feature | β¨ | Green | feat, feature, add, new, implementfunkcja, nowa funkcja, dodaj, nowy, implementuj, wdroΕΌ |
| Bug Fix | π | Red | fix, bug, issue, errornapraw, bΕΔ
d, problem |
| Security | π | Orange | security, sec, vulnerability, cvebezpieczeΕstwo, podatnoΕΔ, wraΕΌliwoΕΔ, zagroΕΌenie |
| Refactor | β»οΈ | Blue | refactor, restructure, clean up, extractrefaktoryzuj, przebuduj, przeorganizuj, uporzΔ
dkuj, wyodrΔbnij |
If no pattern matches, commits default to Feature type. You can manually change types in the web editor.
# Changelog
## [Unreleased] - 2024-01-15
### β¨ Features
- Added authentication (John Doe) `abc123`
- New dashboard (Jane Smith) [Group]
### π Bug Fixes
- Fixed memory leak (John Doe) `def456`Full Template:
- Interactive page with filters and search
- Summary statistics cards
- Sortable table with type, description, author, date, and reference
- Search functionality
- Filter by commit type
- Sort by type, author, or date
- Responsive design
- Available in English and Polish
Simple Template:
- Minimal design focused on content
- Type badges and descriptions only
- Clean, readable layout
- Available in English and Polish
{
"version": "Unreleased",
"date": "2024-01-15",
"groups": [...],
"commits": [...],
"stats": {...}
}.Changeolog_stage.json:
{
"version": "1.0",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z",
"fromRef": "v1.0.0",
"toRef": "HEAD",
"pattern": "\\[25\\.4\\.\\d+\\.\\d+\\]",
"appName": "Changeolog",
"commits": [
{
"hash": "abc123...",
"shortHash": "abc123",
"message": "Added feature",
"author": "John Doe",
"email": "john@example.com",
"date": "2024-01-15T10:00:00Z",
"type": "feature"
}
],
"groups": [
{
"id": "group_1234567890",
"commits": ["abc123", "def456"],
"message": "Major refactoring",
"type": "refactor",
"author": "John Doe",
"date": "2024-01-15T10:00:00Z"
}
],
"excluded": ["xyz789"]
}Fields:
version- Stage file format versioncreatedAt- When the stage file was first createdupdatedAt- Last modification timestampfromRef/toRef- Git reference rangepattern- Optional regex pattern used for filteringappName- Application name (from--nameoption or default)commits- Array of all analyzed commitsgroups- Array of commit groups created in web editorexcluded- Array of commit hashes excluded from changelog
# Run in watch mode
bun --watch src/cli.ts analyze --from v1.0.0
# Run web server
bun --watch src/cli.ts web
# Build
bun build src/cli.ts --outdir dist --target bun# 1. Analyze commits with version pattern and custom app name
bun run src/cli.ts analyze --from v24.1.0 --pattern "\\[25\\.4\\.\\d+\\.\\d+\\]" --name "MyApp"
# Output:
# π Analyzing commits...
#
# β
Analyzed 42 commits
#
# π Breakdown:
# β¨ Features: 15
# π Bug Fixes: 20
# π Security: 3
# β»οΈ Refactor: 4
#
# π Pattern: \[25\.4\.\d+\.\d+\]
#
# β
Saved to .Changeolog_stage.json
#
# π‘ Next: Run "Changeolog web" to edit commits
# 2. Open web editor (on custom port if needed)
bun run src/cli.ts web --port 3000
# 3. In browser (http://localhost:3000):
# - Review and edit commits
# - Change commit types if needed
# - Edit commit messages for clarity
# - Group related commits
# - Exclude irrelevant commits
# - Export to desired format:
# * Markdown for version control
# * HTML (Full) for sharing with team
# * HTML (Simple) for documentation
# * JSON for programmatic use
# 4. Done! Your changelog is ready# Analyze commits between two specific tags
bun run src/cli.ts analyze --from v1.0.0 --to v2.0.0
# Analyze commits using commit hashes
bun run src/cli.ts analyze --from abc123def --to HEAD
bun run src/cli.ts analyze --from abc123def --to def456ghi
# Analyze commits from different repository
bun run src/cli.ts analyze --from v1.0.0 --repo ../other-project
# Analyze only commits with JIRA ticket numbers
bun run src/cli.ts analyze --from v1.0.0 --pattern "^JIRA-\\d+"
# Analyze with custom app name
bun run src/cli.ts analyze --from v1.0.0 --name "Production App"
# Start web editor on different port
bun run src/cli.ts web --port 8080- Use pattern filtering to only include relevant commits (e.g., version tags, ticket numbers)
- Group related commits for cleaner, more readable changelog
- Review commit types - auto-classification isn't perfect, adjust in web editor
- Edit messages for clarity and consistency
- HTML export (Full) is best for sharing (has interactive filters and search)
- HTML export (Simple) is great for embedding in documentation
- Use
--nameto customize the application name in changelog headers - Polish keywords are supported for commit type detection
- Check that the
--fromreference exists:git tagorgit log --oneline - Verify the pattern regex is correct (use
--patternoption) - Ensure you're in a Git repository or specify
--repopath
- Run
analyzecommand first before starting the web editor - Check that
.Changeolog_stage.jsonexists in the current directory
- Use
--portoption to specify a different port:bun run src/cli.ts web --port 8080
- Test your regex pattern separately first
- Remember to escape special characters:
\\[for[,\\.for. - Use online regex testers to verify your pattern
- Manually change types in the web editor
- The classifier uses keyword matching - exact matches work best
Changeolog/
βββ src/
β βββ cli.ts # CLI entry point and command handling
β βββ types/
β β βββ index.ts # TypeScript types and commit type configs
β βββ git/
β β βββ parser.ts # Git commit parser using simple-git
β βββ classifier/
β β βββ index.ts # Commit type classifier (EN/PL keywords)
β βββ stage/
β β βββ index.ts # Stage file (.Changeolog_stage.json) manager
β βββ web/
β βββ server.ts # Bun HTTP server for web editor
β βββ editor.ts # Interactive web editor HTML/JS
β βββ generators.ts # Export generators (Markdown, HTML, JSON)
βββ dist/ # Build output (after bun build)
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
Key Components:
- cli.ts: Handles command-line arguments and orchestrates workflow
- git/parser.ts: Parses Git commits using simple-git library
- classifier/index.ts: Classifies commits into types using keyword patterns
- stage/index.ts: Manages the stage file (save, load, update)
- web/server.ts: Serves the editor and handles API endpoints
- web/editor.ts: Client-side interactive editor with filtering and editing
- web/generators.ts: Generates changelog in different formats
MIT