Giter Club home page Giter Club logo

jarvis's Introduction

Jarvis - A Terminal Assistant for concise Shell Commands

This is a terminal assistant for remembering shell commands. It utilizes the OpenAI API to provide concise commands based on user input.

Peek 08-03-2024 07-26

Install

Unix/Based:

# clone the repo to .config files
$ git clone https://github.com/nywton/jarvis.git ~/.config/jarvis

# give execution permission to the script
$ chmod u+x ~/.config/jarvis/jarvis.sh

# add a alias to to execute script
$ echo 'alias jarvis=~/.config/jarvis/jarvis.sh' >> ~/.bashrc # or ~/.zshrc for zsh

# reload the session
$ source ~/.bashrc # or source ~/.zshrc for zsh

You also need to export your OpenAI API key:

# put in the .bashrc or .zshrc
$ echo 'export OPENAI_API_KEY=your_openai_api_key_here' >> ~/.bashrc # or ~/.zshrc for zsh

[optional] To use this script efficiently, you can set up an alias in your .bashrc file:

alias jarvis=/home/user/jarvis/jarvis.sh

Usage

You can use the script like this:

$ jarvis "docker disk usage"                                                                    
=> $ docker system df
execute command? (y/n): y
Executing command: docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          7         4         4.018GB   1.61GB (40%)
Containers      4         0         243.4MB   243.4MB (100%)
Local Volumes   24        1         858.9MB   858.9MB (99%)
Build Cache     45        0         546.4MB   546.4MB 

jarvis's People

Contributors

nywton avatar

Stargazers

Henrique Barros 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.