Install CLI Tools
Install Mopheus CLI, Claude CLI, SwissQL and other command-line tools.
Install CLI Tools
Install Mopheus CLI, Claude CLI, SwissQL and other command-line tools for managing the Mopheus platform and executing agent tasks.
Prerequisites
| Requirement | Notes |
|---|---|
| Mopheus Account | Register an account in the web UI first |
| Mopheus Backend Access | CLI needs to connect to Mopheus server |
Installation Methods
Method 1: Install from Package
If Mopheus platform is already deployed, install CLI tools from the package:
# Enter installation directory
cd /app/mopheus
# Install and configure all CLI tools (mopheus, claude, swissql, kimi-code)
./mopheus.sh install-cli
# Optional: re-run configuration without reinstalling binaries
./mopheus.sh init-cliOn Linux and macOS, installation prepends the CLI directory to the current session and adds it to the detected shell profile (.zshrc, .bashrc, or .profile). If the profile cannot be written, add the printed export PATH=... line manually and reload the profile.
Method 2: Online Installation
If you only need CLI tools, use the online installation script.
Linux / macOS:
curl -fsSL https://mopheus.obs.cn-north-4.myhuaweicloud.com/tools/install-cli-online.sh | bashThe Linux / macOS script supports the following options:
# Install CLI tools only, don't deploy SwissQL
curl -fsSL https://mopheus.obs.cn-north-4.myhuaweicloud.com/tools/install-cli-online.sh | bash -s -- --mode cli
# Specify server URL
curl -fsSL https://mopheus.obs.cn-north-4.myhuaweicloud.com/tools/install-cli-online.sh | bash -s -- --server-url http://your-server:8080
# Install specific tools
curl -fsSL https://mopheus.obs.cn-north-4.myhuaweicloud.com/tools/install-cli-online.sh | bash -s -- --tools mopheus,swissqlWindows:
irm https://mopheus.obs.cn-north-4.myhuaweicloud.com/tools/install-cli-online.ps1 | iexThe Windows PowerShell script installs only the mopheus CLI by default. It does not deploy SwissQL or install other tools such as claude, swissql, or kimi-code. Open a new terminal after installation so the PATH update takes effect.
Verify Installation
# Windows installs only the mopheus CLI by default
mopheus --version
# If you installed other tools, you can verify them too
claude --version
swissql --versionConfigure CLI
Configure Server URL
If using a self-hosted Mopheus instance, configure the server URL:
mopheus config set server_url https://your-mopheus.example.comLogin Authentication
# Option A: Interactive API Token input (create at Settings → API Tokens in web UI)
mopheus login --token
# Option B: Email + password login, CLI automatically creates long-lived API Token
mopheus login --email your@email.com --password yourpasswordVerify login succeeded:
mopheus workspace listIf the list comes back (even empty), you are connected.
Profile Configuration
CLI supports multiple independent profiles, suitable for managing different Mopheus instances simultaneously (e.g., production/staging):
# Specify profiles for different instances
mopheus --profile prod config set server_url https://prod.example.com
mopheus --profile staging config set server_url https://staging.example.comThe default profile is stored in ~/.mopheus/config.json; named profiles in ~/.mopheus/profiles/{name}/config.json.
Use MOPHEUS_PROFILE to set the active profile via environment variable.
Discover & Inspect Profiles
List all configured profiles on your machine:
# List all profiles
mopheus profile list
# Short alias
mopheus profile ls
# Output in JSON format
mopheus profile list -o jsonInspect configuration details for a specific profile (or the default profile):
# Show default profile configuration
mopheus profile show
# Show a specific profile
mopheus profile show prod
# Output in JSON format
mopheus profile show prod -o jsonSensitive tokens are automatically masked in the output. To inspect the active profile currently resolved by flags or environment variables, you can also run:
mopheus config showNext Steps
-
Upgrade Guide — Upgrade services and CLI tools
-
Configure Daemon — Turn your machine into a runtime for agent tasks