CLI Usage
The asocks CLI lets you generate, list, and manage proxies directly from your terminal.
Authentication
Section titled “Authentication”Set your API key as an environment variable:
export ASOCKS_API_KEY="sk-your-api-key"Or pass it directly with --api-key:
asocks balance --api-key sk-your-api-keyCommands
Section titled “Commands”wizard — Interactive Wizard
Section titled “wizard — Interactive Wizard”Step-by-step country → state → city selection via fuzzy search:
asocks wizard 10asocks wizard 5 --format json --output proxies.jsongenerate
Section titled “generate”Create new proxy ports and export them.
# Generate 100 US proxies → fileasocks generate 100 --country US --format txt --output proxies.txt
# Generate with CSV outputasocks generate 25 --format csv --output proxies.csvOptions:
| Flag | Short | Description | Default |
|---|---|---|---|
--country | -c | ISO country code | (any) |
--format | -f | txt, json, csv | txt |
--output | -o | Output file path | (stdout) |
List your existing proxy ports.
asocks listasocks list --country USsearch
Section titled “search”Search available proxies without creating ports.
asocks search 20 --country USasocks search 10balance
Section titled “balance”Show your current account balance.
asocks balancecountries
Section titled “countries”List all available proxy countries.
asocks countriesExport Formats
Section titled “Export Formats”TXT (default)
Section titled “TXT (default)”One proxy URL per line:
socks5://user:pass@host:10001socks5://user:pass@host:10002Structured array:
[ {"id": 1001, "host": "proxy.asocks.com", "port": 10001, "protocol": "socks5", "country": "US"}]Tabular format with headers:
id,host,port,login,password,protocol,country,url1001,proxy.asocks.com,10001,user,pass,socks5,US,socks5://user:pass@proxy.asocks.com:10001