Categorygithub.com/emicklei/gemini-code-explain

# README

gemini-code-explain

Use Google Gemini API to produce a design description from a Go package.

install

go install github.com/emicklei/gemini-code-explain/cmd/gemini-code-explain@latest

usage

GEMINI_API_KEY=YOUR_TOKEN gemini-code-explain -gopkg github.com/emicklei/[email protected]

Optionally, you can override the model used, currently it is set to:

GEMINI_MODEL=gemini-1.5-pro

Here is how to get a Gemini API Key.

output examples

how it works

After downloading the package sources, I will create an LLM context window with all sources:

  • skipping all *_test.go files
  • stripping the bodies for each declared function found in the remaining *.go files
  • asking the LLM model to describe the design of this Go software (prompt).

custom prompt

GEMINI_API_KEY=YOUR_TOKEN gemini-code-explain -prompt myprompt.txt -gopkg github.com/emicklei/[email protected]

© 2024, ernestmicklei.com. MIT License. Contributions welcome.

# Packages

No description provided by the author
No description provided by the author