https://github.com/mostafa-drz/genshell
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.
https://github.com/mostafa-drz/genshell
ai chatgpt cli gemini nodejs npm openai shell typescript
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/mostafa-drz/genshell
- Owner: mostafa-drz
- Created: 2024-05-02T20:11:59.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T19:50:01.000Z (about 2 years ago)
- Last Synced: 2025-03-27T09:46:58.993Z (over 1 year ago)
- Topics: ai, chatgpt, cli, gemini, nodejs, npm, openai, shell, typescript
- Language: TypeScript
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```sh
npm install -g genshell
```
## Configuration
You can configure multiple profiles and switch between them.
### Add a Profile
```sh
genshell config add --profile-name --api-key --model --provider
```
### Update a Profile
```sh
genshell config update --profile-name --api-key --model --provider
```
### List Profiles
```sh
genshell config list
```
### Show active Profile
```sh
genshell config active
```
### activate a different Profile
```sh
genshell config activate
```
### Remove Profile
```sh
genshell config remove --profile-name
```
## Usage
To generate a shell command:
```sh
genshell "description of the command"
```
To generate and execute the command:
```sh
genshell "description of the command" --execute
```
## Examples
```sh
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](https://platform.openai.com/docs/guides/text-generation) for a list of supported models by OpenAI API.
#### For Gemini
Check [here](https://ai.google.dev/gemini-api/docs/models/gemini) for a list of supported models by Gemini API.