tessl install tessl/pypi-questionary@2.1.0Python library to build pretty command line user prompts with interactive forms and validation
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
96%
Build a command-line menu system that allows users to navigate through options with configurable boundary behavior.
Create a function that displays an interactive menu with a list of options. The function should accept a parameter to control whether navigation cycles at list boundaries:
Cycling enabled: When the user navigates down from the last option, the cursor wraps to the first option. When navigating up from the first option, the cursor wraps to the last option.
Cycling disabled: When the user navigates down from the last option or up from the first option, the cursor remains at the boundary without wrapping.
The function should display a menu with at least 5 options and return the selected option as a string.
@generates
def run_menu(use_cycling: bool) -> str:
"""
Display an interactive menu with configurable cycling behavior.
Args:
use_cycling: If True, enable cursor wrapping at boundaries.
If False, cursor stops at boundaries.
Returns:
The selected menu option as a string.
"""
passProvides interactive command-line prompts with navigation capabilities.