Command Line Tool
This page introduces how to use LibCyber's command line tool cyber.
Installation
Current latest version: v2.0.2
One-click script installation (recommended)
It is recommended to install under the root user (non-sudo) on Linux. Otherwise, permission issues may occur when setting up auto-start at boot and enabling TUN mode.
curl -fsSL https://getcyber.sh | bash
After installation, run cyber to enter the setup wizard.
Manual installation (for use in restricted environments)
If your system environment does not have real sudo permissions, cannot access dbus, is in a container (which may be encountered when using shared GPU or AI model rental services), or cannot use systemd services, follow the steps below to install manually. Note that the engine will not start automatically at boot with this method. After each server restart, you need to manually run cyber engine start before it can be used.
# Download (Linux x86_64 example; for ARM64, replace amd64 with arm64)
wget https://getcyber.sh/download/cyber-linux-amd64.tar.gz
# Extract
tar -zxvf cyber-linux-amd64.tar.gz
# Install to system directory
sudo install -m 755 cyber /usr/local/bin/cyber
sudo install -m 755 cyber-engine /usr/local/bin/cyber-engine
# Run (first run automatically enters the setup wizard)
cyber
The wizard will guide you through:
- Logging in to your LibCyber account
- Downloading node configuration
- Installing systemd service (root + systemd environments only)
- Starting the engine
Dashboard
Run cyber (no arguments) to enter the TUI dashboard, where you can use keyboard shortcuts for quick operations:
| Shortcut | Function |
|---|---|
n | Switch node |
m | Switch mode (rule/global) |
t | Toggle TUN tunnel |
b | Node speed test |
d | System diagnostics |
l | View logs |
i | User info |
r | Restart engine |
q | Quit |
Usage
cyber --help
Quick Start
# 1. Get proxy configuration commands
cyber proxy shell
# 2. Copy and execute the output
# export http_proxy=http://127.0.0.1:7890;export https_proxy=http://127.0.0.1:7890;export all_proxy=socks5://127.0.0.1:7891
# 3. Test whether the proxy is working
curl ip.sb
# If you don't want to manually configure the proxy, enable TUN mode to automatically route all system traffic
# cyber tunnel on
Detailed Introduction
Account Management
# Interactive login (enters TUI login screen)
cyber login
# Login via command line
printf '%s\n' 'yourpassword' | cyber login -u [email protected] --password-stdin
# Login and download node configuration at the same time
printf '%s\n' 'yourpassword' | cyber login -u [email protected] --password-stdin -d
Engine Management
# Start the engine
cyber engine start
# Stop the engine
cyber engine stop
# Restart the engine
cyber engine restart
# View engine status
cyber engine status
# Download the engine
cyber engine download
# View engine logs
cyber engine log
# View raw logs
cyber engine log --raw
Node Management
# View node list (interactive)
cyber node list
# Download/update node configuration
cyber node download
cyber node update
# Switch node
cyber node change <node name>
# Node speed test
cyber node benchmark
Routing Mode
# View routing mode
cyber mode show
# Switch routing mode (rule or global)
cyber mode change <mode name>
# Interactive selection
cyber mode
Proxy Configuration
# View proxy port information
cyber proxy info
# Configure git proxy
cyber proxy git
# Remove git proxy
cyber proxy unset git
# Configure npm proxy
cyber proxy npm
# Remove npm proxy
cyber proxy unset npm
# Configure yarn proxy
cyber proxy yarn
# Remove yarn proxy
cyber proxy unset yarn
# Configure pnpm proxy
cyber proxy pnpm
# Remove pnpm proxy
cyber proxy unset pnpm
# Print shell environment variables (for eval)
cyber proxy shell
TUN Mode
# Enable TUN mode (routes all system traffic)
cyber tunnel on
# Disable TUN mode
cyber tunnel off
# View TUN status
cyber tunnel
Configuration Management
# Interactive editor for engine settings (ports, DNS, etc.)
cyber config edit
Language Switching
cyber language zh # 中文
cyber language en # English
cyber language ja # 日本語
cyber language ko # 한국어
cyber language ru # Русский
Check for Updates
cyber update
System Diagnostics
cyber doctor
View Version
cyber version
Uninstallation
Using the purge command
cyber purge
Type purge when prompted to confirm. This will delete all configuration and data files. To skip confirmation:
cyber purge --force
Manual uninstallation
If cyber purge is not available, you can clean up manually:
#!/bin/bash
set -e
cyber engine stop 2>/dev/null || true
rm -f /usr/local/bin/cyber /usr/local/bin/cyber-engine
rm -rf /etc/cyber/ /var/lib/cyber/ /var/log/cyber/
rm -rf ~/.config/cyber/ ~/.local/share/cyber/ ~/.local/state/cyber/
rm -f /etc/systemd/system/cyber.service
systemctl daemon-reload 2>/dev/null || true
systemctl reset-failed 2>/dev/null || true
echo "Cyber has been removed successfully."
Uninstalling old version cyber (1.x)
If you previously installed cyber 1.x, you need to uninstall the old version before installing v2. The 1.x version uses different binary names, config paths, and systemd service names from v2. Installing v2 directly will not automatically clean up leftover files from the old version.
#!/bin/bash
set -e
# Stop the old engine
cyber core stop 2>/dev/null || true
# Attempt old version cleanup
cyber purge -f 2>/dev/null || true
# Remove old binaries
rm -f /usr/bin/cyber /usr/bin/cyber-core /usr/local/bin/cyber-core
# Remove old config and data directories
rm -rf ~/.cyber/ /etc/cyber-core/ /var/log/cyber-core/
# Remove old systemd service
rm -f /etc/systemd/system/cyber-core.service
systemctl daemon-reload 2>/dev/null || true
systemctl reset-failed 2>/dev/null || true
echo "Cyber 1.x has been removed successfully."
After cleanup, follow the installation steps above to install v2.
Frequently Asked Questions
1. After installation, an error appears when running: cyber: command not found
Check whether /usr/local/bin is included in your Linux PATH. If not, add it manually. Run export PATH=$PATH:/usr/local/bin to add it to the current terminal session, then try cyber --help again. This is only valid for the current session. To make it permanent, add export PATH=$PATH:/usr/local/bin to ~/.bashrc or ~/.zshrc, then run source ~/.bashrc or source ~/.zshrc.
2. Unable to connect to the network after restarting the server
If installed manually, the engine will not start automatically at boot. You need to manually run cyber engine start. To enable auto-start, run cyber as root and install the systemd service through the setup wizard.
3. Security enhancement
If you are concerned about cross-origin attacks targeting the engine, run cyber config edit to modify the engine configuration file. Change the port in external-controller to any other number in the range 1000-65535, then restart the engine with cyber engine restart.