Skip to content

request: add command for listing melos scripts #895

@omuomugin

Description

@omuomugin

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

melos list --scripts and melos list --scripts-key-only

or

melos scripts and melos scripts --key-only

Description

I imagine that melos scripts tend to grow rather easily.
It would be useful to have a command like gradle tasks that outputs all defined scripts.

e.g.

melos list --scripts 

---------------------------------------------------------------------- 
test 

text from description 

env 
* SOME_ ENV 
* ANOTHER_ENV 
---------------------------------------------------------------------- 
another command 

description from another command

...

In addition to that, I would like to have the ability to enumerate only the keys of scripts.

melos list --scripts--key-only 

test 
another command 
...

Reasoning

This would save us from having to do the following on our own.

melos: 
  scripts: 
    tasks: 
      run: yq '.melos.scripts | keys | . []' pubspec.yaml 
    tasks:run: 
      run: melos run $(yq '.melos.scripts | keys | . []' pubspec.yaml | fzf) 

see also

Additional context and comments

No response

Other

  • I'm interested in working on a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requesttype: acceptedMarks issues/pull requests that are accepted & scheduled to be worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions