An AI-powered natural-language Linux assistant
Project description
linux‑Assistant
An AI-powered assistant that lets you interact with your Linux system using natural language. Ask it to list files, install packages, inspect processes, or perform any shell task—behind the scenes it translates your request into safe bash commands and runs them for you.
Features
- Natural‑language interface: Describe what you want to do—no need to remember exact commands.
- Interactive shell execution: The assistant decides when to run commands, executes them in a temporary script, and returns the output.
- Continuous conversation: You can follow up on results, ask for clarifications, or chain multiple operations in one session.
- Customizable: Swap in any Ollama‑compatible model and adjust prompts to suit your workflow.
Prerequisites
- Linux with Bash installed
- Python 3.12+
- Ollama CLI & daemon with at least one local model (e.g.
qwen3:8b) - (Optional but recommended) A dedicated Python virtual environment
Installation
-
Clone the repository
git clone https://github.com/alifthi/linux-Assistant.git cd linux-Assistant
-
Set up a virtual environment
python3 -m venv .venv source .venv/bin/activate
-
Install ollama and pull model
curl -fsSL https://ollama.com/install.sh | sh ollama pull qwen3:8B # Or any other models you want to use
-
Install dependencies
pip install -r requirements.txt
Configuration
Open models/config.py and adjust:
MODEL_NAME– the Ollama model you wish to use (e.g."qwen3:8b").SYSTEM_PROMPT– how the assistant should frame its replies and decide when to run shell commands.
Usage
Run the assistant and start chatting:
cd src
python -m linux_assistant
-
Ask anything you would normally do in the terminal.
-
Continue the conversation naturally or type
exitto quit.
Run the assistant using Docker
docker run --name <Container's name> \
-v linux_assistant_volume:/app/data \
-v "$(pwd)":/app/workspace alifthi/linux-assistant
Contributing
Contributions and feedback are welcome! Feel free to:
- Open issues for bugs or feature requests
- Submit pull requests to improve prompts, handling, or documentation
- Suggest new use cases or integrations
License
Distributed under the MIT License. See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linux_assistant-0.1.0.tar.gz.
File metadata
- Download URL: linux_assistant-0.1.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a5e1e2d23a4f2749f3dbb8aaa13ee2c8fe2672fc7653edce65937f1513c2f88
|
|
| MD5 |
ff37b93b53b279ce282d5905ca60320a
|
|
| BLAKE2b-256 |
f910944c52860f6a3a9989d3eadf7773a4422665da623842748cd00b981298af
|
File details
Details for the file linux_assistant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: linux_assistant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
babcfd909dcd2155358707b280f380a453bb9a6d72db1006cad8e3f4c7c3e252
|
|
| MD5 |
9d14f6b35d971f05a065b63d2066a367
|
|
| BLAKE2b-256 |
718a30e138b3d1aa550e990f67e60604c8c9061859041ecdf6a1e699a0f4b45b
|