Build a Reliable CLI
Write a Python command-line tool that validates input and fails clearly.
Write a Python command-line tool that validates input and fails clearly.
Prepare 20m · Build 110m · Verify 30m · Document 20m
Work only inside the folder created by Smartphone-Academy.py prepare cli-arguments. Use the supplied samples or systems you personally administer.
Prepare the Termux workspace
Open Termux in the Academy root and prepare this lab with the local companion. It creates safe samples, notes and evidence files under your Termux account.
python Smartphone-Academy.py prepare cli-argumentsNo root. Use the supplied files and keep the workspace under $HOME.Practical mission
- Accept input and output paths with argparse
- Reject missing or unsafe paths before processing
- Return distinct exit codes for usage and data errors
- Test help, success and four failure conditions
A documented CLI with help text, exit codes and six test cases.
Quality gate
Analyst reflection
Which result from “Test help, success and four failure conditions” would need more evidence before it could support an operational decision?
After checking the evidence, run python Smartphone-Academy.py complete cli-arguments. Progress is stored locally in the Termux home directory.