GenCLI is an AI-powered CLI tool built with Golang that answers your questions using the Google Gemini API. It is developed with Cobra and more.
To get started with GenCLI, you can install it using the following method:
To install the CLI, use the command below:
go install github.com/Pradumnasaraf/gencli@latest
Go will automatically install it in your $GOPATH/bin
directory, which should be in your $PATH
.
Once installed, you can use the gencli
CLI command. To confirm installation, type gencli
at the command line.
GenCLI uses the Google Gemini API, so you need to set the API key. To get the API key (It's FREE), visit here and set it in the environment variable GEMINI_API_KEY
:
export GEMINI_API_KEY=<API_KEY>
The above method sets the API key for the current session only. To set it permanently, add the above line to your .bashrc
or .zshrc
file.
Note: If you encounter the error
command not found: gencli
, you need to add$GOPATH/bin
to your$PATH
environment variable. For more details, refer to this guide.
Usage:
gencli [flags]
gencli [command]
Available Commands:
help Help about any command
image Know details about an image (Please put your question in quotes)
search Ask a question and get a response (Please put your question in quotes)
update Update gencli to the latest version
version Know the installed version of gencli
Flags:
-h, --help help for gencli
eg: gencli search "What is kubernetes" --words 525
eg: gencli image "What is this image about?" --path /path/to/image.jpg --format jpg
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.
If you discover a security vulnerability within this project, please check the SECURITY for more information.