Skip to main content

A terminal chat UI for QwenPaw — drive an existing QwenPaw installation over ACP.

Project description

QwenPaw-TUI

A terminal chat UI for QwenPaw.

QwenPaw-TUI is a small, fast Textual front-end for an existing QwenPaw installation. It spawns qwenpaw acp and drives it over ACP (Agent Client Protocol) — streaming replies and thinking, rendering tool calls as inline panels, handling permission prompts, and forwarding slash commands (/clear, /compact, …) straight to the agent. Its command-line tool is paw.

It only speaks ACP and never imports QwenPaw, so it stays light and ships independently. Everything else — provider keys, model selection, memory, tools — lives in QwenPaw; paw just drives the agent you've already configured.

QwenPaw-TUI screenshot

Install

Install QwenPaw first (see the QwenPaw docs), then install the UI:

pip install qwenpaw-tui   # finds `qwenpaw` on your PATH

paw does not bundle or install QwenPaw, so there's nothing to conflict with your existing setup — it just drives whatever qwenpaw is on your PATH (or an explicit --agent-cmd).

Usage

paw                              # interactive chat with your QwenPaw
paw --agent writer               # pick a specific agent
paw --agent-cmd "qwenpaw acp"    # drive an explicit ACP command

For non-interactive / one-shot use, run QwenPaw directly: qwenpaw chat.

Inside the chat: enter sends, shift+enter inserts a newline, esc interrupts the current turn, and ctrl+c quits.

Type / to open an overlay suggestion list. It includes paw's own commands, QwenPaw commands advertised over ACP, and argument completions such as /theme cyberpunk. Use up/down to pick, tab or enter to insert a highlighted suggestion, and esc to dismiss. Once an exact full command is typed, enter submits it.

Useful local commands:

  • /theme opens the theme gallery; /theme <prompt> generates a persistent vibe from your words.
  • /inspect toggles between friendly chat and deeper tool/thought inspection.

Model and provider commands (e.g. /model) are QwenPaw's — paw forwards them to the agent. Configure providers and models with QwenPaw's own tools (qwenpaw models config-key, qwenpaw models set-llm).

Pasting a file path or data URL attaches it to the prompt. Pasting long text stores it as a temporary attachment and inserts a reference, keeping the input usable.

How it finds QwenPaw

paw resolves the agent to drive in this order:

  1. --agent-cmd "<command>" — used verbatim.
  2. PATH — runs qwenpaw acp.

If QwenPaw isn't on your PATH, install it first or pass --agent-cmd.

How it works

paw is an ACP client. It spawns the QwenPaw agent as a subprocess and exchanges JSON-RPC over stdio. Because QwenPaw already ships a full ACP agent (qwenpaw acp), paw reuses the backend for tools, memory, advertised slash commands, permissions, and model switching.

The agent's stderr is drained to a log file under paw's state dir (PAW_STATE_DIR, or an OS default) so chatty tools (e.g. a headless browser) can't deadlock the stdio stream.

Develop

pip install -e ".[dev]"
pytest -m "not integration"  # unit + transport + UI + CLI tests

Run the live development-checkout integration tests with provider keys:

DASHSCOPE_API_KEY=... \
OPENAI_API_KEY=... \
ANTHROPIC_API_KEY=... \
GEMINI_API_KEY=... \
DEEPSEEK_API_KEY=... \
  pytest tests/test_qwenpaw_dev_integration.py -m integration -vv

The integration suite defaults to /Users/erkang.zhu/code/ContinueLearningBench/submodules/QwenPaw, or set QWENPAW_DEV_CHECKOUT=/path/to/QwenPaw. It starts QwenPaw through uv run --project <checkout> python -m qwenpaw acp, verifies the imported module comes from that checkout, and sets temporary QWENPAW_WORKING_DIR, QWENPAW_SECRET_DIR, and PAW_STATE_DIR so it does not write to ~/.qwenpaw or ~/.copaw. It covers multi-turn conversation, a live read_file tool call through ACP, and two-turn provider smoke tests for DashScope, OpenAI, Anthropic, Gemini, and DeepSeek. Provider cases skip cleanly if the corresponding API key is absent.

Default live-test models can be overridden with:

  • PAW_E2E_DASHSCOPE_MODEL
  • PAW_E2E_OPENAI_MODEL
  • PAW_E2E_ANTHROPIC_MODEL
  • PAW_E2E_GEMINI_MODEL
  • PAW_E2E_DEEPSEEK_MODEL

Against a local QwenPaw checkout

To test paw against an in-development QwenPaw (e.g. a sibling ../QwenPaw editable install) without touching your normal QwenPaw setup, point paw at that checkout's interpreter with --agent-cmd, and isolate its data with QWENPAW_WORKING_DIR:

QWENPAW_WORKING_DIR="$PWD/.devdata" \
  paw --agent-cmd "/path/to/QwenPaw/.venv/bin/python -m qwenpaw acp"

paw forwards its environment to the spawned agent, so any vars you set (QWENPAW_WORKING_DIR, provider keys, etc.) reach QwenPaw. The agent uses .devdata/.devdata.secret for its config, sessions, and secrets, leaving ~/.qwenpaw untouched.

First time, seed a provider key and pick a model into .devdata using QwenPaw's own config (run the dev interpreter with the same working dir):

DEV="/path/to/QwenPaw/.venv/bin/python"
# store an API key for a provider (id: `dashscope` or `openai`) — paste the
# key at the prompt, e.g. $DASHSCOPE_API_KEY / $OPENAI_API_KEY
QWENPAW_WORKING_DIR="$PWD/.devdata" "$DEV" -m qwenpaw models config-key dashscope
# then choose the active model
QWENPAW_WORKING_DIR="$PWD/.devdata" "$DEV" -m qwenpaw models set-llm

The key is encrypted into .devdata.secret, so it stays out of your normal install (and out of git).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qwenpaw_tui-0.1.0.tar.gz (61.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qwenpaw_tui-0.1.0-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file qwenpaw_tui-0.1.0.tar.gz.

File metadata

  • Download URL: qwenpaw_tui-0.1.0.tar.gz
  • Upload date:
  • Size: 61.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qwenpaw_tui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 63eee4a8f198b38e42fbcc5930458de87978b75e45f718fd9b324dc58b47ea80
MD5 6b4d2bf1fdc29d9ce792747c4d3e3be6
BLAKE2b-256 a00e5478051d3c5855dd8fe846b54ba4d51a29b8fd87718ea419e9f7cd8320e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for qwenpaw_tui-0.1.0.tar.gz:

Publisher: publish.yml on ekzhu/qwenpaw-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qwenpaw_tui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qwenpaw_tui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qwenpaw_tui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50b07cc95d6e3a0ec879b28483eab1a81970ec38cdfbd8abdc3a27b6149f7e16
MD5 c5523cb14fa29d6996eee508b1c0071c
BLAKE2b-256 ef2ca164ba76b653bb88eb29515c35c64fc82618b07d9db7418bcc45f01b8db4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qwenpaw_tui-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ekzhu/qwenpaw-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page