Code Monkey home page Code Monkey logo

shai's Introduction



shai

 



Command-line assistant powered by AI.

Shai helps you brainstorm commands and remember strange shell incantations.

$ shai command "File path of the largest file within ~/Documents"
find ~/Documents -type f -printf '%s %p\n' | sort -nr | head -1 | cut -d" " -f2-

$ find ~/Documents -type f -printf '%s %p\n' | sort -nr | head -1 | cut -d" " -f2-
/Users/me/Documents/Zoom/2030-11-12 12.54.55 My Zoom Meeting/video128341984.mp4

Features

  • Translate natural language to a shell one-liner

That's it! See As Compared to X for more featureful alternatives and Roadmap for where shai is heading.

Installation

Installation via Pre-built Binaries

Feel free to grab a pre-built binary on the GitHub Releases page.

Your platform doesn't have a binary for it? Check out installing from source below.

Installation via Source

Installing from source is pretty easy if you have Cargo setup:

$ git clone https://github.com/sullvn/shai.git
$ cargo install --path shai

Setup

Shai currently depends on OpenAI's API to work. You will have to make an OpenAI account and create an API key.

Then pass the API key to shai:

#
# Option A: One-time Configuration
#
$ shai configure --openai-api-key <YOUR API KEY>

#
# Option B: Zero Config via Environment Variable
#
$ OPENAI_API_KEY=<YOUR API KEY> shai "Path of the largest file on the system"

As Compared to X

Shai is pretty early along, so you will probably be better served by one of these:

  • aicmd is a very simple CLI frontend to ChatGPT, just like the current state of shai. It requires Node.js to run. shai is a native binary, so has no requirements.
  • AIChat is a native alternative, also made in Rust, that has multiple modes. Looks great!
  • ShellGPT is also a simple frontend to ChatGPT, but has a bunch of modes and configuration options. Python is required.
  • Chatblade is similar to ShellGPT. It has more of a "graphical" text interface. Python is required.
  • Bot Aquarium lets an LLM loose in a Linux Docker container. Actually very similar to the end goal of shai. The only difference is shai will safely automate tasks on your actual machine.
  • Auto-GPT lets an LLM loose on your actual computer, via high-level interactions and scripts. shai will remain focused on lower-level shell and program automation.
  • privateGPT runs a local LLMs through documents on your machine. You can ask questions of them in natural language.

Roadmap

  1. Integrate cowbox for Just Run It ™️ capabilities
  2. Bundle offline LLMs, like LLaMA
  3. Chat mode with history and refining queries
  4. Shell mode which integrates plain commands with AI queries

You May Also Like

  • cowbox – Safely run programs without your files getting borked
  • pvw – Command-line tool which interactively previews command outputs




👋😅



 

shai's People

Contributors

sullvn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.