Skip to content

[Feature]: CLI command to set/select default config profile #176

@Atulsingh1155

Description

@Atulsingh1155

Description

Now that config profiles are supported, it would be helpful to add a CLI command to choose/set a default profile from the existing list.

Proposed UX:

  • List profiles: moss config profile list
  • Set default: moss config profile set-default
    (or: moss config profile use )
  • Show current default: moss config profile current

Behavior:

  • If does not exist, show a clear error and exit non-zero.
  • Persist the default selection in the CLI config (same place profiles are stored).
  • If no default is set, the CLI should fall back to the current behavior (describe what it is today).

Use case

The CLI now supports multiple config profiles, but users still need a clear way to choose which profile is active (or set a default) without manually editing config files or relying on environment variables. This becomes painful when switching contexts frequently (work vs personal, staging vs prod, different Moss servers/keys, different projects).

Proposed solution

Add CLI subcommands to (1) list existing profiles, (2) set one as the default/active profile, and (3) show the currently selected default profile. This avoids manual config editing and makes profile switching explicit and scriptable.

Alternatives considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions