A collection of reusable Python command-line tools for automation, data processing, web tasks, system inspection, security utilities, and developer workflows.
The repository is organized so shared logic lives in core/, lightweight command wrappers live in cli/, and task-specific tools live in scripts/.
python -m venv .venvWindows PowerShell:
.venv\Scripts\Activate.ps1macOS/Linux:
source .venv/bin/activatepip install -r requirements.txtrequirements.txt is currently empty. Most tools use the Python standard library. Optional tools:
psutilfor richer process stats inscripts/system/process_monitor.pyruff,black,isortforscripts/dev_tools/code_formatter.py
Windows PowerShell:
Copy-Item .env.example .envmacOS/Linux:
cp .env.example .envMain CLI:
python cli/main.py --helpScript tools:
python scripts/<category>/<tool>.py --helppython-toolbox/
+-- core/ # Shared config, logging, and file utilities
+-- cli/ # Aggregated entrypoint for common core utilities
+-- scripts/ # Category-based standalone tools
+-- tests/ # Test placeholders
core/config.py- Loads
.envfiles. - Parses environment values and builds typed
Settings.
- Loads
core/logger.py- Sets consistent console/file logging (with rotating file support).
core/file_utils.py- Provides reusable file operations (read/write, copy/move, list, hash, JSON helpers).
cli/main.py- Exposes small cross-cutting commands:
env,hash,ls,cat.
- Exposes small cross-cutting commands:
scripts/*- Task-specific CLIs grouped by domain.
- Standalone script tools: Each script under
scripts/can be run directly withpython. - Shared core utilities: Scripts reuse
coremodules instead of duplicating file/config/log code. - Category-driven layout: Tools are grouped for discoverability (
automation,web,security, etc.). - Exit-code friendly CLIs: Scripts return non-zero on validation/operational failures where appropriate.
Environment variables consumed by core/config.py:
PROJECT_NAME: defaults topython-toolboxAPP_ENV: primary environment nameENV: fallback environment name ifAPP_ENVis missingDEBUG: boolean-like string (true/false,1/0,yes/no, etc.)LOG_LEVEL: default logging level (e.g.INFO,DEBUG)LOG_FILE: optional log file path (relative paths resolve from repo root)
Example .env:
PROJECT_NAME=python-toolbox
APP_ENV=development
DEBUG=false
LOG_LEVEL=INFO
# LOG_FILE=logs/toolbox.logenv: print loaded runtime settingshash: hash a file (sha256by default)ls: list files by glob patterncat: print file contents
Examples:
python cli/main.py env --json
python cli/main.py hash README.md --algorithm sha256
python cli/main.py ls scripts --pattern *.py --recursive
python cli/main.py cat README.mdrename_files.py: bulk rename with prefix/suffix/replace/numbering and dry-run supportbackup_folder.py: create timestamped.zipor.tar.gzbackupsorganize_downloads.py: sort files into category folders by extension
Example:
python scripts/automation/rename_files.py ./files --pattern *.txt --prefix archived_ --dry-run
python scripts/automation/backup_folder.py ./project --format zip --exclude "*.log"
python scripts/automation/organize_downloads.py ~/Downloads --recursivecsv_cleaner.py: trim values, remove empty rows, deduplicatejson_to_csv.py: convert JSON objects/lists to CSV (with flattening option)data_validator.py: validate required/non-empty/numeric fields for CSV/JSON data
Example:
python scripts/data_processing/csv_cleaner.py input.csv --drop-empty-rows --deduplicate
python scripts/data_processing/json_to_csv.py data.json --records-key items
python scripts/data_processing/data_validator.py data.csv --required id,name --numeric amount --report report.jsonweb_scraper.py: fetch page title, text excerpt, and linksapi_client.py: send HTTP requests with headers/body and inspect responseslink_checker.py: check URL status codes from args, file, or extracted page links
Example:
python scripts/web/web_scraper.py https://example.com --output page.json
python scripts/web/api_client.py https://httpbin.org/get --pretty --show-headers
python scripts/web/link_checker.py --from-page https://example.com --broken-onlydisk_usage.py: report filesystem totals and largest entriesprocess_monitor.py: show top processes by CPU or memoryenv_checker.py: validate Python version, environment variables, and required commands
Example:
python scripts/system/disk_usage.py . --top 15 --min-mb 1
python scripts/system/process_monitor.py --sort memory --top 10
python scripts/system/env_checker.py --required API_KEY --command git --command pythonproject_generator.py: scaffold new projects (basic,package,clitemplates)code_formatter.py: runruff,black, and/orisortin apply/check modegit_helper.py: quick wrappers for common git operations (status,last,commit, etc.)
Example:
python scripts/dev_tools/project_generator.py demo-app --template package --git-init
python scripts/dev_tools/code_formatter.py . --tools ruff,black,isort --check
python scripts/dev_tools/git_helper.py statuspassword_generator.py: generate strong configurable passwordsfile_hasher.py: hash files/directories and verify checksum manifestsport_scanner.py: concurrent TCP port scanner
Example:
python scripts/security/password_generator.py --length 20 --count 3
python scripts/security/file_hasher.py ./dist --recursive --output checksums.txt
python scripts/security/port_scanner.py 127.0.0.1 --start 1 --end 1024random_utils.py: random utilities via subcommands (int,float,choice,sample,shuffle,uuid,token)
Example:
python scripts/misc/random_utils.py int --min 10 --max 99 --count 5
python scripts/misc/random_utils.py token --bytes 24 --urlsafepython -m compileall core cli scriptspython -m pytestCurrent status:
tests/test_scripts.pyexists as a placeholder and does not yet include full test coverage.
- Create a feature branch.
- Add or modify tools under the appropriate
scripts/<category>/folder. - Reuse shared helpers in
core/whenever possible. - Run formatters/lint checks (if installed) and tests.
- Update this README with any new commands or behavior changes.
- Scripts are intentionally independent and callable directly.
- For command details, use
--helpon any script.