A helpful terminal assistant that uses the Command family of llms from Cohere (also supports openai apis). It figures out what commands need to be run based on the user's instructions and will attempt to automatically fix errors. It also tries to do one command at a time, like how you would use the terminal.
By using this software, you understand and agree that:
- Risk of Errors: Terminal Commander operates based on user instructions and attempts to fix errors automatically. However, there is a risk of errors occurring during command execution or error correction. You acknowledge that such errors may occur and agree to use Terminal Commander at your own risk.
- Data Loss: Incorrect commands or errors in execution could result in data loss or corruption. It is your responsibility to ensure that you have backups of important data before using Terminal Commander.
- Limited Liability: The developers of Terminal Commander are not liable for any damages or losses incurred due to the use of this software, including but not limited to data loss, system damage, or any other consequential or incidental damages.
- Security Risks: Executing commands in the terminal, especially with automated assistance, may pose security risks. Exercise caution when running commands, especially those involving sensitive data or system operations.
- No Warranty: Terminal Commander is provided "as is" without any warranty of any kind, express or implied. The developers make no guarantees regarding the accuracy, reliability, or performance of the software.
Here's a step-by-step list of instructions to get you up and running:
- Install python3, python3-pip, and tmux. How you do this will depend on what OS or distro you are using.
- Clone the repo with
git clone https://github.com/m5kro/Terminal-Commander - Go into the directory
cd Terminal-Commander - Create a venv
python3 -m venv venv - Activate the venv
source venv/bin/activate - Install the requirements
python3 -m pip install -r requirements.txt - Edit the .env file with your values
- Run Terminal Commander
python3 terminal_commander.py
Add--cohereif you are using the cohere API - Terminal Commander will now ask for a task, try to be as specific as possible to prevent unwanted results.
- You can also edit the system message in the Python file if you feel like it. This will usually change how the responses are formatted. If you can make it better feel free to make a pull request.
These will change regularly as the code gets updated.
- Vague instructions may cause issues on smaller models
- Do step-by-step instructions if you can. This lets the AI know what order to execute commands and which steps caused an error.
Example Tasks:
- Create a folder called testdir with a file called test.txt inside.
- Run interactivetest.py
- Update the system
- Some models have trouble knowing if the command has finished executing.
- Some models like to make things up when they can't find something, instead of just using ls or find
- Some models have trouble wrapping special commands in
[tspecial][/tspecial]and instead tend to wrap in[tinput][/tinput] - No traditional chat history, this is more of a fix to prevent system message loss but may hinder larger/smarter models
- No modifier keys available except for Ctrl C
- mamei16 - web_search.py from LLM_web_search