Damus
Luke Childs ☂️ profile picture
Luke Childs ☂️
@lukechilds
humanscript is an inferpreter. A script interpreter that infers commands from natural language using AI. There is no predefined syntax, humanscripts just say what they want to happen, and when you execute them, it happens.

https://github.com/lukechilds/humanscript

This is a humanscript called tidy-screenshots. It takes an unorganised directory of screenshots and organises them into directories based on the month the screenshot was taken.

It can be executed like any other script.



The LLM inferpreted the humanscript into the following bash script at runtime.



The code is streamed out of the LLM during inferpretation and executed line by line so execution is not blocked waiting for inference to finish. The generated code is cached on first run and will be executed instantly on subsequent runs, bypassing the need for reinferpretation.




The humanscript inferpreter supports a wide range of LLM backends. It can be used with cloud hosted LLMs like OpenAI's GTP-3.5 and GPT-4 or locally running open source LLMs like Llama 2.

You can run humanscript in a sandboxed Docker environment with a single command if you want to have a play.

https://github.com/lukechilds/humanscript#install-humanscript
97❤️6🤙6🖤1
serapath【ツ】☮ · 150w
interesting. what if the script did something malicious? ...like deciding to store and replace your home directory with the files? how can this be secure against side effects from sloppily written instructions?
Max · 150w
I knew it was nonsense to #learntocode
nothenry · 150w
Amazing
bumi · 150w
that's pretty cool! nice usage. does it contain same guards that the script does not mess something up? e.g. works only in a folder and such?