Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ One tool, multiple projects, multiple LLM providers (Anthropic / OpenAI / Bedroc

## Install

cliff-notes is published as a raw source repo (no compiled binary yet). Two ways to use it:
cliff-notes is published as a raw Bun source repo (no compiled binary yet). Two ways to use it:

```sh
# Ad-hoc, no install
Expand All @@ -37,14 +37,18 @@ model = "claude-sonnet-4-6"

[project]
name = "my-project"
audience = "internal-devs"
voice = "concise, technical, no marketing fluff"
audience = "end-users of the application"
voice = "clear, user-focused, concise, no marketing fluff"
```

Then export the relevant API key (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or AWS credentials for Bedrock).

If the project doesn't already have a `cliff.toml`, cliff-notes uses a bundled default. Override via `git_cliff.config = "path/to/cliff.toml"`.

By default, cliff-notes runs a curation pass before rewriting entries. Commits sharing a PR number are grouped deterministically; remaining commits can be grouped or omitted by the model when the schema validates the full partition. Omission decisions use `project.audience` as free-form guidance, so external-user or operator notes can skip test-only and internal-only churn while maintainer notes can keep those changes when useful. Set `[curation] strategy = "by-pr-only"` for deterministic PR grouping only, or `"off"` for one bullet per commit. Use `--show-curation` to print the proposed groups and omissions before rewrite.

GitHub PR enrichment reuses existing credentials: `GITHUB_TOKEN`, `GH_TOKEN`, or `gh auth token`. In GitHub Actions, `GITHUB_TOKEN` and `GITHUB_REPOSITORY` are enough for git-cliff PR enrichment; locally, an authenticated `gh` CLI is sufficient. Set `[github] enabled = false` to skip token/repo resolution.

## Use

```sh
Expand All @@ -62,6 +66,9 @@ cliff-notes --tag v1.2.3 --out release-notes.md

# Skip the confirmation prompt
cliff-notes --tag v1.2.3 --yes

# Print grouping and omission decisions before rewrite
cliff-notes --unreleased --dry-run --show-curation
```

Either `--tag <version>` or `--unreleased` is required — cliff-notes does not infer version numbers.
Expand All @@ -84,7 +91,7 @@ Each generated section ends with an HTML comment containing the raw git-cliff en
-->
```

The block makes drift between raw commits and LLM rewrites diffable in code review. The marker version (`v1`) lets future cliff-notes re-render from the raw input without re-querying git.
Grouped entries list every member commit in the audit block. Omitted commits do not appear as rendered bullets, but they are still listed in the audit block with the model's reason. The block makes drift between raw commits and LLM rewrites diffable in code review. The marker version (`v1`) lets future cliff-notes re-render from the raw input without re-querying git.

## Goreleaser integration (recipes)

Expand Down
23 changes: 21 additions & 2 deletions cliff-notes.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ model = "claude-sonnet-4-6"

[project]
name = "my-project"
audience = "internal-devs"
voice = "concise, technical, no marketing fluff"
audience = "end-users of the application"
voice = "clear, user-focused, concise, no marketing fluff"

[prompt]
# Optional. Appended to the baseline system prompt — use to teach the LLM
Expand All @@ -37,6 +37,25 @@ voice = "concise, technical, no marketing fluff"
# own bundled default.
# config = "cliff.toml"

[curation]
# strategy = "auto" # default. PR prefilter + LLM curation on residual.
# "by-pr-only" runs only deterministic PR grouping.
# "off" keeps one changelog bullet per commit.
# omit_plumbing = true # LLM may suppress changes that are not meaningful
# to the configured project.audience. Audience examples are guidance, not an
# exhaustive list: external-user/operator notes can omit test-only changes and
# developer-only churn, while maintainer notes can keep those when useful.
# Omissions remain in the audit block.
# min_group_size = 2
# max_per_group = 5
# max_index_gap = 15 # LLM cannot group commits more than 15 positions apart.
# require_same_type = true # reject LLM groups that mix conventional commit groups.
# cache = true # content-hash cache for deterministic curation reruns.

[github]
# enabled = true # reuse gh/GITHUB_TOKEN credentials for git-cliff PR enrichment.
# repo = "owner/name" # optional; default autodetected from env, gh, or origin.

[output]
changelog_file = "CHANGELOG.md"
date_format = "%Y-%m-%d"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.1.0",
"description": "Controlled LLM changelog generator (git-cliff + structured LLM)",
"bin": {
"cliff-notes": "./dist/cli.js"
"cliff-notes": "./src/cli.ts"
},
"files": [
"dist",
"src",
"cliff.toml",
"cliff-notes.example.toml",
"README.md"
Expand Down
Loading
Loading