HostActions is an interactive, FZF-driven PowerShell ssh host automation tool for managing and executing actions across one or many SSH hosts—either sequentially or in parallel.
It is designed for:
- Fleet-wide automation
- SSH-based task execution
- SCP / rsync workflows
- System reporting
- DevOps-style orchestration
- High-volume host management
- Powershell Core
- fzf
Clone the repository:
git clone https://github.com/Kylar514/HostActions.git
cd HostActions- Add
Import-Module /path/to/dir/HostActions/To Powershell profile or - Place the repo in your PowerShell modules directory, that is imported in your profile
This allows you to run Start-HostActions directly from any PowerShell session.
Create an alias that runs the script through PowerShell:
alias Start-HostActions="pwsh -Command Start-HostActions"Important: This project must be executed using
pwsh, even when launched from Bash or Zsh. NOTE this the module needs to still be imported to your powershell profile
Add the following to your ~/.tmux.conf, then reload tmux:
bind-key c-f run-shell "pwsh -Command Start-HostActions"Make sure
pwshis explicitly included in the command. NOTE this the module needs to still be imported to your powershell profile
Reload tmux:
tmux source-file ~/.tmux.confThis utility converts your existing SSH config into the JSON format used by HostActions.
- SSH config input:
~/.ssh/config - Generated JSON output:
~/.ssh/config.json
This format will likely be simplified in the future.
# <empty line between each host>
Host <HOST_ALIAS>
HostName <HOST_IP>
User <HOST_USER>
IdentityFile <SSH_KEY_PATH>
ProxyJump <PROXY_JUMP_IF_APPLICABLE> # Also used as a category if present
# Category Personal # Custom category (free-form)
# Router # Free-form comment for FZF searching
# <empty line between each host>
ProxyJumpis automatically treated as a category if present.# Category <Name>is used for custom grouping.- Any other comments are included as searchable notes in FZF.
- Interactive host selection via fzf
- Category-based filtering
- Supports single or multi-host execution
- Modular action system
- Built-in Sequential & Parallel execution templates
- Configurable MaxParallel throttle control
- Works with:
- SSH
- SCP
- rsync
- Remote command execution
- Remote reporting
- User-extensible without modifying core logic
HostActions/
├── HostActions.ps1
├── ConvertJson.ps1
├── Templates/
│ ├── Parallel_Template.ps1
│ └── Sequential_Template.ps1
└── actions/
├── ssh.ps1
└── action_*.ps1
Responsibilities:
- Parses SSH config JSON
- Displays hosts and categories using fzf
- Handles:
- Single or multiple host selection
- Category-based filtering
- Launches:
- User-selected actions
- Built-in templates
- Manages:
- Input parsing
- Action routing
- Multi-host dispatch
Templates define how actions run.
- Executes one host at a time
- Used for:
- Step-by-step deployments
- Debugging
- Ordered automation
- Operations that must not overlap
- Executes across many hosts simultaneously
- Includes:
-MaxParallelthrottle control- Job queue + semaphore logic
- Used for:
- rsync
- scp
- Reporting
- Compression + retrieval
- Fleet-wide health checks
- Large-scale automation
The actions/ directory contains user-defined scripts that are launched by
HostActions.ps1.
- Actions receive one or more host arguments
- Can be:
- Sequential
- Parallel
- Hybrid
action_scp_dir_push.shaction_scp_dir_pull.shaction_parallel_report.ps1action_ssh_tmux.ps1action_rsync.ps1
- SSH into 150 machines
- Run:
- Memory audit
- Disk usage report
- PowerShell / Node / PM2 version checks
- Open port scan
- Save each system’s output to JSON
- Aggregate into a single master report
| Mode | Behavior | Use Case |
|---|---|---|
| Sequential | One host at a time | Deployments, ordered tasks |
| Parallel | Many hosts simultaneously | Reports, rsync, SCP, audits |
- Interactive DevOps workflows
- Zero-lock-in action system
- Easy scaling from 1 → 150+ hosts
- Safe parallel execution
- Clean separation:
- Core engine
- Templates
- Actions
- Scriptable & composable automation
- Better terminal and cross platform support
MIT
HostActions gives you:
- A powerful interactive host selector
- Modular execution strategies
- Massive parallel automation potential
- A clean, extensible DevOps-grade framework
Built for:
- Sysadmins
- SREs
- Homelabs
- Infrastructure automation
- Network operations