zeno-channel-cli
Terminal channel for Zeno. Reads
lines from stdin into IncomingMessages and renders the agent's
OutgoingMessages to stdout. Doubles as a manual smoke-test harness
and as the simplest reference implementation of the Channel protocol.
Install
uv add 'zeno-framework[cli]'
# or, without the AI package:
uv add zeno-channel-cli
Minimal usage
import asyncio
from zeno.agent import Agent
from zeno.app import ZenoApp
from zeno.channels.cli import CliChannel
from zeno.testing import FakeProvider
app = ZenoApp(
agent=Agent(name="root", instructions="You are Zeno, a helpful assistant."),
channels=[CliChannel()],
provider=FakeProvider(), # swap for OpenAIProvider / ClaudeSDKProvider in production
)
asyncio.run(app.run())
Then run the script. Type a line, hit return, see the reply. Ctrl-D
or Ctrl-C exits cleanly. user_id defaults to $USER (or "local"
if unset) so a developer running the snippet above gets a sensible
tenant scope without configuration. Override explicitly in production:
CliChannel(user_id="alice", prompt=">>> ")
Behavior
- Capabilities:
supports_streaming=False,supports_threading=False. The coreStreamBufferconsolidates chunked replies into onesend()at finalize-time, which the renderer emits as a single line. - Stdin: read via
asyncio.to_thread(stream.readline)so the CLI channel stays dependency-free (noaioconsole). At most one line read is in flight at a time, matching REPL semantics. - Inbound queue: exposes
inbound_put(message)sozeno-schedulercan inject proactive messages without going through stdin. - Shutdown:
stop()is idempotent and closes the renderer; callingsend()afterstop()raisesChannelError.
Testing
uv run pytest packages/zeno-channel-cli
Tests use io.StringIO for stdin/stdout — no terminal needed.
See also
zeno-channel-email,zeno-channel-sendblue— other first-party channels.docs/adapters.md— writing your ownChannel.
Part of the Zeno framework.
Metadata
Release files for zeno-channel-cli 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zeno_channel_cli-1.1.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zeno_channel_cli-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / zeno_channel_cli-1.1.0.tar.gz
| Download URL | zeno_channel_cli-1.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
127a0705e1e2de1780d414ed35c43dad4d9d2cc2f388727495b256cfcdd1b2f6
|
|
BLAKE2b-256 checksum How to use checksums |
38a4370224960fb1a6221122db843843f270e0ce4f4a57183f2046d5a727e80b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 1, 2026.
Transparency logRelease files / zeno_channel_cli-1.1.0-py3-none-any.whl
| Download URL | zeno_channel_cli-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d33f7b8304372ac75437957a3a06c991a807d94732f0391ac4008e5b9a65c073
|
|
BLAKE2b-256 checksum How to use checksums |
c684eb0efb2f5b93a3e9303bdf2d6aef0bcc04e9dedc4e25e1f64583619e9a88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 1, 2026.
Transparency log