- name
- onlyvpn-cli
- description
- >-
- C
- \Program Files\onlynet) or vpn-cli on macOS, after the GUI/main process is
- version
- 1.0.0
- metadata
- openclaw
- requires
- anyBins
- homepage
- https://onlyvpn.net
- emoji
- 🔐
OnlyVPN CLI
Platform invocation
| Platform | Main app (start this first) | CLI |
|---|---|---|
| Windows | onlynet.exe in install dir (default C:\Program Files\onlynet\) | vpn-cli.exe (same folder by default) |
| macOS | Onlynet.app/Contents/MacOS/OnlyNet (see install layout below) | vpn-cli (often on PATH after copy to /usr/local/bin/) |
Prerequisite: The main client process must be running before vpn-cli / vpn-cli.exe will work. Start onlynet.exe (Windows) or launch OnlyNet inside Onlynet.app (macOS) first; then use the CLI.
All documented subcommands and flags are passed after the CLI name (e.g. Windows: vpn-cli.exe status; macOS: vpn-cli status).
When to use this skill
Apply when automating or documenting the OnlyVPN VPN client through vpn-cli.exe (Windows) or vpn-cli (macOS)—only after the main app (onlynet.exe / OnlyNet) is running. Output is JSON for scripting; parse code, message, and data / error fields.
Install and startup order (before using the CLI)
Windows
- Download:
https://onlyvpn.net/download/client/onlynet_win.exe - Run the installer. By default the application installs under
C:\Program Files\onlynet. - Start the main client first: run
onlynet.exefrom that directory, for example:
"C:\Program Files\onlynet\onlynet.exe"
Keep this process running; the CLI talks to it.
- Then run the CLI with
vpn-cli.exeplus arguments, for example:
"C:\Program Files\onlynet\vpn-cli.exe" --version
If the installer adds that directory to PATH, you can run onlynet.exe and vpn-cli.exe without full paths.
macOS
- Download:
https://onlyvpn.net/download/client/onlynet_mac.zip - Unzip the archive. Locate
Onlynet.appin the extracted folder (exact path depends on zip layout). Optionally install the included.dmgand copyOnlynet.appto Applications—either way you need the bundle on disk. - Start the main client first (required before
vpn-cliworks). Standard macOS bundle layout usesContents/MacOS/(not a singleContentsMacOSfolder):
open path/to/Onlynet.appor run the binary directly:
path/to/Onlynet.app/Contents/MacOS/OnlyNetIf the app lives under Applications, use e.g. /Applications/Onlynet.app/Contents/MacOS/OnlyNet or open -a Onlynet. Leave this process running.
- Use the
vpn-clibinary from the zip (no.exe) with arguments. If it is not onPATH, copy it into a directory onPATH, for example:
sudo cp path/to/vpn-cli /usr/local/bin/
sudo chmod +x /usr/local/bin/vpn-cli- Confirm (with
OnlyNetalready running):vpn-cli --version
Response shape (success)
Successful commands return JSON with code, message, and usually data. Example shapes are in reference.md.
Note: Product docs may state success as code: 0; examples below often use code: 200. Treat success per your installed build (either 0 or 200 as documented) and treat other values as failure; always read message and optional error.
Response shape (failure)
On failure, responses include code (not success), message, and an error object with type, details, optional hint, plus optional request_id and ts (UTC ISO8601). See reference.md for common error codes.
Commands (quick reference)
Replace vpn-cli below with vpn-cli.exe on Windows (and quote the full path if needed, e.g. "C:\Program Files\onlynet\vpn-cli.exe").
| Area | Command |
|---|---|
| Status | vpn-cli status |
| Add subscription | vpn-cli sub add "<url>" |
| Update all subs | vpn-cli sub update |
| List subscriptions | vpn-cli sub list |
| Remove subscription | vpn-cli sub remove "<name>" |
| Nodes under a sub | vpn-cli sub nodelist "<name>" |
| Connect (named sub + node) | vpn-cli connect sub "<name>" node "<node>" |
| Connect best latency | vpn-cli connect --best |
| Disconnect | vpn-cli disconnect |
| Help | vpn-cli --help |
| Version | vpn-cli --version |
Connect behavior (defaults)
- With
connect sub ... node ...: optional--bestmay apply where supported. - Without
sub: uses last used or first subscription. - Without
nodeor if the name is missing: uses first node in scope. - Without both: connects to the first node.
Agent guidance
- Start the main client before any CLI: on Windows run
onlynet.exefrom the install directory (defaultC:\Program Files\onlynet\); on macOS launchOnlynet.appor runOnlynet.app/Contents/MacOS/OnlyNetfrom the unzip (or installed) location. - Then run the real CLI: Windows —
vpn-cli.exe; macOS —vpn-cli. Do not invent a separate HTTP API. - If CLI commands fail or hang, verify
onlynet.exe/OnlyNetis still running. - Parse JSON stdout; handle both example success codes (
200vs0) if users report differences between builds. - For full response examples and error catalog, read reference.md.