git-changelog

TotalClaw 作者 totalclaw

从 git 提交生成变更日志。支持带有日期范围和基于标签的过滤的 Markdown、纯文本和 JSON 输出。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~rogue-agent1-git-changelog-gen
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~rogue-agent1-git-changelog-gen/file -o rogue-agent1-git-changelog-gen.md
## 概述(中文)

从 git 提交生成变更日志。支持带有日期范围和基于标签的过滤的 Markdown、纯文本和 JSON 输出。

## 原文

# Git Changelog

## When to use

Generate a human-readable changelog from git commit history. Works with any git repository.

## Setup

No dependencies required. Uses only git and bash.

## How to

### Basic changelog (last 30 days or since last tag)

```bash
bash scripts/changelog.sh --repo /path/to/repo
```

### Since a specific date

```bash
bash scripts/changelog.sh --repo /path/to/repo --since "2026-01-01"
```

### Date range

```bash
bash scripts/changelog.sh --repo /path/to/repo --since "2026-01-01" --until "2026-02-01"
```

### JSON output (for programmatic use)

```bash
bash scripts/changelog.sh --repo /path/to/repo --format json
```

### Plain text output

```bash
bash scripts/changelog.sh --repo /path/to/repo --format plain
```

## Output Formats

| Format | Description |
|--------|-------------|
| `markdown` | Default. Headers, commit hashes, authors, dates |
| `plain` | Simple bullet list |
| `json` | Array of commit objects with hash, subject, author, date, type |

## Options

| Flag | Description | Default |
|------|-------------|---------|
| `--repo <path>` | Repository path | Current directory |
| `--since <date>` | Start date | Last tag or 30 days ago |
| `--until <date>` | End date | Now |
| `--format <fmt>` | Output format | markdown |
| `--group` | Group by conventional commit type | Off (needs bash 4+) |

## Notes

- Automatically detects the last git tag and uses it as the start point
- Excludes merge commits for cleaner output
- Conventional commit types (feat/fix/docs/etc) are extracted for JSON output
- `--group` mode requires bash 4+ (macOS ships with 3.2; install via `brew install bash`)