Metadata-Version: 2.4
Name: hanzo-tools-repl
Version: 0.1.0
Summary: Multi-language REPL tool with Jupyter kernel backend for interactive code evaluation
Author-email: Hanzo Industries Inc <dev@hanzo.ai>
License: MIT
Project-URL: Homepage, https://github.com/hanzoai/python-sdk
Keywords: mcp,repl,jupyter,interactive,code,evaluation
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: hanzo-tools-core>=0.1.0
Requires-Dist: jupyter-client>=8.6.0
Requires-Dist: jupyter-core>=5.7.0
Provides-Extra: kernels
Requires-Dist: ipykernel>=6.29.0; extra == "kernels"
Requires-Dist: bash_kernel>=0.9.0; extra == "kernels"
Requires-Dist: typescript-kernel>=0.1.0; extra == "kernels"
Provides-Extra: node
Requires-Dist: tslab>=1.0.0; extra == "node"
Provides-Extra: full
Requires-Dist: hanzo-tools-repl[kernels,node]; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"

# hanzo-tools-repl

Multi-language REPL tool with Jupyter kernel backend for interactive code evaluation.

## Features

- **Multi-language support**: Python, Node.js/TypeScript, Bash, Ruby, Go, Rust
- **Persistent sessions**: Maintain state across evaluations
- **Jupyter kernels**: Uses standard Jupyter infrastructure
- **Agent-friendly**: Designed for AI agent workflows

## Installation

```bash
pip install hanzo-tools-repl

# With all kernels
pip install hanzo-tools-repl[full]
```

## Usage

```python
from hanzo_tools.repl import ReplTool

repl = ReplTool()

# Start a Python session
await repl.call(action="start", language="python")

# Evaluate code
result = await repl.call(action="eval", code="x = 1 + 1\nprint(x)")
# Output: [1] 2

# Node.js/TypeScript
await repl.call(action="start", language="node")
result = await repl.call(action="eval", code="const arr = [1,2,3].map(n => n*2)")

# List sessions
await repl.call(action="list")

# Get history
await repl.call(action="history", limit=10)

# Stop session
await repl.call(action="stop")
```

## Supported Languages

| Language | Kernel | Install |
|----------|--------|---------|
| Python | ipykernel | `pip install ipykernel` |
| Node.js/TypeScript | tslab | `npm install -g tslab && tslab install` |
| Bash | bash_kernel | `pip install bash_kernel` |
| Ruby | iruby | `gem install iruby` |
| Go | gophernotes | See gophernotes docs |
| Rust | evcxr | `cargo install evcxr_jupyter` |

## License

MIT - Hanzo Industries Inc
