Python library to build pretty command line user prompts with interactive forms and validation
Overall
score
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.
Install with Tessl CLI
npx tessl i tessl/pypi-questionarydocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10