Metadata-Version: 2.4
Name: termicode-ai
Version: 0.1.2
Summary: Groq-powered AI coding assistant with streaming responses, cost tracking, and zero-configuration setup
Author: Parth Pathak
License: MIT
Project-URL: Homepage, https://github.com/yourusername/termicode
Project-URL: Repository, https://github.com/yourusername/termicode
Project-URL: Issues, https://github.com/yourusername/termicode/issues
Keywords: ai,coding-assistant,groq,llama,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: groq>=0.5.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: ddgs>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"

<div align="center">
  <img src="https://via.placeholder.com/150x150/09090b/22d3ee?text=TERMICODE" alt="TermiCode Logo">
  
  <h1>TermiCode AI Coding Assistant</h1>
  <p>A blazing fast, private, local AI coding assistant running directly in your terminal, powered by Groq and Llama 3.3.</p>

  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
</div>

---

TermiCode is a terminal-based Micro-SaaS AI coding assistant built for speed and security. It reads your codebase, modifies files securely via surgical edits, and can even run terminal commands (with your permission). Because it leverages Groq's lightning-fast inference API, TermiCode feels instant. 

**Bring Your Own Key (BYOK)**: No monthly subscriptions. No bloated Electron apps.

## ✨ Features
- **⚡ Blazing Fast**: Powered by Groq's LPU technology and Meta's Llama models.
- **🛡️ Secure File Operations**: Built-in path traversal protection and a blocklist for sensitive files (like `.env`).
- **👀 Surgical Edits**: Modifies existing files precisely without rewriting the whole document, saving tokens and preventing hallucinations.
- **🖥️ Beautiful Terminal UI**: Powered by `rich` for elegant panels, Markdown rendering, and live spinners.
- **🧠 Long-Term Memory**: Automatically summarizes past context to preserve memory without exceeding token limits.
- **🚦 Command Execution**: Can run test suites, git commands, and shell scripts on your behalf (always asks for permission first).

## 🚀 Installation

### Option 1: Install globally via pipx (Recommended)
`pipx` installs Python CLI applications into isolated environments so they don't break your system Python.
```bash
pipx install termicode-ai
```

### Option 2: Install via pip
```bash
pip install termicode-ai
```

## ⚙️ Configuration

TermiCode requires a free Groq API key to operate. 

1. Get a free API key at [console.groq.com/keys](https://console.groq.com/keys).
2. Create a `.env` file in the directory where you plan to run TermiCode, and add:
   ```env
   GROQ_API_KEY=your_api_key_here
   ```
*(Alternatively, you can export `GROQ_API_KEY` as a system environment variable in your terminal).*

## 💻 Usage

Navigate to any project directory in your terminal and simply type:
```bash
termicode
```

This starts the interactive AI shell. 
Type `/help` to see available slash commands:
- `/map` - Print the current project structure tree.
- `/clear` - Clear the terminal screen.
- `/reset` - Wipe the agent's short-term memory and start fresh.
- `/exit` - Save session and exit.

**Example Prompts:**
- *"Refactor my calculate_tax function in utils.py to handle edge cases."*
- *"Search the codebase for 'DATABASE_URL' and tell me where it's used."*
- *"Run the pytest suite and fix any failing tests."*

## 🛠️ Developer Setup (Local Building)

If you want to contribute or build TermiCode locally from the source code:

1. **Clone the repository**
   ```bash
   git clone https://github.com/yourusername/termicode.git
   cd termicode
   ```

2. **Create a virtual environment**
   ```bash
   python -m venv .venv
   source .venv/bin/activate  # On Windows: .venv\Scripts\activate
   ```

3. **Install in editable mode with dev dependencies**
   ```bash
   pip install -e .[dev]
   ```

4. **Run the CLI locally**
   ```bash
   termicode
   ```

## 📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
