How blackmamoth/sshsync works
Project type and purpose
• This is a standalone, open-source Python CLI tool (“sshsync”) for running shell commands and transferring files over SSH to multiple servers in parallel. It’s distributed via PyPI and managed as a typical Python package.
File structure
• Top‐level config files:
• pyproject.toml (build & dependencies)
• pyrightconfig.json (type checking)
• .github/workflows/pypi.yml (CI/CD)
• Source tree under src/sshsync:
• cli.py – Click‐style command layer (parses user input, dispatches subcommands)
• client.py – Core engine: orchestrates SSH connections, concurrency, command/file operations
• config.py – Reads/writes YAML config (group → hosts mapping) and loads ~/.ssh/config
• schemas.py – Pydantic or dataclass schemas for validation (hosts, groups, options)
• logging.py – Sets up structured logging and writes to platform‐specific log dirs
• utils.py – Low‐level helpers (path normalization, dry‐run simulation, concurrency wrappers)
• There is no frontend/web layer or database—state is in the user’s filesystem (YAML + SSH config + logs).
README for additional insights
• Architecture is implicit: CLI → config lookup → async SSH connections → logging
• Leverages asyncssh library for concurrency
• Stores operations history locally; uses existing ~/.ssh/config