CLI: feature request — list command for metadata-only file listing #10236
dustindoan
started this conversation in
Enhancements
Replies: 1 comment
-
|
Went ahead and built both implementations. Both are validated end-to-end against a self-hosted museum with ~31,000 files; outputs match at byte-level on the load-bearing fields. Branches:
Diff sizes:
Performance note. The Rust port runs noticeably faster than the Go on the same library (single async pass via |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
We're self-hosting Ente for a small co-op; this gap surfaced during Apple Photos → Ente migration work for the first household.
Background
The CLI today has
ente export— pulls files + metadata. Useful but expensive when the consumer only needs metadata: every file blob is downloaded.We'd like to propose a complementary
listcommand that fetches and decrypts file metadata only, emitting it as JSON on stdout.Related to #2347 (CLI upload feature request), but narrower in scope — read-only metadata listing, no protocol/crypto changes, useful as a building block for the kind of migration tooling that #2347 would eventually unlock.
Use case
Programmatic tooling, specifically:
The load-bearing primitive is the content hash — Ente already stores it in encrypted metadata for its own dedup, and decrypting locally is enough to power these scenarios without downloading anything.
Proposed shape
ente list [--shared=false] [--hidden=false] [--albums a,b] [--exclude-albums c] [--emails user@x]
Output: newline-delimited JSON, one file per line. Proposed schema:
{"id":12345,"ownerID":67890,"title":"IMG_001.jpg","fileType":"image","fileSize":2133081,"hash":"…","creationTime":"2026-04-08T19:13:47Z","modificationTime":"2026-04-08T20:11:04Z","lastUpdateTime":1777097251270241,"latitude":49.96,"longitude":-125.23}Hides crypto-internal fields (Key, FileNonce, ThumbnailNonce). Surfaces what's useful for scripting: identity, hash, timestamps, type, size, location, caption.
E2EE compatibility
Fully compatible. The encrypted metadata blobs and per-file keys are already independently fetchable from museum (the existing export client uses them in sequence). Metadata-only mode just stops after metadata fetch and skips the file-byte download. Bandwidth drops from MB/photo to KB/photo. Same crypto, no new server endpoints, no protocol changes.
Implementation status
We have a working Go POC built on top of the existing fetchRemoteCollections + fetchRemoteFiles paths in pkg/sync.go. Two new files only (cmd/list.go, pkg/list.go); no existing files modified. Tested against our self-hosted museum with ~31,000 files: full metadata sync in a few minutes (uncached) → sub-second JSON dump (cached). Zero malformed records.
Happy to share the code if useful.
Routing question
We noticed rust/cli/ is at v0.0.1 with account + export commands, while the Go CLI remains the only feature-complete option (admin commands etc.). Before opening a PR we want to ask:
Happy to do the work in either language. The Go code is ready; based on inspecting rust/cli/src/sync/engine.rs, a Rust port is similar in shape (~150 lines).
What direction would you prefer?
Beta Was this translation helpful? Give feedback.
All reactions