Add interactive task picker: `deno task --interactive`
Opened this issue · 2 comments
kensukesaito commented
Summary
Today, running deno task with no args lists the available tasks, but there’s no built-in way to pick and run one interactively. I’m proposing an --interactive (-i) flag that opens a simple TUI where you can navigate with ↑/↓ and press Enter to run the selected task. This would improve discoverability and ergonomics in projects with many tasks and in workspaces.
Current behavior
deno taskprints the available tasks (from the current and ancestor configs) and exits. There is no--interactiveflag today.- Existing flags include
--filter/--recursivefor workspaces, but nothing for interactive selection.
Proposed behavior
deno task --interactive(alias-i) launches a full-screen or inline selector that lists tasks.- Keyboard: ↑/↓ to move, Enter to run, Esc/q to quit.
- Optional type-to-filter (basic substring or fuzzy).
- Each row shows the task name; if present, show the
"description"field as a subtitle. - Workspace-aware: respects
--filterand--recursiveto limit what’s shown. - After selection, pass through any extra CLI args, e.g.
deno task -i -- --watch. - Non-interactive output remains unchanged;
--interactiveonly affects the selection UI.
Why this helps
- Faster discovery and execution when a project has many tasks or a monorepo workspace.
- Matches common CLI patterns; for example, the
justtask runner offers an interactive chooser via--choose.
Prior art / alternatives
- External tools like
fzfcan be scripted to approximate this, but a first-party--interactivemode would be cross-platform and require no extra dependencies.
Open questions
- Should filtering be fuzzy or plain substring?
- Do we show tasks from ancestor
deno.jsonfiles by default (asdeno taskdoes today), or limit to the nearest config unless--recursive/--filteris provided? - Should there be a
DENO_TASK_INTERACTIVE=1env toggle for users who always want this mode?
bartlomieju commented
Does any other JS package manager have this functionality?
marvinhagemeister commented
yarn has an interactive one when you do yarn run. Haven't heard many people use that part specifically. Don't think other package managers have this.