ai-shell-assistant

command module
v1.0.0-alpha3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 8 Imported by: 0

README

🤖 ai-shell-assistant

Build Status GoDoc Go Report Card GitHub release

This is a simple AI shell helper written in GO. It uses OpenAI API to generate a plausible shell command from a given prompt. As soon as the command is generated, the user can choose to execute it or revise it adding more context.

ai-shell-assistant

Installation

Be sure to have a working Go environment, then run the following command:

$ go install github.com/henomis/ai-shell-assistant@latest
From source code

Clone the repository and build the binary:

$ make
Pre-built binaries

Pre-built binaries are available for Linux and macOS on the releases page.

Usage

⚠️ ai-go-shell requires an OpenAI API key as OPENAI_API_KEY environment variable.

$ ai-shell-assistant print first 3 lines of each file in a directory
Output
    🤖 Here is your command line:

    $ head -n 3 *
    --
    This command uses the `head` utility to print the first 3 lines of each file in the current directory (`*` is a wildcard that matches all files in the directory). The `-n 3` flag specifies that it should print only the first 3 lines.

    [E]xecute, [R]evise, [Q]uit? > 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL