/sensei

An AI terminal helper that helps you remember a terminal command, explains what a command does, and answers any question you have.

Primary LanguageJavaScript

Demo

Link

How to set this up

  • Step 0: Fork and clone this repo into your local env
  • Step 1: Copy .env.example to .env and replace the OpenAI key (you'll need to sign up)
  • Step 2: Run npm install -g .
  • Step 3: Run sensei

(To uninstall this, run npm uninstall -g sensei)

Troubleshooting

Note: I'm using node 17.9.1, npm 8.11.0.

If the above steps don't work, feel free to try the same node version.

How to use it

Find a command

sensei -c revert back to a particular commit with git

sensei -c

Describe a command you want to find: npm globally install a package from the current working directory

Explain a command

sensei -e

Enter a command to explain: git reset --hard <commit-hash>
sensei -e 

Enter a command to explain: npm install -g ./

Ask anything

sensei -a how to install multiple versions of node

sensei -a syntax for error handling in JS

sensei -a

Ask sensei anything: how to resolve a merge conflict

A pro tip

If your explanation / command contains a special character, entering it as a series of arguments might not work.

In that case, try running the command without any arguments as in:

sensei -e

How this works / how I built it

There's a Loom video where I explain it: link