lf media
Inspect, download, and manage media artifacts produced by workflow runs. Reads go through PostgREST against the media schema, so RLS enforces ownership — you only see media you own.
lf media list [--run <run-id>] [--limit N] [--json]
lf media info --id <media-id> [--json]
lf media download --id <media-id> [--out <path>]
lf media play --id <media-id>
lf media manifest --run <run-id> [--json]
lf media set-visibility --id <media-id> --visibility <public|private|unlisted>
lf media delete --id <media-id> [--force]
lf media cleanup --before <ISO-8601> [--dry-run] [--force]lf media list
List media objects produced by workflow runs you own.
| Flag | Description |
|---|---|
--run <run-id> | Filter by execution.runs.id (joined via media.objects.request_id) |
--limit N | Max rows (default 25, max 200) |
--json | Raw JSON |
lf media list --run 6c2e…f01a --limit 50lf media info
Show full metadata for one media object: MIME, byte size, dimensions, duration, lifecycle state, visibility.
lf media info --id <media-id> --jsonlf media download
Download a media object to a local file, or stream the bytes to stdout when --out is omitted.
lf media download --id <media-id> --out ./hero.png
lf media download --id <media-id> > raw.bin # pipe-friendlylf media play
Open a media object in the system default browser or player (open on macOS, xdg-open on Linux, start on Windows). Best for quick visual inspection of one item without leaving the terminal.
lf media play --id <media-id>lf media manifest
Show the media manifest for a workflow run — every artifact produced by every step, in execution order.
lf media manifest --run <run-id> --jsonlf media set-visibility
Change the visibility of a media object.
| Flag | Description |
|---|---|
--id <media-id> | required |
--visibility <public|private|unlisted> | required |
lf media set-visibility --id <media-id> --visibility unlistedlf media delete
Soft-delete a media object — sets lifecycle_state = deleted. Object bytes are reclaimed by the background media-cleanup cron, not immediately.
| Flag | Description |
|---|---|
--id <media-id> | required |
--force | Skip the typed-yes confirmation |
lf media cleanup
Find and (optionally) delete orphaned pending uploads — media.objects rows that never transitioned to ready. Used for housekeeping after failed uploads.
| Flag | Description |
|---|---|
--before <ISO-8601> | Match uploads created before this date |
--dry-run | Print matches without deleting (default) |
--force | Required to actually delete |
lf media cleanup --before 2026-04-01T00:00:00Z # dry-run by default
lf media cleanup --before 2026-04-01T00:00:00Z --force # actually deleteCommon mistakes
- Trying to view another user's media. RLS hides it — you will see "not found," not "permission denied."
- Expecting hard delete from
delete. Bytes are reclaimed asynchronously; the row is soft-deleted immediately but the storage object lingers until the cleanup cron runs. - Mixing
--run(execution.runs.id) withlens_runs.id. The--runfilter joins onrequest_id, which points atexecution.runs, notlenses.workflow_runs.
Related
lf execution— find run IDs to pass to--runlf publish— promote media artifacts into a publishable surface- Media schema
- Storage adapters