Zhengqbbb / cz-git

cz-git | czg 🛠️ DX first and more engineered, lightweight, customizable, standard output format Commitizen adapter and CLI
https://cz-git.qbb.sh
MIT License
1.05k stars 39 forks source link

[Feature Request] Provide recipe for OpenAI when using Commitizen CLI + cz-git setup #144

Closed jaklan closed 11 months ago

jaklan commented 1 year ago

💭 Describe the feature

Hi, at the moment docs related to OpenAI integration focus on a scenario when you use czg CLI tool. I wish we have a better description how to work with the integration when we use Commitizen CLI + cz-git setup, similar to the one you provided in the original issue:

commitizen + cz-git:

  • if setting export CZ_OPENAI_TOKEN="xxxx" on .zshrc and .bashrc

    • czai=1 cz: Turn on openAI generate subject mode
    • if useAI is true just run cz or git cz
  • if none setting .zshrc or .bashrc can use:

    • CZ_OPENAI_TOKEN="xxxx" czai=1 cz or CZ_OPENAI_TOKEN="xxxx" openai=1 git cz

so I would especially highlight the fact that we have 3 ways to set up the OpenAI key:

and 2 ways to trigger commitizen with AI: