Metadata-Version: 2.4
Name: chalilulz
Version: 0.0.1b2
Summary: Agentic coding CLI with multi-provider LLM support
Author-email: Chalilulz <chalilulz@example.com>
License: MIT
Project-URL: Homepage, https://github.com/ForgedInFiles/chalilulz
Project-URL: Repository, https://github.com/ForgedInFiles/chalilulz
Keywords: cli,llm,ai,coding,openrouter,ollama,mistral,groq,gemini
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
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 :: Interpreters
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Dynamic: requires-python

# chalilulz

<p align="center">
  <img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="Python 3.8+">
  <img src="https://img.shields.io/badge/LLM-Cli-orange.svg" alt="LLM CLI">
  <img src="https://img.shields.io/badge/Open-Source-green.svg" alt="Open Source">
  <img src="https://img.shields.io/badge/Platform-Cross--Platform-yellow.svg" alt="Cross Platform">
</p>

<p align="center">
  <strong>Agentic coding CLI with multi-provider LLM support</strong><br>
  <em>OpenRouter · Ollama · Mistral · Groq · Gemini</em>
</p>

---

## Features

- **Multi-Provider Support** — Seamlessly switch between OpenRouter, Ollama, Mistral, Groq, and Gemini
- **Built-in Tools** — File operations, grep search, glob patterns, bash execution, and more
- **Agent Skills** — Load custom skill sets from `.skills/` directory
- **Cross-Platform** — Works on Linux, macOS, and Windows with ANSI color support
- **Zero Dependencies** — Pure Python standard library — no external packages required

---

## Installation

### Quick Install (pip)

```bash
# Install globally
pip install chalilulz

# Or install from source
pip install git+https://github.com/ForgedInFiles/chalilulz.git

# Or install locally (editable mode)
git clone https://github.com/ForgedInFiles/chalilulz.git
cd chalilulz
pip install -e .
```

### Manual Install

```bash
# Clone the repository
git clone https://github.com/ForgedInFiles/chalilulz.git
cd chalilulz

# Make executable and add to PATH
chmod +x chalilulz.py

# Option 1: Add to your PATH (Linux/macOS)
sudo ln -s "$(pwd)/chalilulz.py" /usr/local/bin/chalilulz

# Option 2: Add to PATH on Windows (PowerShell)
# Add the folder to your PATH environment variable

# Option 3: Use directly
./chalilulz.py
python chalilulz.py
```

### Requirements

- Python 3.8 or higher
- API keys for your chosen provider (optional for local Ollama)

---

## Quick Start

```bash
# After installation, run from anywhere
chalilulz

# Or set a specific model
chalilulz --model openrouter:arcee-ai/trinity-large-preview:free

# Run with Ollama (default)
chalilulz --model ollama:llama2

# Run with Mistral
chalilulz --model mistral:mistral-small-latest --mistral-key $MISTRAL_API_KEY

# Run with Groq
chalilulz --model groq:llama-3.1-70b-versatile --groq-key $GROQ_API_KEY

# Run with Gemini
chalilulz --model gemini:gemini-2.0-flash --gemini-key $GOOGLE_API_KEY
```

---

## Environment Variables

| Variable | Description |
|----------|-------------|
| `OPENROUTER_API_KEY` | API key for OpenRouter |
| `MISTRAL_API_KEY` | API key for Mistral AI |
| `GROQ_API_KEY` | API key for Groq |
| `GOOGLE_API_KEY` | API key for Gemini |
| `CHALILULZ_MODEL` | Default model (e.g., `openrouter:arcee-ai/trinity-large-preview:free`) |
| `CHALILULZ_OLLAMA_HOST` | Ollama host (default: `http://localhost:11434`) |

---

## Available Tools

| Tool | Description |
|------|-------------|
| `read` | Read files with line numbers |
| `write` | Write/create files (auto mkdir) |
| `edit` | Replace unique string in files |
| `glob` | Find files by glob pattern sorted by mtime |
| `grep` | Search files by regex |
| `bash` | Execute shell commands |
| `ls` | List directory contents |
| `mkdir` | Create directories recursively |
| `rm` | Delete files or directories |
| `mv` | Move/rename files |
| `cp` | Copy files or directories |
| `find` | Recursive find by name pattern |
| `load_skill` | Load full skill instructions by name |

---

## Project Structure

```
chalilulz.py              # Main application
setup.py                  # Installation script
pyproject.toml           # Package configuration
tests/                    # Comprehensive test suite
  test_tools.py           # Tool function tests
  test_parsing.py         # Model parsing tests
  test_api.py             # API call tests
  test_skills.py          # Skills loading tests
  test_schema.py          # Schema generation tests
  test_main.py            # Main loop tests
  test_utils.py           # Utility function tests
  test_do_tool_calls.py   # Tool call execution tests
AGENTS.md                 # Development guidelines
```

---

## Testing

```bash
# Run all tests
python -m unittest discover -s tests -p 'test_*.py' -v

# Run specific test module
python -m unittest tests.test_tools -v
python -m unittest tests.test_parsing -v
python -m unittest tests.test_api -v

# Run single test method
python -m unittest tests.test_tools.TestReadTool.test_read_basic -v

# Syntax check
python -m py_compile chalilulz.py

# Lint (requires ruff)
pip install ruff
ruff check chalilulz.py tests/
```

---

## Usage Examples

### Interactive Chat

```bash
$ chalilulz
> Write a hello world program in Python
```

### With Custom Skills

Place skill files in `.skills/` directory:

```
.skills/
├── code-review/
│   └── SKILL.md
└── refactor/
    └── SKILL.md
```

### Model Switching

During runtime, use `/model` command to switch providers:

```
/model ollama:codellama
/model groq:llama-3.1-70b-versatile
```

---

## Configuration

### Model Syntax

```
provider:model-id
```

### Supported Providers

| Prefix | Endpoint |
|--------|----------|
| `ollama:` | `http://localhost:11434` |
| `mistral:` | `https://api.mistral.ai/v1` |
| `groq:` | `https://api.groq.com/openai/v1` |
| `gemini:` | `https://generativelanguage.googleapis.com/v1beta/openai` |
| `openrouter:` | `https://openrouter.ai/api/v1` |

---

## License

MIT License — Feel free to use, modify, and distribute.

---

<p align="center">
  Built with love for developers who love CLI tools
</p>
