An open API service indexing awesome lists of open source software.

https://github.com/rajeevtapadia/cli-skill-issue

Bash script to get suggesstions on bash commands from description using Gemini API
https://github.com/rajeevtapadia/cli-skill-issue

bash linux scripts shell-script

Last synced: 5 months ago
JSON representation

Bash script to get suggesstions on bash commands from description using Gemini API

Awesome Lists containing this project

README

          

# CLI Skill Issue

This bash script uses Google Gemini to generate bash commands based on user prompts. It also includes safety measures to prevent the execution of potentially dangerous commands.

## Prerequisites

- Bash
- Gemini API key

## Usage

1. Clone or download the script file (`script.sh`).
1. Move it to `/usr/bin` using command `sudo mv script.sh /usr/bin`
2. Ensure that the script file has execute permission: `sudo chmod +x /usr/bin/script.sh`.
3. Run the script followed by the prompt text. For example:
```bash
script.sh "create a backup of files in current directory"
```
4. Follow the prompts to generate and optionally execute the bash command.

## API Key

To use the Google Gemini, you need to obtain an API key from the [Google AI Studio](https://aistudio.google.com) and replace the placeholder `api_key="YOUR_API_KEY"` in the script with your actual API key.