From a0e4c6680f03b259499fb59521f202bf0d0bf1be Mon Sep 17 00:00:00 2001 From: Pradumna Saraf Date: Tue, 2 Jul 2024 21:37:14 +0530 Subject: [PATCH] fix: Rename GenCLI to gencli in code files --- .gitignore | 2 +- .gitpod.yml | 2 +- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++--- cmd/rootCmd.go | 2 +- go.mod | 2 +- main.go | 2 +- 6 files changed, 49 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 219d8f7..6b303e9 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,7 @@ bin # Build files -GenCLI +gencli # Env files diff --git a/.gitpod.yml b/.gitpod.yml index b2897cd..4f2765e 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -4,7 +4,7 @@ tasks: go mod download command: | go build . - ./GenCLI + ./gencli github: diff --git a/README.md b/README.md index 0c91125..cad0d0c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,50 @@ # GenCLI -TDB +
-## Build With +[![Releases](https://github.com/Pradumnasaraf/gencli/actions/workflows/releases.yml/badge.svg)](https://github.com/Pradumnasaraf/gencli/actions/workflows/releases.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/Pradumnasaraf/gencli.svg)](https://pkg.go.dev/github.com/Pradumnasaraf/gencli) -- Google Gemini API +
+**GenCLI** is a AI-powered CLI tool that knows answers to all your questions. It is built with [Go](https://github.com/golang/go), [Cobra](https://github.com/spf13/cobra), [Viper](https://github.com/spf13/viper), [Gemini](https://gemini.google.com), etc. + +## 🚀 Getting Started + +To get started with GenCLI, you can install it using the following methods: + +To install the CLI, use the command below: + +```bash +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. + +As it uses the Google Gemini API to we need to set the API key. To get the API key (It's FREE), you need to visit [here](https://aistudio.google.com/app/apikey?_gl=1*1n5ijhw*_ga*MTQxNDQ2MjcyNi4xNzE5MDU4OTE0*_ga_P1DBVKWT6V*MTcxOTkzNTQzOC4zLjEuMTcxOTkzNTQ3My4yNS4wLjEzODczMjU2OA) and set it in the environment variable `GENCLI_API_KEY`. + +```bash +export GENCLI_API_KEY= +``` + +Above method will set the API key for the current session only. To set it permanently, you can add the above line to your `.bashrc` or `.zshrc` file. + +> **Note** If you are getting an error like `command not found: gencli`, then you need to add `$GOPATH/bin` to your `$PATH` environment variable. For that you can refer to [this](https://gist.github.com/Pradumnasaraf/ca6f9a0507089a4c44881446cdda4aa3). + +``` +Usage: + gencli [command] + +Available Commands: + gencli Type your question here +``` + +## 📜 License + +This project is licensed under the Apache-2.0 license - see the [LICENSE](LICENSE) file for details. + +## 🛡 Security + +If you discover a security vulnerability within this project, please check the [SECURITY](SECURITY.md) for more information. diff --git a/cmd/rootCmd.go b/cmd/rootCmd.go index 83a2ae0..17027e1 100644 --- a/cmd/rootCmd.go +++ b/cmd/rootCmd.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/Pradumnasaraf/GenCLI/config" + "github.com/Pradumnasaraf/gencli/config" "github.com/google/generative-ai-go/genai" "github.com/spf13/cobra" "google.golang.org/api/option" diff --git a/go.mod b/go.mod index a6c6d97..01bd1d9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/Pradumnasaraf/GenCLI +module github.com/Pradumnasaraf/gencli go 1.22.4 diff --git a/main.go b/main.go index 5a5b1f7..3e3baa9 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/Pradumnasaraf/GenCLI/cmd" + "github.com/Pradumnasaraf/gencli/cmd" ) func main() {