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 configuration utility that helps users select directories for application settings. The tool should collect three directory paths from the user and save them to a configuration file.
The utility should prompt the user to select three directories:
After collecting all three directory paths, save them to a JSON configuration file named config.json with the following structure:
{
"project_dir": "/path/to/project",
"output_dir": "/path/to/output",
"cache_dir": "/path/to/cache"
}@generates
The program should:
config.json in the current working directorydef configure_directories():
"""
Prompt the user to select three directories and save them to config.json.
Returns:
dict: A dictionary containing the three directory paths with keys
'project_dir', 'output_dir', and 'cache_dir'
"""
pass
if __name__ == "__main__":
configure_directories()Provides interactive command-line prompts with path selection capabilities.