| name | syfthub-cli |
| description | Execute SyftHub CLI commands for privacy-preserving AI interactions. Use when the user wants to (1) authenticate with SyftHub platform, (2) browse or list AI endpoints and users, (3) query AI models with RAG (retrieval-augmented generation), (4) manage aggregator or accounting service configurations, (5) update the CLI, or (6) any task involving the `syft` command-line tool. Triggers on requests like "login to syfthub", "list endpoints", "query alice/gpt", "syft ls", "syft query", or any mention of the syft CLI. |
SyftHub CLI
The syft CLI is a standalone command-line tool for interacting with the SyftHub privacy-preserving AI platform. It provides Unix-style commands for authentication, endpoint discovery, RAG queries, and configuration management.
Quick Reference
| Command | Purpose |
|---|
syft login | Authenticate with username/password |
syft logout | Clear stored credentials |
syft ls | List active users |
syft ls <user> | List user's endpoints |
syft ls <user>/<endpoint> | Show endpoint details |
syft query <target> "<prompt>" | RAG query with streaming output |
syft config show | Display current configuration |
syft upgrade | Update CLI to latest version |
Authentication
syft login
syft logout
Tokens stored in ~/.syfthub/config.json:
- Access token: 30 min TTL
- Refresh token: 7 days TTL
Browsing Endpoints
syft ls
syft ls alice
syft ls alice/gpt-model
syft ls -l
syft ls --long
syft ls --json
Type Icons:
- ⚡ = model (LLM generation)
- 📦 = data_source (RAG retrieval)
- 🔀 = model_data_source (combined)
RAG Queries
syft query alice/gpt "Explain quantum computing"
syft query alice/gpt "Hello world" --json
The query command:
- Acquires satellite tokens for the target endpoint
- Sends request to aggregator service
- Streams response tokens in real-time
Configuration Management
Config file: ~/.syfthub/config.json
syft config show
syft config set timeout 60
syft config set hub_url https://hub.syftbox.org
Aggregator Management
syft add aggregator prod https://aggregator.syftbox.org
syft add aggregator staging https://staging-aggregator.example.com
syft list aggregator
syft update aggregator prod
syft remove aggregator staging
Accounting Service Management
syft add accounting main https://accounting.example.com
syft list accounting
CLI Updates
syft upgrade
syft upgrade --check
syft upgrade -y
Disable auto-update checks:
export SYFT_NO_UPDATE_CHECK=1
syft --no-update-check <command>
Shell Completion
syft --install-completion bash
syft --install-completion zsh
syft --install-completion fish
Completions are cached for 5 minutes.
Installation
Binary (recommended):
curl -fsSL https://raw.githubusercontent.com/OpenMined/syfthub/main/cli/install.sh | sh
SYFT_VERSION=1.2.0 curl -fsSL https://raw.githubusercontent.com/OpenMined/syfthub/main/cli/install.sh | sh
SYFT_INSTALL_DIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/OpenMined/syfthub/main/cli/install.sh | sh
pip:
pip install syfthub-cli
uv add syfthub-cli
Common Workflows
First-time Setup
curl -fsSL https://raw.githubusercontent.com/OpenMined/syfthub/main/cli/install.sh | sh
syft login
syft ls
Discover and Query
syft ls
syft ls alice
syft ls alice/gpt-model
syft query alice/gpt-model "Hello"
Configure Custom Aggregator
syft add aggregator myagg https://my-aggregator.example.com
syft config set defaults.aggregator myagg
syft config show
Config File Structure
{
"access_token": "...",
"refresh_token": "...",
"aggregators": {
"prod": "https://aggregator.example.com"
},
"accounting_services": {
"main": "https://accounting.example.com"
},
"defaults": {
"aggregator": "prod"
},
"timeout": 30,
"hub_url": "https://hub.syftbox.org"
}