An English-language shell for any OS, powered by LLMs
Python
2,145
89 commits
updated Feb 7, 2026
pip install -r requirements.txtOPENAI_API_KEY to your OpenAI API key, or OPENROUTER_API_KEY to use OpenRouter instead.python engshell.py to start the shell.clear resets the LLM's memory, along with the console.Arbitrary code execution can cause undefined behavior. Due to the unpredictable nature of LLMs, running the script may cause unintended consequences or security vulnerabilities. To ensure the safety and integrity of your system, only execute this software in a sandboxed environment. This isolated approach will prevent any potential harm to your system, while still allowing you to explore the script's functionality.
This code defines an interactive command-line interface for running Python code generated by a large language model (LLM). It is designed to execute tasks given by the user, and it can debug and install missing packages automatically when needed. The primary components are as follows:
prompts.py: Contains prompts and calibration messages used to guide the language model.
main.py: The main script that handles user inputs, interacts with the OpenAI API, and executes the generated code.
The flow of main.py is as follows:
LLM function is responsible for calling the OpenAI API with the calibration messages and user prompts. The function can handle three modes: 'text', 'code', and 'install'. These modes are used to generate prompts for different cases.739 followers · starred Apr 2023
378 followers · starred Apr 2023
974 followers · starred Apr 2023
107 followers · starred Dec 2023
An English-language shell for any OS, powered by LLMs
Python
2,145
89 commits
updated Feb 7, 2026
pip install -r requirements.txtOPENAI_API_KEY to your OpenAI API key, or OPENROUTER_API_KEY to use OpenRouter instead.python engshell.py to start the shell.clear resets the LLM's memory, along with the console.Arbitrary code execution can cause undefined behavior. Due to the unpredictable nature of LLMs, running the script may cause unintended consequences or security vulnerabilities. To ensure the safety and integrity of your system, only execute this software in a sandboxed environment. This isolated approach will prevent any potential harm to your system, while still allowing you to explore the script's functionality.
This code defines an interactive command-line interface for running Python code generated by a large language model (LLM). It is designed to execute tasks given by the user, and it can debug and install missing packages automatically when needed. The primary components are as follows:
prompts.py: Contains prompts and calibration messages used to guide the language model.
main.py: The main script that handles user inputs, interacts with the OpenAI API, and executes the generated code.
The flow of main.py is as follows:
LLM function is responsible for calling the OpenAI API with the calibration messages and user prompts. The function can handle three modes: 'text', 'code', and 'install'. These modes are used to generate prompts for different cases.739 followers · starred Apr 2023
378 followers · starred Apr 2023
974 followers · starred Apr 2023
107 followers · starred Dec 2023