From 76cdd16a88496852f21ef865d4c9ce59ee8a21e1 Mon Sep 17 00:00:00 2001 From: test Date: Sat, 20 Jan 2024 20:49:57 -0500 Subject: [PATCH] added readme --- README.md | 22 ++++++++++++++++++++++ llm_cmd | 1 + 2 files changed, 23 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e431ff7 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# llmcmd +llmcmd is an interactive Linux tool that takes natural language and turns it into oneliner bash commands. This tool utilizes Ollama with codellama:7b for snappy usefull responses. It has built in self reflection so that it reflects on the code to make sure that it is correctly fromated and does not include any error. If it determines that the code is correct the it shows it to the user. Otherwise it tryes again. If it is unable to find a useful result after 5 attempts it will through an error say it can not find a sollution. + +## Usage +To use the tool, simply type `llmcmd` the double quotes and your question. Once it has generated the code then you can choose one of 4 options: +- n for skipping the code block (default) +- y for running the code block as is. +- e for editing the code block before running. +- q for ending the tool emedialtly + + +## Installation +To install this tool first create a venv python enviorment. +```bash +git clone https://gitea.locker98.com/tofasthacker/llm_cmd.git +cd llm_cmd +``` + +## Example Usage +```bash +python3 llmcmd "how do I update my computer" +``` diff --git a/llm_cmd b/llm_cmd index cec4aa0..e4737a2 100755 --- a/llm_cmd +++ b/llm_cmd @@ -127,3 +127,4 @@ for code in soup.findAll('code'): os.system(f"rm -rf {t.name}") elif answer == "d" or answer == "done": exit() +