Metadata-Version: 2.4
Name: utim-cli
Version: 1.44.9
Summary: UTIM – Universal Terminal Intelligence Manager. A powerful agentic AI coding assistant for your terminal.
License: MIT
Project-URL: Homepage, https://utim.dev
Project-URL: Documentation, https://utim.dev/docs
Project-URL: Changelog, https://github.com/emendai/utim/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/emendai/utim/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.30.0
Requires-Dist: requests==2.31.0
Requires-Dist: aiohttp>=3.9.5
Requires-Dist: python-dotenv==1.0.1
Requires-Dist: urllib3==1.26.18
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: chardet==4.0.0
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: prompt_toolkit>=3.0.0
Requires-Dist: tree-sitter>=0.21.0
Requires-Dist: tree-sitter-python>=0.21.0
Requires-Dist: tree-sitter-javascript>=0.21.0
Requires-Dist: tree-sitter-typescript>=0.21.0
Requires-Dist: mcp>=0.1.0
Requires-Dist: nest-asyncio>=1.5.0
Requires-Dist: python-multipart>=0.0.7
Requires-Dist: slowapi>=0.1.9
Requires-Dist: sqlalchemy>=2.0.0
Provides-Extra: search
Requires-Dist: scrapy>=2.11.0; extra == "search"
Requires-Dist: scrapy-playwright>=0.0.34; extra == "search"
Requires-Dist: beautifulsoup4>=4.12.0; extra == "search"
Provides-Extra: images
Requires-Dist: pillow>=9.0.0; extra == "images"
Provides-Extra: full
Requires-Dist: scrapy>=2.11.0; extra == "full"
Requires-Dist: scrapy-playwright>=0.0.34; extra == "full"
Requires-Dist: beautifulsoup4>=4.12.0; extra == "full"
Requires-Dist: pillow>=9.0.0; extra == "full"
Dynamic: license-file

# UTIM CLI Agent: Enterprise Coder Assistant

UTIM is an agentic developer CLI assistant designed to automate coding tasks directly inside your local terminal, featuring robust safety controls, self-healing quality gates, and local-first semantic memory.

---

## 🚀 Quick Start

### 1. Installation
Install the package from your local source directory:

```bash
# Basic installation
pip install .

# Recommended: Full installation (includes semantic vector RAG & web search)
pip install ".[full]"
```

### 2. Provider & Model Configuration
Start the chat session:
```bash
utim
```
On first run, UTIM checks for `.utim/config.json`. If it does not exist, it runs a provider and model configuration wizard. You can configure:
- **Default Providers**: OpenRouter, OpenAI, custom servers, etc.
- **Model Picker**: Press `Ctrl+M` in the chat terminal at any time to configure, pick, add, or delete LLMs.

---

## ⚡ Main CLI Commands

- **`utim`**: Starts the interactive chat terminal (TUI).
- **`utim task "<prompt>"`**: Executes a single task autonomously from the command line and exits. In an interactive terminal (`stdin` is a TTY) file writes and commands prompt for confirmation; when piped/scripted they run in auto-accept mode.
- **`utim --dry-run`**: Starts the session in **Dry-Run Mode** (all code modifications and shell commands are simulated, not written/executed).
- **`utim --sandbox`**: Runs all mutating shell command proposals in the intelligent local sandbox (untrusted commands will block until approved).
- **`utim doctor`** / **`utim init`** / **`utim reset`**: Administrative commands for state diagnosis, initialization, and factory resets.

---

## 🛠️ In-Chat Slash Commands

Inside the interactive chat terminal, type these slash commands for direct workspace control:

- **`/undo`**: Reverts the last assistant action, restoring files to their exact "before" state and rolling back messages.
- **`/redo`**: Re-applies the last undone turn, re-writing files and restoring conversation logs.
- **`/rewind <turn_index>`**: Rolls back the entire session to a specific conversation turn.
- **`/doctor`**: Run diagnostics on environment variables, Python version, dependencies, API model connections, and MCP server status.
- **`/report`**: Generates a support bundle under `.utim_tmp/report_bundle.zip` (automatically redacts secrets, passwords, or personal names/files).
- **`/reset`**: Wipes the current chat history without deleting persistent local vector memory.

---

## 🧠 Architecture & How it Works

1. **Local Memory (`.utim/memory.json` & ChromaDB)**: 
   - Global user preferences, rules, and facts are synced to a semantic vector database (`.utim_tmp/vector_db`).
   - Relevant memories are dynamically fetched via semantic similarity (RAG) and injected into the system prompt context, preventing prompt bloating.
2. **Undo/Redo Stack & Session State**:
   - Every file change (writes, batch string edits, moves, deletions) computes a diff snapshot.
   - The entire stack is serialized dynamically to `.utim/session_state.json`. You can close your shell, shut down your computer, and resume later with intact rollback features.
3. **Workspace Boundary & Safety Controls**:
   - Prior to writing files, UTIM performs **Pre-Commit Syntax Checks** (AST compilation for Python, JSON loads, JS/TS checks).
   - If tests are available (`pytest`, `npm test`, etc.), UTIM runs them in a background **Regression testing loop**, prompting the model to self-heal code errors if assertions fail.
   - **Interactive TUI mode** (`utim`): every file mutation shows an interactive diff dialog; the developer accepts, edits, or rejects individual hunks before they are applied.
   - **CLI task mode** (`utim task`): when running in a real terminal, destructive operations (`rm`, package installs, `>` redirects) prompt for `y/n` confirmation. When stdin is piped/non-interactive all edits are auto-accepted.
   - **Sandbox mode** (`utim --sandbox`): classifies every terminal command as safe or risky and blocks risky commands until explicitly approved.

---

## ⚠️ What this Tool Can and Cannot Do

### Can Do:
- Read, write, and patch codebases safely.
- Install and coordinate custom MCP (Model Context Protocol) servers.
- Self-heal syntax and test errors before files are written.
- Revert any file modification instantly.

### Cannot Do:
- **No Remote Code Execution**: Runs locally on your machine.
- **Unverified Sensitive Reads Blocked**: Reading files or memory matching sensitive keys (like passwords, secret codes, or personal data) is blocked unless verified via your configured verification code.
- **No Auto-Deletions**: Any command that deletes files outside the working directory is blocked automatically.
