opensouls / terminal-copilot

A smart terminal assistant that helps you find the right command.
Apache License 2.0
573 stars 43 forks source link

Chain of thought self-reasoning #12

Open ch3njust1n opened 1 year ago

ch3njust1n commented 1 year ago

All the system to do multi-step reasoning to arrive at the correct command. For example if the system needs to know what ssh keys you have or what's in a directory, it should first reason what commands to get that information and then compose that with sequent commands.

For example, it failed on the command in the image below:

207234359-8df4b99b-e577-42a6-86c9-ccd65dd04768

I don't have a key named id_rsa, which is the example key name used in the prompt when generating a key with ssh-keygen:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/justin/.ssh/id_rsa)

Ideally, it should first do ls /Users/justin/.ssh/ and then find all keys with the word github in it and also know to cat ~/.ssh/config for Hosts *github.com etc.

github-actions[bot] commented 1 year ago

Message that will be displayed on users' first issue

JoelKronander commented 1 year ago

Hey! Yes this is an excellent point.

Would be very cool to have something like this!! Maybe we could add it initially behind a flag like -ch it will try to run chain of thought prompting to get you better command proposals.

Putting it behind a flag initially could let us experiment with it a bit before it becomes default.

It def would help in many cases, but also sometimes might lead to more openai calls.

What do you think @ch3njust1n?

Do you want to make a first pass at a PR to implement this? Would love to team up with you to implement something like this!!