Linux Command GPT (lcg)
Get Linux commands in natural language with the power of ChatGPT.
Installation
Build from source
> git clone --depth 1 https://github.com/asrul10/linux-command-gpt.git ~/.linux-command-gpt
> cd ~/.linux-command-gpt
> go build -o lcg
# Add to your environment $PATH
> ln -s ~/.linux-command-gpt/lcg ~/.local/bin
Or you can download lcg executable file
Example Usage
> lcg I want to extract linux-command-gpt.tar.gz file
Completed in 0.92 seconds
tar -xvzf linux-command-gpt.tar.gz
Do you want to (e)xecute, (r)egenerate, or take (N)o action on the command? (e/r/N):
Options
> lcg [options]
--help output usage information
--version output the version number
--update-key update the API key
--delete-key delete the API key
Raspberry Pi 4 support?
After completing steps from installation lcg doesn't work. My go installation is for arm64 and it works and completes the build command. But after creating a symlink when I try to run the command I get "command not found" or when in ~/.linux-command-gpt it says "cannot execute binary file".
Feature proposal: (R)e-generate command
The current
Should be
Where 'r' sends the question again to chatGPT to generate a new answer.
Feature request (usability improvement): When lcg is called withiut any argument, ask for it
Currently, when we run gptc, this is displayed
It would be ideal to prompt the user to enter text.
Add a feature to regenerate the result and some minor improvements
This pull request addresses issue #5 #7
some commands not working
great work here. I have noticed commands such as 'cd' and 'cat' not working. For example, with 'cd', I get:
and with 'cat', I get:
When I run the proposed commands in a separate terminal, they all work properly. I'm just starting to use the tool, and most other commands are working well directly from your program. I think your tool has great potential as a self-learning tool for linux beginners or even more experienced users, since it acts as an interface between the users' thoughts and the appropriate terminal command.