Skip to content

Genshell A CLI tool that generates shell commands from natural language descriptions using AI models (Google's Gemini and OpenAI's ChatGPT). Supports multiple profiles, various shell environments, and easy configuration management.

Notifications You must be signed in to change notification settings

mostafa-drz/genshell

Repository files navigation

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.

About

Genshell A CLI tool that generates shell commands from natural language descriptions using AI models (Google's Gemini and OpenAI's ChatGPT). Supports multiple profiles, various shell environments, and easy configuration management.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published