Feature request: select menu for task
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the existing invoke --list CLI output and the linked discussion #1018. Clarify the native task-selection interaction and its scope, then identify the CLI entry point that owns task listing. Done means users can select a task through Invoke itself rather than an ad-hoc wrapper, with the behavior agreed in the discussion.
Written by the indexing model from the issue text.
Description
Discussed in https://github.com/pyinvoke/invoke/discussions/1018
Originally posted by charudatta10 January 16, 2025
A terminal user interface to select task similar to one implemented in just using just --choose command. I had implemented ad-hoc solution as follow:
@task
def default(c):
# Run `invoke --list` to get a list of tasks
result = subprocess.run(['invoke', '--list'], capture_output=True, text=True)
tasks_output = result.stdout
# Parse the tasks from the output
tasks = []
for line in tasks_output.split('\n'):
if line.strip() and not line.strip().startswith('Available tasks'):
task_name = line.strip().split(' ')[0]
tasks.append(task_name)
# Display tasks to the user
print("Choose a task:")
for i, task_name in enumerate(tasks, 1):
print(f"{i}: {task_name}")
# User selects a task
choice = int(input("Enter the number of your choice: "))
task_name = tasks[choice - 1]
c.run(f"invoke {task_name}")
looking for native solution
- Dominant language
- Python
- Stars
- 4.8k
- Forks
- 412
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyinvoke/invoke
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100