Skip to content

cds list: add --remote to list profiles/modules from a remote repository #500

Description

@RonaldHensbergen

cds get already supports a --remote <path> argument to fetch a profile from a source repository other than the current one (_resolve_source_repository in cli/getter.py). cds list, however, always inspects the local repository via get_profiles_root() / get_modules_root() in cli/main.py, with no way to list what's available in another repository before fetching from it.

Proposal

Add a --remote <path> argument to cds list, reusing the same source-repository resolution logic cds get already has, so users can discover profiles/modules in a remote repository before running cds get.

  • cds list profiles --remote <path> -- list profiles found under <path>/profiles/ instead of the local repository.
  • cds list modules --remote <path> -- list module sources found under <path>/modules/ (and modules-experimental/, if applicable) instead of the local repository.
  • cds list images --remote <path> -- since this subcommand scans module templates via collect_module_images(module_root), it should follow the same remote module root once list modules supports --remote.

Other commands that could use --remote

  • cds use <profile> -- currently only completes/validates against local profiles (via profile_completer in cli/main.py). Not an obvious fit today since use sets the local default profile, but worth a mention if use ever gains the ability to fetch-then-select in one step.

No source changes proposed here yet -- just tracking the gap and scoping which commands are affected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI commands and behaviorenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions