CLI reference

One binary, addtothese, na everything wey you need: log in, open tunnels and forward TCP ports. Your login dey stored for ~/.addtothese/config.yaml (%USERPROFILE%\.addtothese\config.yaml for Windows).

addtothese login

addtothese login --token att_...

E dey save API token. If you no put --token, e go ask for di token for standard input. addtothese logout go forget am.

addtothese http

addtothese http <port|host:port|url> [--subdomain name]

E dey expose local HTTP service. If you no put --subdomain, you go get random endpoint. If you put am, di tunnel go use name wey you reserve for di dashboard. Di CLI dey reconnect by imsef after network drop and e dey refresh im credentials before dem expire.

FlagDefaultMeaning
--subdomainrandomReserved name to use
--timeout10sTimeout to forward each request go your service
--access-logtruePrint every request wey pass through di proxy
--log-levelwarndebug, info, warn or error

Protect URL with email codes

addtothese http 4321 --allowed-email ana@gmail.com --allowed-email '*@company.com'

Na only the people wey you list fit open the URL. Visitor go enter their email; if e dey the list, dem go receive 6-digit code wey go work for 10 minutes, and dem go stay signed in for 24 hours. *@company.com dey allow one whole domain. Repeat the flag for every address or domain.

Your service go receive the verified address for the X-AddToThese-Email header. Every run dey replace the list, so if you run am without --allowed-email the URL go become public again. You fit also edit the list for the endpoint page for the dashboard.

addtothese tcp

addtothese tcp 5432 --subdomain mydb

E dey expose raw TCP port like Postgres, SSH or RDP. People wey need reach am go run di forwarder for dia side, wey go open local port wey connect to your service:

addtothese forward tcp 5432 mydb --connect.url https://mydb.addtothese.com

Dem fit then connect to localhost:5432 as if di database dey dia own machine.

Environment variables

VariableMeaning
ADDTOTHESE_TOKENAPI token, e dey override di one wey you save
ADDTOTHESE_CONFIGPath to another config file