Skip to content

A command-line tool to execute natural language instructions using AI.

Notifications You must be signed in to change notification settings

kabiru-js/jasmine-cli

Repository files navigation

Jasmine CLI 🌿

A command-line tool to execute natural language instructions using Google's Gemini AI. Type in plain English; get back shell commands.

Jasmine Demo GIF

Features

  • Natural Language to Shell: Converts English instructions into executable shell commands.
  • OS Aware: Automatically generates commands for Windows, macOS, and Linux.
  • Interactive Confirmation: Always shows you the commands and asks for approval before running.
  • Safety First: Includes a safety layer to block potentially destructive commands (rm -rf, sudo, etc.).
  • Shortcuts: Blazing-fast shortcuts for common commands (e.g., clone, code) that bypass the AI.
  • Command History: Keeps a log of all executed commands (jasmine --history).

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/jasmine.git
    cd jasmine
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the environment:

    • On Windows: .\venv\Scripts\activate
    • On macOS/Linux: source venv/bin/activate
  4. Install the project and its dependencies:

    pip install -e .

Configuration

The tool requires Google Gemini API keys to function.

  1. Copy the example config:

    cp config.example.json config.json
  2. Edit config.json: Open the config.json file and replace "YOUR_API_KEY_HERE" with your actual Gemini API keys. You can get keys from Google AI Studio.

    {
      "api_keys": [
        "AIzaSy...key1",
        "AIzaSy...key2"
      ]
    }

Usage

Once installed and configured, you can use the jasmine command from your terminal (while the venv is active).

Normal Command:

jasmine show the current date and time

Using a Shortcut:

jasmine clone https://github.com/some/repo.git

Viewing History:

jasmine --history

About

A command-line tool to execute natural language instructions using AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages