media-cli
Agent and CLI for the local media I/O device plane — one inventory, one
stable identity scheme, and one routing surface across the media hardware
attached to a machine: speakers and audio sinks, optional standalone inputs,
and (by composing webcam-cli,
not reimplementing it) cameras and microphones.
It answers "what media hardware is on this machine, what can each piece
actually do, which one should I use, and who is holding it right now?" — device
selection, routing, playback and recording. It does not interpret what is
captured or played: what a frame contains is a vision model's job, and what to
play belongs to harmonics-cli
and TTS engines.
Status: scaffold
The domain is not implemented yet. What ships today is the agent-first CLI
skeleton — six introspection verbs, the error/output contract, CI, and PyPI
publishing. media_cli/ contains no device code.
The build brief, including the host survey it is derived from and the open
questions that block design, is
issue #1.
CLAUDE.md carries the working notes: verified device-plane
constraints, the architecture of the CLI skeleton, and the conventions.
Why a device plane
Surveyed on a real Linux workstation, the problem is not "call aplay":
- Indices are not identity, at any layer.
/dev/videoNand ALSA card numbers are plug-order and have been observed swapping between two cameras with no hardware change; PipeWire object IDs churn faster still."capture from device 0"is not a reproducible instruction. - The subsystems disagree about what exists. Raw ALSA lists five playback entries where PipeWire has two usable sinks (four HDMI entries are one physical output), and lists a microphone that PipeWire does not expose at all.
- Formats are device-native and incompatible. One sink is 16 kHz, another 48 kHz. "Play this WAV" silently means resample-or-fail.
- Access can be granted by a login seat rather than a group, so a device that works from a desktop session is unopenable from a headless agent or container — and the diagnosis differs between video and audio.
Capture and playback are already spoken for in the mesh. The plane underneath them is not, and that is where these problems live.
Quickstart
uv sync
uv run pytest -n auto # run the test suite
uv run media whoami # identity from culture.yaml
uv run media learn # self-teaching prompt (add --json)
uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
The console command is media. The distribution and import package are
media-cli and media_cli — deliberately distinct, so installing this does not
squat a generic media module in a consumer's environment.
CLI
| Verb | What it does |
|---|---|
whoami |
Report this agent's nick, version, backend, and model from culture.yaml. |
learn |
Print a structured self-teaching prompt. |
explain <path> |
Markdown docs for any noun/verb path. |
overview |
Read-only descriptive snapshot of the agent. |
doctor |
Check the agent-identity invariants (prompt-file-present, backend-consistency). |
cli overview |
Describe the CLI surface itself. |
Every command supports --json. Results go to stdout, errors and diagnostics to
stderr (never mixed). Exit codes: 0 success, 1 user error, 2 environment
error, 3+ reserved.
Write verbs — none yet — are dry-run by default and require --apply. For this
agent that is a safety property, not a convention: playback and device
reconfiguration are physically observable side effects, and a speculative call
from an agent loop must not make noise in a room.
Install
uv tool install media-cli
Development
See CLAUDE.md for the full conventions — the version-bump-every-PR
rule, the cicd PR lane, lint commands, and the rubric gate. Skill provenance
and the re-sync procedure are in docs/skill-sources.md.
License
Apache 2.0 — see LICENSE.
Metadata
Release files for media-cli 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| media_cli-0.6.3.tar.gz | 191.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| media_cli-0.6.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 214.5 kB
Release files / media_cli-0.6.3.tar.gz
| Download URL | media_cli-0.6.3.tar.gz |
|---|---|
| Size | 191.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d6791b67a2bbb8ac8e1c6895695281a98ca92ceae88f87efb772b76e1b35ae7
|
|
BLAKE2b-256 checksum How to use checksums |
a8f65257f7260011b8957a25a49800fef1f3358111e6950abec116364a07536a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / media_cli-0.6.3-py3-none-any.whl
| Download URL | media_cli-0.6.3-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b142317fa72faef78aa3f7098caf1e839ce64f3039b03cea47d3d551b9477334
|
|
BLAKE2b-256 checksum How to use checksums |
f463eb8bf4aff6ecc45e232972d3fbb186ebf3ff54f80f33bb0713717d577c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for media-cli 0.6.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.