FreeGuard CLI Commands Reference
FreeGuard CLI टर्मिनल से आपकी VPN connection, subscription, और configuration को प्रबंधित करने के लिए commands का एक complete set प्रदान करता है। हर command scripting और AI agent integration के लिए --json output support करती है।
Global Flags
ये flags किसी भी command के साथ काम करते हैं:
| Flag | Description |
|---|---|
--json |
JSON format में output (agent-friendly) |
--quiet, -q |
Silent mode, केवल results output करें |
--verbose, -v |
Debug information के साथ detailed output |
--no-color |
Colored output disable करें |
--lang <code> |
Interface language (auto, en, zh, ja, आदि) |
--config <path> |
एक specific configuration file उपयोग करें |
Connection
freeguard connect
एक VPN server से connect करें। Arguments के बिना, automatically सबसे तेज़ उपलब्ध node चुनता है।
# Auto-connect to the best server
freeguard connect
# Connect to a specific node by ID
freeguard connect us-new-01
# Connect to the best server in a country
freeguard connect --country JP
# Use a specific protocol
freeguard connect --protocol anytls
# Enable TUN mode (requires sudo/admin)
freeguard connect --tun
Human-readable output:
✓ Connected to United States - New York (us-new-01)
Protocol: anytls | Latency: 42ms
Proxy: 127.0.0.1:7890 (HTTP/SOCKS5)
JSON output:
freeguard connect --json
{"status": "connected", "node": "us-new-01", "protocol": "anytls", "latency_ms": 42}
Flags:
| Flag | Description |
|---|---|
--country <code> |
इस देश में सबसे अच्छे node से connect करें (ISO 3166-1 alpha-2) |
--protocol <name> |
Preferred protocol (anytls, hysteria2, vless, आदि) |
--tun |
System-wide VPN के लिए TUN mode उपयोग करें (elevated privileges आवश्यक) |
freeguard disconnect
वर्तमान VPN server से disconnect करें।
freeguard disconnect
✓ Disconnected
freeguard disconnect --json
{"status": "disconnected"}
freeguard status
वर्तमान connection status और traffic statistics दिखाएँ।
freeguard status
FreeGuard VPN Status
────────────────────
Status: ● Connected
Node: United States - New York (us-new-01)
Protocol: anytls
Latency: 42ms
Upload: 1.2 MB/s
Download: 15.8 MB/s
Duration: 2h 15m
Mode: System Proxy (HTTP/SOCKS5)
freeguard status --json
{
"connected": true,
"node": {"id": "us-new-01", "name": "United States - New York", "country": "US"},
"protocol": "anytls",
"latency_ms": 42,
"traffic": {"upload_bps": 1258291, "download_bps": 16569754},
"duration_seconds": 8100,
"mode": "system_proxy",
"proxy_port": {"mixed": 7890}
}
Authentication
freeguard login
FreeGuard के साथ authenticate करें। Email verification (account की आवश्यकता नहीं) या FreeGuard account login support करता है।
Email login (recommended):
# Step 1: Request verification code
freeguard login --email [email protected] --send-code
# Step 2: Enter the code
freeguard login --email [email protected] --code 123456
✓ Logged in successfully!
✓ Found 1 active subscription (Pro Plan, expires 2026-12-01)
Account login (opens browser):
freeguard login --account
Flags:
| Flag | Description |
|---|---|
--email <address> |
Email verification के साथ login करें |
--send-code |
Verification code email पर भेजें |
--code <digits> |
6-digit verification code submit करें |
--account |
Browser OAuth के माध्यम से FreeGuard account login करें |
freeguard logout
Stored credentials clear करें और यदि currently connected हैं तो disconnect करें।
freeguard logout
✓ Logged out. Credentials cleared.
Subscription
freeguard subscribe list
Available subscription plans और आपकी current subscription status देखें।
freeguard subscribe list
Your Subscription
─────────────────
Plan: Pro
Status: Active
Expires: 2026-12-01
Traffic: 450 GB / Unlimited
Available Plans
───────────────
Plan Monthly Quarterly Annual
Basic $4.99 $12.99 $39.99
Pro $9.99 $24.99 $79.99
freeguard subscribe list --json
{
"current": {"plan": "pro", "status": "active", "expires": "2026-12-01"},
"plans": [
{"name": "basic", "prices": {"monthly": 4.99, "quarterly": 12.99, "annual": 39.99}},
{"name": "pro", "prices": {"monthly": 9.99, "quarterly": 24.99, "annual": 79.99}}
]
}
freeguard subscribe create
एक नया subscription बनाएँ। Payment Stripe या cryptocurrency के माध्यम से complete करने के लिए आपका browser खोलता है।
# Interactive plan selection
freeguard subscribe create
# Specify plan directly
freeguard subscribe create --plan pro --email [email protected]
Flags:
| Flag | Description |
|---|---|
--plan <name> |
Subscription plan (basic, pro) |
--email <address> |
Subscription delivery के लिए email |
Configuration
freeguard config get
एक configuration value पढ़ें।
freeguard config get proxy.port
7890
freeguard config get proxy.port --json
{"key": "proxy.port", "value": 7890}
freeguard config set
एक configuration value बदलें।
freeguard config set proxy.port 8080
✓ proxy.port set to 8080
Common configuration keys:
| Key | Default | Description |
|---|---|---|
proxy.port |
7890 |
HTTP/SOCKS5 proxy port |
proxy.mode |
rule |
Proxy mode: rule, global, direct |
core.api_port |
9090 |
Mihomo API port |
core.pinned_version |
(empty) | mihomo को एक specific version पर pin करें |
dns.provider |
auto |
DNS provider |
update.auto_check |
true |
Startup पर updates जांचें |
freeguard config edit
Configuration file को अपने default editor में खोलें।
freeguard config edit
Diagnostics
freeguard doctor
Issues diagnose करने के लिए एक comprehensive environment check चलाएँ।
freeguard doctor
FreeGuard Environment Check
───────────────────────────
✓ OS: macOS 15.2 (arm64)
✓ CLI version: v1.0.0
✓ Core version: mihomo v1.19.21
✓ Config dir: ~/.freeguard/
✓ Credentials: Logged in (email: u***@example.com)
✓ Subscription: Active (expires 2026-12-01)
✓ Network: Internet reachable
✓ DNS: Working (8.8.8.8)
✗ TUN permission: Not available (run with sudo for TUN mode)
✓ Port 7890: Available
✓ GeoIP database: Up to date (2026-03-15)
Result: 10/11 checks passed. TUN mode requires elevated privileges.
freeguard doctor --json
{
"checks": [
{"name": "os", "status": "pass", "detail": "macOS 15.2 (arm64)"},
{"name": "cli_version", "status": "pass", "detail": "v1.0.0"},
{"name": "tun_permission", "status": "fail", "detail": "Not available (run with sudo)"}
],
"passed": 10,
"total": 11
}
freeguard version
CLI और core engine की version information दिखाएँ।
freeguard version
FreeGuard CLI v1.0.0
Core: mihomo v1.19.21
OS: darwin/arm64
freeguard version --json
{"cli": "1.0.0", "core": "1.19.21", "os": "darwin", "arch": "arm64"}
Advanced (Phase 2+)
निम्नलिखित commands future releases के लिए planned हैं।
freeguard node list
Filtering और sorting के साथ available VPN nodes सूचीबद्ध करें।
freeguard node list
freeguard node list --country US --sort latency
Flags:
| Flag | Description |
|---|---|
--country <code> |
country code से filter करें |
--protocol <name> |
protocol से filter करें |
--sort <field> |
speed, latency, या load के अनुसार sort करें |
freeguard node test
Nodes की latency और speed test करें।
freeguard node test us-new-01
freeguard node test --all
freeguard monitor
अपने terminal में real-time traffic monitoring दिखाएँ।
freeguard monitor
↑ 0.8 MB/s ↓ 12.3 MB/s Connections: 47
freeguard core
अंतर्निहित mihomo इंजन को प्रबंधित करें।
# Check core status
freeguard core status
# Update to latest core version
freeguard core update
# Restart the core engine
freeguard core restart
freeguard shell
एक ही सत्र में कई कमांड चलाने के लिए इंटरैक्टिव REPL मोड में प्रवेश करें।
freeguard shell
freeguard dashboard
रियल-टाइम ट्रैफिक ग्राफ़, नोड सूची, और कनेक्शन विवरण के साथ TUI dashboard खोलें।
freeguard dashboard
अंतिम अद्यतन: March 2026