Skip to content

Unify commands under a single entry point #699

Closed

Description

@0x2b3bfa0

It would be nice to provide a common cml command to unify all the different scripts that conform our public interface. Executing cml command could be more practical than the current cml-command because the former provides:

  • A more sensible default command on our container images, instead of using cml-runner as we're currently doing:

    cml/Dockerfile

    Line 104 in 899c6d2

    CMD ["cml-runner"]

  • A canonical way of specifying options that are common to all the commands, like obtaining the used CML version. Calling cml-command --version isn't as intuitive as calling cml --version for a set of tools that get released together.

  • It would be similar to many other modern command-line tools like gh or dvc where users already expect a single base command.

We can preserve backward compatibility in the same ways as Git, so cml-command and cml command become equivalent.

Additionally, it would be nice to consider more descriptive names for some of the commands and keep aliases for backwards compatibility.

Activity

  1. added
    ui/ux
    on Aug 19, 2021
  2. self-assigned this
    on Aug 19, 2021
  3. casperdcl commented on Aug 24, 2021

    @casperdcl
    Contributor

    btw git already supports subcommands, and gh also just added support. Should do the same for cml.

  4. skshetry commented on Aug 24, 2021

    @skshetry

    btw git already supports subcommands, and gh also just added support. Should do the same for cml.

    I have been thinking of doing the same for dvc, but argparse hasn't made that easy. 😄

  5. DavidGOrtega commented on Aug 31, 2021

    @DavidGOrtega
    Contributor

    I have been thinking of doing the same for dvc, but argparse hasn't made that easy. 😄

    But dvc already have subcommands @skshetry ?

    I also thought on this. Will make the code dryer since we also repeat many times variables or prepare the output redirecting the console, etc...

  6. skshetry commented on Aug 31, 2021

    @skshetry

    @DavidGOrtega, yes it does. I was commenting on the link that @casperdcl shared about gh adding support for extension/third-party subcommands. git also supports third-party extension commands already, I am just thinking of ways to do that. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ui/ux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions