# Release v0.4.0

## New Features

### `gcop-rs stats` - Repository Statistics Command

New `stats` command to display repository commit statistics:

```bash
gcop-rs stats                    # Text format output
gcop-rs stats --format json      # JSON format
gcop-rs stats --format markdown  # Markdown format
gcop-rs stats --author "name"    # Filter by author
```

**Output Example**:

```
ℹ Repository Statistics
========================================

[] Overview
  Total commits:  156
  Contributors:   3
  Time span:      2024-06-15 ~ 2025-12-23 (192 days)

[] Top Contributors
  #1  AptS-1547 <esaps@esaps.net>  142 commits (91.0%)
  #2  bot <noreply@github.com>      8 commits  (5.1%)
  #3  contributor <x@y.com>         6 commits  (3.8%)

[] Recent Activity (last 4 weeks)
  2025-W52: ████████████           12
  2025-W51: ████████████████████   20
  2025-W50: ██████                  6
  2025-W49: ████████████████       16
```

### `--dry-run` Option

`commit` command adds `--dry-run` option to only generate and output commit message without actually committing:

```bash
gcop-rs commit --dry-run
```

Useful for previewing AI-generated commit messages, or getting commit message text in scripts.

### New Git Alias

- `git s` → `gcop-rs stats` - Quick view repository statistics

## Dependency Changes

- Added `chrono = "0.4"` for date/time handling

## Upgrade Notes

Upgrading from v0.3.x requires **no action**, fully backward compatible.

After installing aliases, you can use the `git s` command:

```bash
gcop-rs alias --force  # Update aliases
```

## Installation

```bash
cargo install gcop-rs
```

Or download pre-built binaries from [Releases](https://github.com/AptS-1547/gcop-rs/releases).

## Statistics

```
16 files changed
+751 insertions
-8 deletions
```

## Feedback

If you have any issues or suggestions, please submit an [Issue](https://github.com/AptS-1547/gcop-rs/issues).
