Skip to content

Uliboooo/ghost_git_writer

Repository files navigation

ghost writer - ggw

Icon
Ghost git writer

made-with-Rust

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

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

installing

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

ggw <COMMAND> [Options]

use other source as diff

❯ 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 <DIFF_COMMIT>: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')
  • Options for readme
    • -s --source <source file list>: source files path. A list of file paths separated by ','.
    • -d --directory <source dir>: souce file folder
    • --merge-readme: allow merge to existing README.md
  • Options for sumdiff
    • -D --diff <DIFF_COMMIT>: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')
  • Options for which-sem
    • -D --diff <DIFF_COMMIT>: specify commit hash or tag or git symbolic ref(e.g. 'HEAD')

Examples

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

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published