A file management CLI tool built with argparse supporting file search, line counting, duplicate detection, and file comparison.
python cli.py --helpargparsefor command-line parsing- Subcommands for different operations
- File system walking with
os.walk() - File comparison and duplicates
- Rich terminal output
You will learn how to build professional CLI tools with argument parsing, subcommands, and help text.
49-cli-tool/
README.md
cli.py
CLI File Tool
-------------
$ python cli.py search --pattern "*.py" --directory ./
Found 12 Python files
$ python cli.py count --file main.py
Lines: 156, Words: 423, Characters: 3,891
$ python cli.py duplicates --directory ./
Found 2 duplicate groups (3 files total)