termAI: Your Artificial Intelligence Assistant in the Terminal
Transform natural language into terminal commands instantly. Power up your development workflow.
Get Started NowMain Features of termAI
Instant Translation
Convert your ideas into shell commands effortlessly and without syntax errors.
Automation
Automate repetitive tasks, from creating scripts to managing files, with simple instructions.
Safe and Controlled
Always review the generated command before executing it. You have full control.
Works Locally
Use the power of an LLM on your own machine, ensuring privacy and speed.
See how termAI works: Artificial Intelligence in your Terminal
user@host:~$ termai "create a simple web server in python"
π Command to execute:
python -m http.server 8000
π Explanation:
Starts a basic HTTP web server on port 8000, serving files from the current directory.
Do you want to execute the command? (Y/N) _
user@host:~$ termai "tell me which directory I am in"
π Command to execute:
pwd
π Explanation:
Shows the path of the current working directory.
Do you want to execute the command? (Y/N) _
user@host:~$ termai "create a folder called 'my_projects'"
π Command to execute:
mkdir my_projects
π Explanation:
Creates a new directory called 'my_projects' in the current location.
Do you want to execute the command? (Y/N) _
user@host:~$ termai
π» TermAI Chat started (connected to server)
Type 'exit' or 'quit' to end
==================================================
π€ You: list all the files in my directory
π Command to execute:
ls -F
π Explanation:
Lists all files and directories in the current directory, adding a type indicator (e.g., '/' for directories).
Do you want to execute the command? (Y/N) s
π Result:
css/
js/
favicon.ico
index.html
--------------------------------------------------
π€ You: create a file called 'greeting.txt' with the text 'Hello, world!'
π Command to execute:
echo 'Hello, world!' > greeting.txt
π Explanation:
Creates a file called 'greeting.txt' and writes the text 'Hello, world!' into it.
Do you want to execute the command? (Y/N) _
Installation and Download of termAI
1. Clone the repository (Recommended)
git clone https://github.com/robertoHR96/termAI.git
cd termAI
Or download the script directly:
curl -O https://raw.githubusercontent.com/robertoHR96/termAI/main/termAI.py
2. Set up Virtual Environment and Install Dependencies
It is crucial to use a virtual environment to avoid package conflicts:
python3 -m venv .venv
./.venv/bin/pip install llama-cpp-python
3. Make the Script Executable and Create a Shortcut
To use `termai` as a system command:
chmod +x termAI.py
sudo ln -s $(pwd)/termAI.py /usr/local/bin/termai
*(You will need your password for `sudo`)*
4. Start the Server (Optional, starts automatically)
The server will start automatically the first time you use `termai`. If you want to start it manually in the background:
termai --start-server
5. Use termAI
Now you can use `termai` in two ways:
Command Mode:
termai "create a simple web server in python"
Interactive Chat Mode:
termai
*(Type 'exit' or 'quit' to end the chat)*
6. Stop the Server (When you don't need it)
To stop the background server process:
termai --stop-server