sftp_helper.cli_click module

SFTP Helper — click-based command-line interface.

Twin of sftp_helper.cli_argparse: same public surface (identical subcommand names, identical flag semantics), but implemented with click so users who already have a click-native shell setup (bash / zsh completion via click.shell_completion, colored –help, nested command groups) can plug it in without friction. Installed as the sftp-helper-click entry point in pyproject.toml.

Design notes

  • Subcommands mirror sftp-helper (the argparse twin) so both CLIs can be introspected identically by higher layers (FastAPI, MCP).

  • Flags reuse the argparse names (--config / --remote / …) 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

>>> #   sftp-helper-click upload   --config sftp_config.json --input local.txt --remote /uploads/local.txt
>>> #   sftp-helper-click download --config sftp_config.json --remote /uploads/local.txt --output out.txt
>>> #   sftp-helper-click exists   --config sftp_config.json --remote /uploads/local.txt
>>> #   sftp-helper-click mkdir    --config sftp_config.json --remote /uploads/a/b/c

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/