syofyanzuhad/sshelf-cli

Sshelf CLI — Elegant command-line interface for managing your Sshelf instance.

Maintainers

Package info

github.com/syofyanzuhad/sshelf-cli

pkg:composer/syofyanzuhad/sshelf-cli

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0-beta.1 2026-05-23 20:13 UTC

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

  1. Clone the repository:
    git clone https://github.com/your-username/sshelf-cli.git
    cd sshelf-cli
  2. Install dependencies:
    composer install
  3. Use the sshelf binary:
    ./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.