syofyanzuhad / sshelf-cli
Sshelf CLI — Elegant command-line interface for managing your Sshelf instance.
v1.0.0-beta.1
2026-05-23 20:13 UTC
Requires
- php: ^8.2
- illuminate/http: ^12.17
- illuminate/log: ^12.17
- laravel-zero/framework: ^12.0.2
- nunomaduro/termwind: ^2.4
Requires (Dev)
- laravel/pint: ^1.25.1
- mockery/mockery: ^1.6.12
- pestphp/pest: ^3.8.4|^4.1.2
This package is auto-updated.
Last update: 2026-05-23 20:17:11 UTC
README
Elegant command-line interface for managing your Sshelf instance.
Sshelf CLI allows you to manage your servers, SSH keys, tags, and execute remote commands directly from your terminal.
Installation
Prerequisites
- PHP 8.2 or higher
Local Setup
- Clone the repository:
git clone https://github.com/your-username/sshelf-cli.git cd sshelf-cli - Install dependencies:
composer install
- Use the
sshelfbinary:./sshelf --version
Global Installation (Optional)
To use sshelf from anywhere, create a symlink:
sudo ln -s "$(pwd)/sshelf" /usr/local/bin/sshelf
Getting Started
1. Authentication
Login to your Sshelf instance using your API URL and Bearer Token:
sshelf auth:login
Check your connection status:
sshelf ping
2. Manage Servers
List all your servers:
sshelf server:list
Add a new server:
sshelf server:add --name="Web-01" --host="1.2.3.4" --username="root"
3. Remote Execution
Execute a command on a remote server by ID:
sshelf exec 1 "uptime"
Run a saved Quick Command:
sshelf qc:run 5
Core Commands
| Command | Description |
|---|---|
auth:login |
Authenticate with your Sshelf instance |
auth:status |
Show current authentication status |
ping |
Check connectivity to your Sshelf instance |
server:list |
List all servers (supports --json, --group) |
server:add |
Add a new server |
exec |
Execute a command on a remote server |
qc:run |
Run a saved quick command |
key:list |
List all SSH keys |
tag:list |
List all tags |
completion |
Generate shell completion scripts |
Shell Completion
Generate completion scripts for your favorite shell:
# Zsh sshelf completion zsh > /usr/local/share/zsh/site-functions/_sshelf # Bash sshelf completion bash >> ~/.bashrc
License
Sshelf CLI is open-source software licensed under the MIT license.