Metadata-Version: 2.3
Name: padwan-cli
Version: 0.6.0
Summary: CLI and TUI for padwan-llm
Author-email: julien.brayere@polarsen.com
Requires-Dist: padwan-llm[realtime]>=0.9.0
Requires-Dist: piou[tui]>=0.36.0
Requires-Dist: tracktolib>=0.74.0
Requires-Dist: padwan-llm[langfuse]>=0.9.0 ; extra == 'langfuse'
Requires-Dist: padwan-llm[otel]>=0.9.0 ; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.44 ; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp>=1.44 ; extra == 'otel'
Requires-Dist: sounddevice>=0.5 ; extra == 'voice'
Requires-Python: >=3.14
Provides-Extra: langfuse
Provides-Extra: otel
Provides-Extra: voice
Description-Content-Type: text/markdown

# Padwan CLI

Interactive CLI/TUI for [`padwan-llm`](https://github.com/polarsen-io/padwan-llm).

> [!NOTE]
> This is a playground for experimenting with `padwan-llm` features (streaming, agents, MCP, thinking tokens, batch jobs, realtime voice) — not a production-grade tool. Expect rough edges and breaking changes.

<img alt="Chat demo" src="https://github.com/polarsen-io/padwan-cli/raw/master/docs/static/chat.gif" width="800"/>

## Quick start

```bash
export OPENAI_API_KEY=...
uvx padwan-cli
# then /help for commands
```


## Install

```bash
pip install padwan-cli
```

## Local Development

```bash
uv sync --group dev
uv run padwan-cli
```

## One-shot Mode

```bash
uvx padwan-cli "Hello" -m gpt-4o-mini

# attach files (images/audio/text, routed by type)
uvx padwan-cli "What's in this recording?" -m gpt-4o-audio-preview -f clip.mp3
```

## Voice Mode

Real-time speech-to-speech chat (needs the PortAudio system lib, e.g. `libportaudio2`):

```bash
uvx --from "padwan-cli[voice]" padwan-talk
```

## Tracing

Pass `--trace <backend>` (on the one-shot, `chat send`, and `talk` commands) to instrument all LLM calls with [padwan-llm's OTel GenAI telemetry](https://github.com/polarsen-io/padwan-llm/blob/master/docs/observability.md):

```bash
# Langfuse, using the standard LANGFUSE_* env vars
export LANGFUSE_PUBLIC_KEY=... LANGFUSE_SECRET_KEY=... LANGFUSE_BASE_URL=...
uvx --from "padwan-cli[langfuse]" padwan-cli "Hello" --trace langfuse

# any OTLP collector, using the standard OTEL_EXPORTER_OTLP_* env vars
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
  uvx --from "padwan-cli[otel]" padwan-cli "Hello" --trace otlp
```

