os_helper.cli_click module
OS Helper — click-based command-line interface.
Twin of os_helper.cli_argparse: same public surface (identical
subcommand groups, identical flag semantics), but implemented with
click so users who already have a click-native shell setup
(click.shell_completion for bash / zsh / fish, colored --help,
nested command groups) can plug it in without friction. Installed as
the os-helper-click entry point in pyproject.toml.
Design notes
Subcommand groups mirror
os-helper(the argparse twin) so both CLIs can be introspected identically by higher layers.Flag names match the argparse names (
--path/--size/ …) rather than the more idiomatic click positional style — consistency across the two CLIs beats micro-idiomaticity here.Errors from the library propagate unchanged; click handles the formatting.
Usage Example
>>> # os-helper-click os system
>>> # os-helper-click path exists /etc/hosts
>>> # os-helper-click hash string hello --size 8
>>> # os-helper-click misc now --fmt filename
>>> # os-helper-click temp folder --prefix demo
- os_helper.cli_click.config_grp()
Configuration loading (JSON / YAML / .env / env vars).
- Return type:
None
- os_helper.cli_click.hash_grp()
Hashing helpers (RIPEMD-160 / BLAKE2b fallback).
- Return type:
None
- os_helper.cli_click.misc_grp()
Miscellaneous utilities.
- Return type:
None
- os_helper.cli_click.misc_ip()
Fetch the caller’s public IPv4 / IPv6 addresses.
- Return type:
None
- os_helper.cli_click.os_grp()
Operating-system detection and process helpers.
- Return type:
None
- os_helper.cli_click.os_pid()
Print the current process ID.
- Return type:
None
- os_helper.cli_click.os_system()
Print the current OS name.
- Return type:
None
- os_helper.cli_click.path_grp()
Filesystem predicates and helpers.
- Return type:
None
- os_helper.cli_click.prof_grp()
Profile an arbitrary subcommand.
- Return type:
None
- os_helper.cli_click.str_grp()
String utilities.
- Return type:
None
- os_helper.cli_click.temp_grp()
Temporary file / folder helpers.
- Return type:
None