Skip to main content

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/videoN and 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.

Download files

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

Source Distribution

media_cli-0.6.2.tar.gz (165.4 kB view details)

Uploaded Source

Built Distribution

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

media_cli-0.6.2-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file media_cli-0.6.2.tar.gz.

File metadata

  • Download URL: media_cli-0.6.2.tar.gz
  • Upload date:
  • Size: 165.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}

File hashes

Hashes for media_cli-0.6.2.tar.gz
Algorithm Hash digest
SHA256 cca9b785055721f31e21f78f0bfdd3842641204888256da9351a2138787ec645
MD5 ffbddc7a7f75b69d4472a9c504f4e86b
BLAKE2b-256 b8da57e092ce841e6100b811c773d90f7839f98eac29f461a78771a1bc6cdb66

See more details on using hashes here.

File details

Details for the file media_cli-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: media_cli-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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}

File hashes

Hashes for media_cli-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 88d172b14a4104f278fef3d781e5f288b24a336a689f0d8409b73723b31804e2
MD5 9760f08a2e55a700a6904e651c4fedda
BLAKE2b-256 a770bd0ba3a305ec6b0864ad71c594e53e65dbefd6c8a41ac01085b983a193ff

See more details on using hashes here.

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