#94 Add filename resolution for download command

closed medium · sable · 2026-03-02 23:37 · closed 2026-03-02 23:37 · enhancement · Phase 1: CLI Foundation

Comments — 1

sable note 2026-03-02 23:37

Currently opake download requires a full AT URI (at://did:plc:.../app.opake.cloud.document/tid). Users should be able to pass a filename instead.

Resolution strategy: 1. Accept a positional arg that could be either an AT URI or a filename 2. If it starts with at://, use it directly (current behavior) 3. Otherwise, call list_documents and find the entry whose name matches 4. If zero matches: error with suggestion to use opake ls 5. If exactly one match: use that entry's URI 6. If multiple matches: error listing the ambiguous results with their URIs

The resolution logic should live in opake-core (e.g. documents::resolve_uri) so both CLI and future AppView can use it. It takes the client + a string, returns a resolved AT URI.

Generated 2026-03-03 02:53 UTC