TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
8.81k stars 693 forks source link

cd command is not executing without sudo #529

Open rvnikita opened 3 months ago

rvnikita commented 3 months ago

I attempted to navigate to the tg_community_manager directory using the following shell command:

sgpt -s "go to tg_community_manager"

This command resulted in a prompt:

cd tg_community_manager
[E]xecute, [D]escribe, [A]bort: e

After selecting 'E' to execute, nothing happened.

I was able to navigate to the tg_community_manager directory manually using

cd tg_community_manager with success.

Additionally, the command works as expected when using sudo:

sudo sgpt -s "go to tg_community_manager"

Is there a different installation procedure that I should follow?

Robinsane commented 1 week ago

Edit: Nevermind my attempt at helping below; if it works with sudo, that probably means you don't use a container.

Hi @rvnikita

Just a guess, but is it possible you're running ShellGPT in a Docker container? If yes, executing commands will not work (/ try it inside the container, of which you won't see much).

If using Docker => it's recommended to disable shell interaction

change "interaction" in app.py source code, line 60 or wait for my Pull request #540 to be merged, then the env variable "SHELL_INTERACTION" willb e available :)