An open API service indexing awesome lists of open source software.

https://github.com/uliboooo/ghost_git_writer

write a git commit message, README or Diff Summary by LLM services.
https://github.com/uliboooo/ghost_git_writer

git llm message writer

Last synced: 26 days ago
JSON representation

write a git commit message, README or Diff Summary by LLM services.

Awesome Lists containing this project

README

          

# ghost writer - `ggw`


Icon

Ghost git writer

[![made-with-Rust](https://img.shields.io/badge/Made%20with-Rust-1f425f.svg)](https://www.rust-lang.org/)

https://uliboooo.github.io/ghost_git_writer/

**⚠️ beta ⚠️** and this doc is unstable to updating now...

## installing

```zsh
cargo install ghost_git_writer
```

### set api key in enviroment variables

- Gemini
- `GGW_GEMINI_API`
- `GEMINI_API_KEY`
- Anthropic
- `GGW_ANTHROPIC_API`
- OpenAI
- `GGW_OPENAI_API`
- Deepseek
- `GGW_DEEPSEEK_API`

## usage

```zsh
ggw [Options]
```

### use other source as diff

```zsh
❯ gda --staged | ggw commit --stdin -m gemini/gemini-2.5-flash
⠏ LLM call...finished. Generated msg:
╭────────────────────────────────────────────────────────────╮
│ feat: Set up Emacs with configuration migrated from Neovim │
╰────────────────────────────────────────────────────────────╯
continue?(y/n)>y
```

- Sub Commands
- `commit`: generate a git commit message from git diff by llm
- `readme`: generate a README from codebase.
- `sumdiff`: generate a summry of changes from git diff
- `which-sem`: in Sem Ver, Output which field should be incremented.
- Global Options(mainly)
- `-m --model`: model sepcific tag. there are tow pattern to specific model.
- `-p --path`: specific woek path. if it's empty, set current dir path.
- `-l --lang`: change output language.(default=english). e.g. `-l japanese`
- `-e --extra`: extra prompt. if you need to append order to llm.
- `--config`: config file path. if you need to locate other than `~/.config/ggw/config.toml` or `~/.ggw.toml`.
- `--oneline`: output only llm's return for cli pipes
- Options for `commit`
- `--auto-commit`: allow auto git commit by generated message
- `-D --diff `: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')
- Options for `readme`
- `-s --source `: source files path. A list of file paths separated by ','.
- `-d --directory `: souce file folder
- `--merge-readme`: allow merge to existing README.md
- Options for `sumdiff`
- `-D --diff `: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')
- Options for `which-sem`
- `-D --diff `: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')

## Examples

```shell
# give `git diff` to command
ggw commit -m gemini/gemini-2.0-flash
ggw commit -m gemini/gemini-3-flash-preview

# gice `git diff 76fd1d0` to command
ggw sumdiff -D 76fd1d0 -m gemini/gemini-2.5-pro
```