Metadata-Version: 2.4
Name: safaai
Version: 0.1.2
Summary: TUI-first developer workstation optimizer
Requires-Python: >=3.13
Requires-Dist: aiofiles>=24.0.0
Requires-Dist: art>=6.5
Requires-Dist: asciimatics>=1.15.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: orjson>=3.0.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: psutil>=6.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: sqlalchemy>=2.0.51
Requires-Dist: textual>=1.0.0
Requires-Dist: typer>=0.15.0
Requires-Dist: watchdog>=6.0.0
Description-Content-Type: text/markdown

# 🧹 safaai — TUI-first Developer Workstation Optimizer

```
    ___   ___   ___  ___   ___   _ 
   / __| / _ \ | __|/ _ \ / _ \ | |
   \__ \| (_) || _| \_, / \_, / |_|
   |___/ \___/ |_|  /_/  /_/    (_)
```

**Understand your workstation. Never blindly delete. Optimize like a developer.**

---

## 💡 The Motivation: AI Era vs. Developer Disk Space

We live in the golden age of AI, local LLMs, and agentic coding workflows. But with great developer power comes great disk-space responsibility. 

Every single week, your workstation accumulates:
*   **Gigabytes of Xcode DerivedData** and archived artifacts.
*   **Monstrosity-level `node_modules`** directories hidden in old forgotten directories.
*   **Orphaned Docker volumes** and dangling images.
*   **Caching artifacts** from package managers like Homebrew.
*   **Massive model weights** and vector DB test logs.

Sometimes, your machine starts chugging, and you just need an **instant performance boost** (freeing inactive RAM, purging caches, killing rogue memory-hogging consumer apps) without launching a heavy, closed-source consumer GUI app. 

While there are plenty of disk cleaning utilities for Windows, developers on macOS and Linux are often left to guess which `rm -rf` command will break their local databases or compilation systems. 

**safaai** is built for devs: terminal-first, completely open-source, interactive, and transparent.

> [!IMPORTANT]
> **safaai's Golden Rule:** Never delete automatically. Explain everything. Every cleanup is previewable. Every action can be dry-run.

---

## 🛠️ Commands Reference

Press `/` inside the application to open the command palette and run slash commands:

| Command | Action | Risk Level | What it does |
| :--- | :--- | :--- | :--- |
| **`/clean`** | Scan & Clean | **Safe (Review required)** | Streams live disk scans across node, docker, brew, and Xcode projects. Reclaims space interactively with individual/parallel selectors. |
| **`/doctor`** | Compute Health Score | **None** | Audits your workstation and returns a developer health score from `0` to `100` based on bloated caches, memory leaks, and boot speed. |
| **`/optimize`**| RAM & Process Boost | **Medium** | Instantly purges system memory pages and terminates heavy background third-party applications to recover active RAM. |
| **`/logs`** | Browse Logs | **None** | Full searchable audit log of every operation, file path, and byte reclaimed during safaai runs. |
| **`/ignorelist`**| Manage Exclusions | **None** | Configure directory exclusions so safaai never scans or touches sensitive paths. |
| **`/sysinfo`** | System Dashboard | **None** | Visual real-time CPU, RAM, disk read/write, and network bandwidth meters. |
| **`/update`** | In-App Self Update | **None** | Automatically fetches latest release assets, checks versions, and atomically replaces the binary executable. |
| **`/help`** | Command Assistant | **None** | Displays quick command hints and keyboard binds. |
| **`/quit`** | Exit safaai | **None** | Terminate all active scanners safely and exit the TUI. |

---

## 💻 OS Support Matrix

| OS | Status | Notes |
| :--- | :--- | :--- |
| **macOS** | **Fully Supported** (11.0+) | Optimized for Apple Silicon (`arm64`) and Intel (`x86_64`). Includes Apple-specific scanners (Xcode, LaunchAgents, system memory purges). |
| **Linux** | **Fully Supported** | Runs natively in standard TTY terminals. Bypasses macOS-specific routines automatically. |
| **Windows**| **Coming Soon 🛠️** | Native command shell adapters and Windows registry/temp cleanup scanners are currently under development. |

---

## 🚀 Installation & Launch

Run it instantly using `uv` (recommended):

```bash
uv tool install safaai
safaai
```

Or install via `pipx` / `pip`:

```bash
pipx install safaai
safaai
```

*For macOS standalone binary downloads or custom Homebrew formula taps, check the [Releases](https://github.com/manugopinath-dev/safai/releases) page.*

---

## 🔧 For Developers

If you want to run `safaai` locally and contribute new scanners:

```bash
# Clone the repository
git clone https://github.com/manugopinath-dev/safai.git safaai
cd safaai

# Install dependencies and sync environment
uv sync

# Run the TUI in development mode
uv run safaai

# Run the test suite
uv run pytest
```

---

*Made with ♥ by [Manu Gopinath](https://manugopinath.in)*
