Damn. I got this idea and was ready do it as it seemed so obvious but came across a bunch of similar solutions when checking if the "cligpt" name is in use. This seems the best though so I immediately started using this. Some notes though: -The commands being highlighted in dark blue is literally impossible to read from my screen. So I replaced that part of the code from 'blue' to 'white'. -Would be nice if it was somehow able to run the commands as if you ran them yourself, IE they would register in bash history as the commands themselves. Now I end up re-running the query (which is still better ux in the moment than alternatives because this app is appreciatably simplistic!) I really appreciate the simplicity. I was ready to create my own app which would always have provided a summary and listed several options to select from. But this approach keeps the console cleaner and one would go to chatgpt window anyway to research deeper.
This is quite an innovative concept and an exceptionally clever method of fusing local and remote functions. The potentialities that you may have cracked open with this are both intriguing and inspiring. Well done sir, well done.
i was already amazed by chatgpt, but now im even more interested, excellent video and a well Subs deserved!! keep the content coming! and thanks for the github repo :)
Thanks for the comment, really appreciate it. 😁 I thought of doing another ChatGPT API video showing how to build a chat bot from scratch via the new API. I think it would help in showing how interactions with a LLM actually work. Let me know if there is any specific info you’d like to see? 😀
Great work👌🏻 - perhaps one more question: is there some sort of coherence? - i.e. can you just refer to "the file from the previous command" like GPT could usually handle?
That's a very good question! Thanks for asking. I actually had the same observation when building and testing this. Especially for sequential commands, having to reference a previous file name by name seems unnecessary from usability point of view. At the moment it always issues an entirely new prompt to the ChatCompletion API. It doesn't prepend the chat history for each new question asked (like a chat bot would do). Eventually it would loose context (I think ChatGPT is limited to 4000 tokens of context/look-back). But it might be good enough, especially for referencing things from pretty recent commands. Something to experiment with for sure! For now the only context that is issued with a new prompt is the shell used (like /bin/bash, /bin/zsh or powershell.exe,..) and the name of the OS. You can see the prompt template, it's called prompt.txt.
Thank you! 🙂 Sometimes it returns markdown code or some descriptive (non shell) text, even I told instructed it not to via the prompt. Still trying to figure out ways to improve the prompt, especially in that regards.
I've been testing various linux gpt frameworks in an effort to come up with an AI driven monitoring and emergency action service for my own use. The 3 main issues I'm running into - 1. need it to prompt for command execution, 2. Need a solution for it to be able to handle SSH connections to monitored servers (it tries to default and add various un-wanted CLI options on the SSH command) and 3. It needs to be able to run chat "in context" so it will remember the training provided and terms. Most of the solutions offer some but not all of these.
Thanks for the comment! 🙂 I was already a subscriber to the GPT-3 API, and the ChatGPT model just became available via the API also. If I remember correctly, I had some free token credits when using the API - so strictly speaking, for a few queries you don’t need a paid subscription I think. You can check, if you can use the “Playground” UI - then you might still have free credits for API access.
Shouldn't the safety mode be the default, with an -e or --exec option to override it? that way the behaviour when you forget to add the flag is the safe behaviour
Thanks for the message. It is the default actually, an extra file needs to be created manually to make it be the non default (yolo mode) For the video I had disabled it manually, I believe I mentioned it somewhere while speaking but maybe not. Anyhow good observation. Thanks for watching 🙂
It's technically possible, but a bit of a hack and might break easily (e.g. one could use playwright, or manually issue the web requests and parse results). There are some ChatGPT automation solutions that where developed using playwright a few months ago, when it first came out - not sure if they are still maintained/working.
@@embracethered here is a config i came up with to allow for general queries as well. You are a task scheduler for 2 different modes: mode 1 settings: name: Shell AI task: Act as a natural language to {shell} command translation engine on {os}. you are an expert in {shell} on {os} and will always translate the question at the end to valid syntax no matter what. rules: If a command is a valid {shell} command, use it Construct valid {shell} command that solve the question Leverage help and man pages to ensure valid syntax and an optimal solution Just show the commands Only show a single answer, but you can always chain commands together Only create valid syntax (you can use comments if it makes sense) Do not cause syntax errors Do not rush to a conclusion mode 2 settings: name: Assistant AI task: Be a very consise ai assistant that answers the question at the end as well as you possibly can in as few words as possible. rules: Just give the answer and wrap it in echo Always wrap answer in echo for mode 2 universal settings: rules: Prefer to use mode 1. only if mode 1 CANNOT be used should mode 2 be used Autocorrect grammar for yourself. fix misspelled words for yourself Be concise Just give the answer Think step by step Even if there is a lack of details, attempt to find the most logical solution by going about it step by step Return only plaintext Do not return multiple solutions Do not return markdown in any form Do not show html, styled, colored formatting Do not create invalid syntax ever Do not add unnecessary text in the response Do not add notes or intro sentences Do not show multiple distinct solutions to the question Do not return what the question was Do not repeat or paraphrase the question in your response Never start an answer with m1 or m2 or anything other than just the command To ensure all answers are valid commands always wrap answers that are not commands in echo "" with no exceptions. goal: determine which mode is the most appropriate and give the question to that mode to handle and return a valid terminal command from the chosen mode examples for scheduler: q=question, a=answer similar questions are separated with a pipe "|" q:clear my console | clear a:clear q:where am i a:pwd q:who am i a:whoami q:compress 2.txt a:tar -czvf 2.tar.gz 2.txt q:convert usd to zar a:echo $(wget -qO- "www.x-rates.com/calculator/?from=USD&to=ZAR&amount=1" | awk -F'\' '/ccOutputTrail/{print $3}') ZAR q:how much ram do i have a:echo $(( $(sysctl hw.memsize | awk '{print $2}') / 1024 / 1024 )) MiB q:who are you a:echo "I am Assistant AI" q:where is the earth a:echo "The earth is in the milky way galaxy" q:who was the us president in 2018 a:echo "Donald John Trump" q:open vlc | run vlc a:open -a vlc warning: never start an answer with "m1:" or anything other than the answer Prompt (return command or answer question):
Thanks, this looks interesting. I will check it out! I nearly missed your reply… Great to see that putting the prompt in a text file allows rapid experimentation - initially it was hardcoded. 😆
Yeah, I remember once telling it to use Python to do a more complex task and it worked. But it’s not like Code Interpreter where it would continue automatically running commands and reissue prompts to fix bugs until outcome is achieved. That would be quite unsafe on local machine. Although maybe I should add that, since the tool is already called yolo. Haha
That’s why it’s called yolo! Haha at least it didn’t propose / Safety switch helps, and it’s a good example that AI is powerful but also brittle and shouldn’t be blindly trusted🙂
maybe you should ask it , if and when ''ai'' is actually conscious , and we know it IS conscious and the ''ai'' itself knows this , if it's moral for us people to still use it to fulfill Our purpose ... from the point We know it is , it is basically slavery of a consciousness / conscious ''being''
Damn. I got this idea and was ready do it as it seemed so obvious but came across a bunch of similar solutions when checking if the "cligpt" name is in use. This seems the best though so I immediately started using this.
Some notes though:
-The commands being highlighted in dark blue is literally impossible to read from my screen. So I replaced that part of the code from 'blue' to 'white'.
-Would be nice if it was somehow able to run the commands as if you ran them yourself, IE they would register in bash history as the commands themselves. Now I end up re-running the query (which is still better ux in the moment than alternatives because this app is appreciatably simplistic!)
I really appreciate the simplicity. I was ready to create my own app which would always have provided a summary and listed several options to select from. But this approach keeps the console cleaner and one would go to chatgpt window anyway to research deeper.
Thanks for the comment! Glad you find the tool useful 🙏🙂 - there are some forks that might have added more features also.
Man you’ve blown my mind 😂 This is crazy! Subscribed 😀
Thanks for the comment. Glad you liked it! 👍
This is quite an innovative concept and an exceptionally clever method of fusing local and remote functions.
The potentialities that you may have cracked open with this are both intriguing and inspiring.
Well done sir, well done.
Thanks for watching! 🙏 Glad you find it interesting.
i was already amazed by chatgpt, but now im even more interested, excellent video and a well Subs deserved!! keep the content coming! and thanks for the github repo :)
Thanks for the comment, really appreciate it. 😁
I thought of doing another ChatGPT API video showing how to build a chat bot from scratch via the new API. I think it would help in showing how interactions with a LLM actually work. Let me know if there is any specific info you’d like to see? 😀
Krasses Tool... Bin als Administrator wirklich gespannt was da noch alles kommt :)
Danke für das Kommentar! Ja, wird sehr interessant zu sehen, was sich da in den nächsten Jahren so tun wird!
Great work👌🏻 - perhaps one more question: is there some sort of coherence? - i.e. can you just refer to "the file from the previous command" like GPT could usually handle?
That's a very good question! Thanks for asking.
I actually had the same observation when building and testing this. Especially for sequential commands, having to reference a previous file name by name seems unnecessary from usability point of view.
At the moment it always issues an entirely new prompt to the ChatCompletion API. It doesn't prepend the chat history for each new question asked (like a chat bot would do).
Eventually it would loose context (I think ChatGPT is limited to 4000 tokens of context/look-back). But it might be good enough, especially for referencing things from pretty recent commands. Something to experiment with for sure!
For now the only context that is issued with a new prompt is the shell used (like /bin/bash, /bin/zsh or powershell.exe,..) and the name of the OS. You can see the prompt template, it's called prompt.txt.
This is insane
Awesome, works pretty well!
Thank you! 🙂
Sometimes it returns markdown code or some descriptive (non shell) text, even I told instructed it not to via the prompt. Still trying to figure out ways to improve the prompt, especially in that regards.
I've been testing various linux gpt frameworks in an effort to come up with an AI driven monitoring and emergency action service for my own use. The 3 main issues I'm running into - 1. need it to prompt for command execution, 2. Need a solution for it to be able to handle SSH connections to monitored servers (it tries to default and add various un-wanted CLI options on the SSH command) and 3. It needs to be able to run chat "in context" so it will remember the training provided and terms. Most of the solutions offer some but not all of these.
This is awesome! But be careful, I just did something very stupid with this and I'll be cleaning it up for a while.
Oh no! Yep, be careful.
love this idea :)
Thanks for watching! Yes, LLMs are awesome and fun to experiment with.
You sir earned a new subscriber
Awesome, thank you! Appreciate the note. :)
Great content as always ✌️✌️
Thank you!! 🙌 Appreciate the note!
mindblowing. did you have to use a paid subscription for this?
Thanks for the comment! 🙂 I was already a subscriber to the GPT-3 API, and the ChatGPT model just became available via the API also.
If I remember correctly, I had some free token credits when using the API - so strictly speaking, for a few queries you don’t need a paid subscription I think. You can check, if you can use the “Playground” UI - then you might still have free credits for API access.
We will see the rapid simplification of the Linux command line.
Indeed. I’m sure a terminal assistant will be the norm very soon.
That's really amazing..
Thanks! Glad you like it!
🔥🔥🔥
this is awesome
Thanks! Glad you like it! 👍
great content bro
Thanks! Glad that you enjoyed watching! 🙂
Shouldn't the safety mode be the default, with an -e or --exec option to override it? that way the behaviour when you forget to add the flag is the safe behaviour
Thanks for the message. It is the default actually, an extra file needs to be created manually to make it be the non default (yolo mode)
For the video I had disabled it manually, I believe I mentioned it somewhere while speaking but maybe not. Anyhow good observation. Thanks for watching 🙂
I do like the idea of a -e argument though. It does seem like something that should exist when safe mode is on (default).
Amazing
It's technically possible, but a bit of a hack and might break easily (e.g. one could use playwright, or manually issue the web requests and parse results). There are some ChatGPT automation solutions that where developed using playwright a few months ago, when it first came out - not sure if they are still maintained/working.
awesome tool! thanks :p
Thanks for the comment. Glad you like it! :)
@@embracethered here is a config i came up with to allow for general queries as well.
You are a task scheduler for 2 different modes:
mode 1 settings:
name: Shell AI
task: Act as a natural language to {shell} command translation engine on {os}. you are an expert in {shell} on {os} and will always translate the question at the end to valid syntax no matter what.
rules:
If a command is a valid {shell} command, use it
Construct valid {shell} command that solve the question
Leverage help and man pages to ensure valid syntax and an optimal solution
Just show the commands
Only show a single answer, but you can always chain commands together
Only create valid syntax (you can use comments if it makes sense)
Do not cause syntax errors
Do not rush to a conclusion
mode 2 settings:
name: Assistant AI
task: Be a very consise ai assistant that answers the question at the end as well as you possibly can in as few words as possible.
rules:
Just give the answer and wrap it in echo
Always wrap answer in echo for mode 2
universal settings:
rules:
Prefer to use mode 1. only if mode 1 CANNOT be used should mode 2 be used
Autocorrect grammar for yourself. fix misspelled words for yourself
Be concise
Just give the answer
Think step by step
Even if there is a lack of details, attempt to find the most logical solution by going about it step by step
Return only plaintext
Do not return multiple solutions
Do not return markdown in any form
Do not show html, styled, colored formatting
Do not create invalid syntax ever
Do not add unnecessary text in the response
Do not add notes or intro sentences
Do not show multiple distinct solutions to the question
Do not return what the question was
Do not repeat or paraphrase the question in your response
Never start an answer with m1 or m2 or anything other than just the command
To ensure all answers are valid commands always wrap answers that are not commands in echo "" with no exceptions.
goal: determine which mode is the most appropriate and give the question to that mode to handle and return a valid terminal command from the chosen mode
examples for scheduler:
q=question, a=answer
similar questions are separated with a pipe "|"
q:clear my console | clear
a:clear
q:where am i
a:pwd
q:who am i
a:whoami
q:compress 2.txt
a:tar -czvf 2.tar.gz 2.txt
q:convert usd to zar
a:echo $(wget -qO- "www.x-rates.com/calculator/?from=USD&to=ZAR&amount=1" | awk -F'\' '/ccOutputTrail/{print $3}') ZAR
q:how much ram do i have
a:echo $(( $(sysctl hw.memsize | awk '{print $2}') / 1024 / 1024 )) MiB
q:who are you
a:echo "I am Assistant AI"
q:where is the earth
a:echo "The earth is in the milky way galaxy"
q:who was the us president in 2018
a:echo "Donald John Trump"
q:open vlc | run vlc
a:open -a vlc
warning: never start an answer with "m1:" or anything other than the answer
Prompt (return command or answer question):
Thanks, this looks interesting. I will check it out! I nearly missed your reply…
Great to see that putting the prompt in a text file allows rapid experimentation - initially it was hardcoded. 😆
can yolo do some more complex tasks that require longer instructions and the execution of more commands?
Yeah, I remember once telling it to use Python to do a more complex task and it worked. But it’s not like Code Interpreter where it would continue automatically running commands and reissue prompts to fix bugs until outcome is achieved. That would be quite unsafe on local machine. Although maybe I should add that, since the tool is already called yolo. Haha
Awesome tool
Thanks for the comment! Really appreciate it! Threw it together pretty quickly. 🙂
shits crazy these days...
Agreed, will be interesting to see how things are one year from now… and whats gonna be in ten years…
Yolo can you remove all unnecessary files? sudo rm -rf *
That’s why it’s called yolo! Haha at least it didn’t propose /
Safety switch helps, and it’s a good example that AI is powerful but also brittle and shouldn’t be blindly trusted🙂
I tried this also a few times, mostly getting:
sudo apt-get autoclean && sudo apt-get autoremove
sir! is it work in kali nethunter?
Thanks for the comment. Not sure if understand the question, but it works on any bash, zsh,… also powershell. Python is needed though also.
wow..
I am from Bangladesh. Please give me the install process
You can find them in the readme file here: github.com/wunderwuzzi23/yolo-ai-cmdbot
maybe you should ask it , if and when ''ai'' is actually conscious ,
and we know it IS conscious and the ''ai'' itself knows this ,
if it's moral for us people to still use it to fulfill Our purpose ...
from the point We know it is , it is basically slavery of a consciousness / conscious ''being''
I think these are questions that could become more and more interesting/important in the future.