genshell
v2.0.1
Published
A command-line interface (CLI) tool that utilizes Google's GeminiAPI or OpenAI's ChatGPT API to generate shell commands from natural language descriptions
Downloads
13
Maintainers
Readme
Genshell
Genshell is a CLI tool that generates shell commands from natural language descriptions using AI models (Google's Gemini and OpenAI's ChatGPT).
Features
- Generate shell commands using natural language descriptions.
- Support for multiple AI providers (Gemini and ChatGPT).
- Configurable profiles to switch between different API keys and models.
- Supports various shell environments (Bash, Zsh, Fish, PowerShell).
Installation
npm install -g genshell
Configuration
You can configure multiple profiles and switch between them.
Add a Profile
genshell config add --profile-name <profileName> --api-key <apiKey> --model <model> --provider <provider>
Update a Profile
genshell config update --profile-name <profileName> --api-key <apiKey> --model <model> --provider <provider>
List Profiles
genshell config list
Show active Profile
genshell config active
activate a different Profile
genshell config activate <profileName>
Remove Profile
genshell config remove --profile-name <profileName>
Usage
To generate a shell command:
genshell "description of the command"
To generate and execute the command:
genshell "description of the command" --execute
Examples
genshell "list all files in the current directory"
# Output: ls -al
genshell "create a new directory named 'my-dir'"
# Output: mkdir my-dir
Profile Details
Providers
chatgpt
: Use OpenAI's ChatGPT for generating shell commands.gemini
: Use Google's Gemini for generating shell commands.
Models
For ChatGPT
Check here for a list of supported models by OpenAI API.
For Gemini
Check here for a list of supported models by Gemini API.