Skip to content

CLI Usage

The asocks CLI lets you generate, list, and manage proxies directly from your terminal.

Set your API key as an environment variable:

Terminal window
export ASOCKS_API_KEY="sk-your-api-key"

Or pass it directly with --api-key:

Terminal window
asocks balance --api-key sk-your-api-key

Step-by-step country → state → city selection via fuzzy search:

Terminal window
asocks wizard 10
asocks wizard 5 --format json --output proxies.json

Create new proxy ports and export them.

Terminal window
# Generate 100 US proxies → file
asocks generate 100 --country US --format txt --output proxies.txt
# Generate with CSV output
asocks generate 25 --format csv --output proxies.csv

Options:

FlagShortDescriptionDefault
--country-cISO country code(any)
--format-ftxt, json, csvtxt
--output-oOutput file path(stdout)

List your existing proxy ports.

Terminal window
asocks list
asocks list --country US

Search available proxies without creating ports.

Terminal window
asocks search 20 --country US
asocks search 10

Show your current account balance.

Terminal window
asocks balance

List all available proxy countries.

Terminal window
asocks countries

One proxy URL per line:

socks5://user:pass@host:10001
socks5://user:pass@host:10002

Structured array:

[
{"id": 1001, "host": "proxy.asocks.com", "port": 10001, "protocol": "socks5", "country": "US"}
]

Tabular format with headers:

id,host,port,login,password,protocol,country,url
1001,proxy.asocks.com,10001,user,pass,socks5,US,socks5://user:pass@proxy.asocks.com:10001