oras icon indicating copy to clipboard operation
oras copied to clipboard

Support `oras repo ls --oci-layout-path`

Open Wwwsylvia opened this issue 6 months ago • 4 comments

What is the version of your ORAS CLI

v1.3.0-beta.3

What would you like to be added?

With the support of oras backup and restore, users are able to back up artifacts from multiple registries/repositories to an OCI layout.

We should consider supporting OCI layout for oras repo ls to allow users to list all repositories inside the OCI layout for better usability.

Possible UX:

$ oras repo ls --oci-layout-path oci-dir/
foo.example.com/test
bar.example.com/dev/hello-world
bar.example.com/something/else

Why is this needed for ORAS?

This feature would enhance the usability of the ORAS backup and restore functionality by providing users with a clear overview of all repositories contained within an OCI layout.

Are you willing to submit PRs to contribute to this feature?

  • [ ] Yes, I am willing to implement it.

Wwwsylvia avatar Jul 04 '25 03:07 Wwwsylvia

Additional possible UX:

$ oras repo ls --oci-layout-path oci-dir/ bar.example.com
dev/hello-world
something/else

shizhMSFT avatar Jul 04 '25 03:07 shizhMSFT

Should we consider making the user specify the regular expression like the ls command? bar.example.com*

TerryHowe avatar Jul 04 '25 14:07 TerryHowe

If this was to act like ls, users could in theory specify multiple regular expressions. oras repo ls --oci-layout-path oci-dir/ *v1.31* *v.1.32*

TerryHowe avatar Jul 04 '25 14:07 TerryHowe

I'm actually leaning towards pipe and filter instead of supporting a built-in filter just to keep the code simpler here.

sajayantony avatar Jul 15 '25 01:07 sajayantony