Skip to content

nywton/jarvis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

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 

About

A shell assistant based on chatgpt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages