A Go CLI tool to control multiple VPS instances via SSH using a YAML configuration file.
Using Go:
go install github.com/mrmahile/axion@latest
Pre-built Binaries:
wget https://github.com/mrmahile/axion/releases/download/v0.0.3/axion-linux-amd64-0.0.3.tgz
tar -xvzf axion-linux-amd64-0.0.3.tgz
mv axion ~/go/bin/
From Source:
git clone --depth 1 https://github.com/mrmahile/axion.git
cd axion; go install
The tool uses a configuration file located at ~/.config/axion/config.yaml. On first run, if the file doesn't exist, you'll need to create it manually.
default_remote_location: "/root"
credentials:
- name: "worker1"
# Optional: friendly VPS name
ip: "192.168.1.1"
username: "root"
password: "yourpassword"
- name: "worker2"
# Optional: friendly VPS name
ip: "192.168.1.2"
username: "admin"
password: "anotherpassword"
- ip: "192.168.1.3"
# Name field is optional - IP-only entries work too
username: "root"
password: "anotherpassword"
- name: "worker4"
# Custom SSH port example
ip: "192.168.1.4:30224"
username: "root"
password: "anotherpassword"Note: The name field is optional. You can use either IP addresses or VPS names (or both). If a VPS name is provided, you can reference the server using the number in its name (e.g., worker60 → index 60). The tool matches VPS by extracting the numeric part from their names, so entries don't need to be in sequential order.
Custom SSH Port: You can specify a custom SSH port by appending it to the IP address with a colon (e.g., 192.168.1.4:30224). If no port is specified, the default port 22 is used.
You can manually create or edit the config file:
mkdir -p ~/.config/axion
nano ~/.config/axion/config.yaml
chmod 600 ~/.config/axion/config.yamlExecute a command on a single VPS by number:
axion -i 42 -c "uptime"Execute a command on multiple specific VPS (comma-separated):
axion -i 52,42,53,56,61,64 -c "tmux ls"Execute a command on multiple VPS instances in a range:
axion -l 1-20 -c "apt install nginx -y"-i <id>- Run command on VPS by number. Supports single number or comma-separated list (e.g.,42or52,42,53)-l <range>- Run command on multiple VPS in a range (e.g.,1-20)-c "<command>"- Command to execute (required)-silent- Silent mode. Suppresses banner output-version- Print the version of the tool and exit
- Either
-ior-lmust be provided (not both) -cmust be non-empty- VPS numbers are matched by the number in their name (e.g.,
worker60matches index60)
[worker60] SUCCESS
STDOUT:
<output>
STDERR:
<error if any>
[worker60] SUCCESS
STDOUT:
<output>
[worker61] FAILED
STDERR:
<error>
- Protect config file:
chmod 600 ~/.config/axion/config.yaml - Passwords are not logged
- SSH key authentication (via
secretfield) is planned for future enhancement
# Update packages on VPS #42
axion -i 42 -c "apt update"
# Install nginx on VPS #1-20
axion -l 1-20 -c "apt install nginx -y"
# Check disk usage on multiple selected VPS
axion -i 52,42,53,56,61,64 -c "df -h"
# Restart service on multiple VPS
axion -l 1-10 -c "systemctl restart nginx"
# Check tmux sessions on specific VPS
axion -i 52,42,53,56,61,64 -c "tmux ls"
# Run command in silent mode (no banner)
axion -silent -i 42 -c "uptime"
# Check version
axion -versionThe tool matches VPS entries by extracting the numeric part from their names:
worker60→ matches index60worker42→ matches index42server100→ matches index100
This means you can reference VPS by their logical numbers even if they're not in sequential order in your config file.