Metadata-Version: 2.4
Name: lider
Version: 0.1.0
Summary: A lightweight framework for building and running AI multi-agent workflows with a terminal UI
Project-URL: Homepage, https://github.com/meric/lider
Project-URL: Repository, https://github.com/meric/lider
Project-URL: Issues, https://github.com/meric/lider/issues
Author: Meriç Öztiryaki
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai,cli,multi-agent,tui,workflow
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Requires-Dist: textual>=0.70
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# lider

A lightweight framework for building and running AI multi-agent workflows with a terminal UI.

## Installation

Requires Python 3.11+.

```bash
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies and the project
uv sync

# Install dev dependencies (for testing)
uv sync --group dev
```

## Usage

```bash
lider path/to/workflow.py
```

Workflows are plain Python files with an `async def run()` function.

## SDK

```python
from lider.sdk import agent_node, input_node, process_node

async def run():
    question = await input_node("Ask something:")
    answer = await agent_node(question, tool="claude")

    # Run an OS process and chain its output to an agent
    logs = await process_node("journalctl -n 50", shell=True)
    summary = await agent_node(logs, tool="claude")
```

- `input_node(prompt)` — prompts the user for input
- `agent_node(prompt, tool=...)` — sends a prompt to an AI model (`"claude"` or `"gemini"`)
- `process_node(command, cwd=None, shell=False)` — runs an OS process, streams output to the TUI, and returns the full stdout as a string

Currently supported tools: **Claude Code CLI** and **Gemini CLI**.

## Examples

### debate.py

```bash
lider example-workflows/debate.py
```

Asks a question, gets answers from Claude and Gemini in parallel, then synthesizes them into a single response.

### multi-model-code-review.py

```bash
lider example-workflows/multi-model-code-review.py
```

Runs a code review in parallel with Claude and Gemini, then synthesizes the two reviews into a prioritized, authoritative report with a final verdict.

### new-feature-pipeline.py

```bash
lider example-workflows/new-feature-pipeline.py
```

End-to-end feature development pipeline: creates a git worktree, drafts a spec interactively with Claude, generates an implementation plan, implements it, runs acceptance and code reviews in parallel, fixes findings, and pushes the branch.
