Metadata-Version: 2.4
Name: linux-assistant
Version: 0.1.0
Summary: An AI-powered natural-language Linux assistant
Author-email: Ali Fathi Jahromi <alifathijahromi@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Ali Fathi Jahromi
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell    
        copies of the Software, and to permit persons to whom the Software is        
        furnished to do so, subject to the following conditions:                     
        
        The above copyright notice and this permission notice shall be included in   
        all copies or substantial portions of the Software.                          
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR   
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,     
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER       
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN    
        THE SOFTWARE.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: langchain
Requires-Dist: click
Dynamic: license-file

# 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](https://ollama.com/) with at least one local model (e.g. `qwen3:8b`)  
- (Optional but recommended) A dedicated Python virtual environment

---

## Installation

1. **Clone the repository**  
   ```bash
   git clone https://github.com/alifthi/linux-Assistant.git
   cd linux-Assistant
   ```

2. **Set up a virtual environment**  
   ```bash
   python3 -m venv .venv
   source .venv/bin/activate
   ```
3. **Install ollama and pull model**
   ```bash 
   curl -fsSL https://ollama.com/install.sh | sh
   ollama pull qwen3:8B  # Or any other models you want to use
   ```
4. **Install dependencies**  
   ```bash
   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:

```bash
cd src
python -m linux_assistant
```

- Ask anything you would normally do in the terminal.

- Continue the conversation naturally or type `exit` to quit.
---
Run the assistant using Docker

```bash
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](LICENSE) for details.  
