Skip to content

[feature] Command to list tasks #1883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chadrik opened this issue Mar 21, 2025 · 1 comment
Open

[feature] Command to list tasks #1883

chadrik opened this issue Mar 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@chadrik
Copy link
Contributor

chadrik commented Mar 21, 2025

Hi,
Thanks again for the great tool.

Is your feature request related to a problem? Please describe.

As a developer, I want a command that is fast-to-type and easy-to-remember to list the available tasks within my repo, and I want the output to be colorized and easy to read. The current command moon query tasks is both too long and the formatting leaves a lot to be desired in terms of clarity.

For example, many popular task runners provide a -l flag for this purpose (nox, tox, just).

Describe the solution you'd like

I think moon ls would be a good name.

The output could be something like the following, but with color for clarity:

$ moon ls
* core:build      - Build core library
* core:lint       - Lint core library
* core:release    - Release core library
* ui:build        - Build core library
* ui:lint         - Lint frontend
* ui:release      - Release frontend

It's important that the task names that are printed can be copy-pasted to use with moon run, for convenience.

Passing the project name would limit the output to that project:

$ moon ls core
* core:build      - Build core library
* core:lint       - Lint core library
* core:release    - Release core library

The goal of this command is to provide developers with an overview of what tasks they can execute at a glance. This is the sort of command I find myself needing all the time time for the first few months in a new repo while I'm getting up to speed and I don't have all the task names memorized yet. In the rare cases where I need extra details or control (such as json output) I can alway use moon query tasks.

@chadrik chadrik added the enhancement New feature or request label Mar 21, 2025
@milesj
Copy link
Collaborator

milesj commented Mar 31, 2025

I've updated this in v1.34 to render a table of data. If that's still too much, I could look into like a --simple view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants