Metadata-Version: 2.4
Name: alchemist-shell
Version: 0.1.0
Summary: The missing interactive shell for SQLAlchemy projects.
License: MIT
License-File: LICENSE
Author: Elkana Maina
Author-email: elisoft.engineer@gmail.com
Requires-Python: >=3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: ipython (>=8.0.0)
Requires-Dist: nest-asyncio (>=1.5.0)
Requires-Dist: python-dotenv (>=1.0.0)
Requires-Dist: rich (>=13.0.0)
Requires-Dist: sqlalchemy (>=2.0.0)
Requires-Dist: typer (>=0.9.0)
Description-Content-Type: text/markdown

# 🔮 Alchemist Shell

**The missing interactive shell for SQLAlchemy.**

Working with SQLAlchemy in a standard REPL is painful. You have to manually manage imports, handle async event loops, and deal with unreadable object representations. **Alchemist Shell** turns your terminal into a powerful, zero-setup database workbench.

---

## 🛠 Why this exists?

The current workflow for inspecting SQLAlchemy projects in the terminal is broken:

1. **Manual Setup**  
   You shouldn't have to manually import every model and session helper just to check a record.

2. **Manual Session Management**  
   In interactive environments, setting up and managing a session is repetitive boilerplate.  
   Creating engines, instantiating sessions, and keeping them alive just to run a few queries breaks the flow.

3. **Bad Visibility**  
   Default object reprs like `<User 1>` tell you nothing. You deserve to see your data clearly.

---

## ✨ DX Features

- **Auto-Discovery**  
  Recursively scans your project and injects all models into the namespace instantly.

- **Pre-loaded Toolkit**  
  `select`, `func`, `text`, and other SQLAlchemy essentials are available on startup.

- **Auto-Formatting**  
  Model instances render as high-fidelity `rich` tables when evaluated.

- **Modern Shell**  
  Powered by IPython with completion, syntax highlighting, and history-based autosuggestions.

---

## 📦 Installation

```bash
pip install alchemist-shell
```

---

## 🧪 The Workflow

### 1. Zero-Await Session Management

Interact with your session without the async tax:

```python
alchemist ❯ user = User(username="alchemist")
alchemist ❯ db.add(user)
alchemist ❯ db.commit()
```

---

### 2. Immediate Feedback

Stop calling `print()` or `vars()`. Just evaluate the variable:

```python
alchemist ❯ user
# Renders a clean table with all column values
```

---

### 3. Native Async Queries

Full auto-await support when you need complex queries:

```python
alchemist ❯ orders = (await db.execute(select(Order))).scalars().all()
```

---

## 📜 License

MIT License. Permissive and simple.

---

**Built to make SQLAlchemy development suck less.**
