Skip to content

Installation

Shield CLI supports multiple installation methods. Choose the one that fits your operating system.

macOS

bash
brew tap fengyily/tap
brew install shield-cli

One-Liner

bash
curl -fsSL https://raw.githubusercontent.com/fengyily/shield-cli/main/install.sh | sh

Windows

powershell
scoop bucket add shield https://github.com/fengyily/scoop-bucket
scoop install shield-cli

PowerShell One-Liner

powershell
irm https://raw.githubusercontent.com/fengyily/shield-cli/main/install.ps1 | iex

Linux

Automatically detects apt / yum / dnf, adds the repository, and installs:

bash
curl -fsSL https://raw.githubusercontent.com/fengyily/shield-cli/main/scripts/setup-repo.sh | sudo bash

Once installed, future updates are available via apt upgrade or yum update.

APT (Debian / Ubuntu)

Manually add the repository:

bash
echo "deb [trusted=yes] https://fengyily.github.io/linux-repo/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/shield-cli.list
sudo apt update
sudo apt install shield-cli

YUM / DNF (RHEL / CentOS / Fedora)

bash
sudo tee /etc/yum.repos.d/shield-cli.repo <<EOF
[shield-cli]
name=Shield CLI Repository
baseurl=https://fengyily.github.io/linux-repo/yum
enabled=1
gpgcheck=0
EOF
sudo yum install shield-cli   # or: dnf install shield-cli

Binary Install

bash
curl -fsSL https://raw.githubusercontent.com/fengyily/shield-cli/main/install.sh | sh

Manual deb / rpm Install

Download packages from GitHub Releases:

bash
# Debian / Ubuntu
sudo dpkg -i shield-cli_<version>_amd64.deb

# RHEL / CentOS
sudo rpm -i shield-cli_<version>_amd64.rpm

China Mirror

If GitHub is slow in your region, use the jsDelivr CDN mirror:

bash
curl -fsSL https://cdn.jsdelivr.net/gh/fengyily/shield-cli@main/install.sh | sh

Docker

bash
# Use the prebuilt image (recommended)
docker run -d --name shield \
  --network host \
  --restart unless-stopped \
  fengyily/shield-cli

# Or build from source
docker build -t shield-cli https://github.com/fengyily/shield-cli.git
docker run -d --name shield --network host --restart unless-stopped shield-cli

--network host shares the host's network stack so Shield CLI can reach local and LAN services. Open http://localhost:8181 after startup.

Note: --network host only works on Linux. On macOS / Windows Docker Desktop, use port mapping instead:

bash
docker run -d --name shield -p 8181:8181 --restart unless-stopped fengyily/shield-cli

Build from Source

bash
git clone https://github.com/fengyily/shield-cli.git
cd shield-cli
go build -o shield .

Requires Go 1.25.0 or later.

Verify Installation

bash
shield --version

If you see a version number, the installation was successful.

Supported Platforms

OSArchitectures
macOSamd64, arm64 (Apple Silicon)
Linuxamd64, arm64, 386, armv7
Windowsamd64, arm64, 386

Next Steps