surfsky-cli
CLI for Surfsky, an antidetect cloud browser.
Requires Python 3.12+ on macOS, Windows or Linux.
Install
uv tool install surfsky-cli
Or install with pipx install surfsky-cli or pip install surfsky-cli.
Credentials
Get your API token and base URL from the dashboard.
macOS / Linux:
export SURFSKY_API_TOKEN='your-token'
export SURFSKY_API_BASE_URL='your-base-url'
Windows (PowerShell):
$env:SURFSKY_API_TOKEN = 'your-token'
$env:SURFSKY_API_BASE_URL = 'your-base-url'
Verify with surfsky status. Flags --api-token and --base-url override
the environment. Credentials are not stored. Session records go in
~/.surfsky; set SURFSKY_HOME to change the directory.
Scrape
surfsky scrape https://example.com # Markdown
surfsky scrape https://example.com --only-main-content # omit navigation, footers, forms
surfsky scrape https://example.com -f markdown,links --json --pretty
surfsky scrape https://example.com -f screenshot -o shot.png
surfsky scrape https://example.com --proxy premium --country us --os mac
Formats: markdown (default), html, raw_html, links, screenshot.
One format returns content; multiple formats return JSON. html is cleaned;
raw_html is unchanged. Scrape screenshots are base64 unless saved with -o
in text mode.
By default, scrape closes its browser when finished. --keep leaves it
running and returns its ID. --profile ID uses a saved profile.
--session ID reuses the active tab; omit the URL to read its current page.
Browser sessions
surfsky session start --proxy premium --proxy-type mobile --country us
export SURFSKY_SESSION='returned-session-id'
surfsky goto https://google.com
surfsky type 'textarea[name=q]' surfsky
surfsky press Enter -s
surfsky get text
surfsky screenshot -o results.png
surfsky session stop
Replace returned-session-id with the ID from session start. On PowerShell,
use $env:SURFSKY_SESSION = 'returned-session-id'. You can also pass
--session ID on each command; unique ID prefixes work.
Sessions bill per minute, including idle time, until stopped or the idle
timeout expires. Set --idle-timeout SECONDS when starting a session.
surfsky status checks the selected session's connection and resets its idle
timer. surfsky session devtools prints live view and DevTools URLs.
-s returns a snapshot with @N references for click, type and fill.
CSS selectors and text=words also work. Take a new snapshot after navigation
or a tab switch; each snapshot replaces the references.
Sessions and scrapes accept --proxy premium|shared|URL, --proxy-type mobile,
--country, --region, --city, and --os win|mac|android.
See surfsky proxy --help for location lists and quota commands.
To save logins, create a profile with surfsky profile create acct --country us --os win,
then use its ID with surfsky session start --profile ID.
Agents and scripts
surfsky skill --install writes agent instructions to
.claude/skills/surfsky-cli/SKILL.md and .agents/skills/surfsky-cli/SKILL.md.
Rerun it after upgrading the CLI. surfsky skill prints the instructions.
--jsonorSURFSKY_JSON=1: success returnsok: true; errors returnok: falsewithcode,message,hintandretryableundererror. JSON errors go to stdout; text errors go to stderr.-o FILEsaves output;--prettyindents JSON. Forscreenshot,-osaves PNG and--jsonreturns its path and size.- Exit codes: 0 success, 1 error, 2 usage, 3 missing or expired session, 4 authentication, 5 timeout, 6 not found or stale reference, 7 quota or plan limit.
Development
uv sync --all-groups
uv run pytest -q
License
MIT
Metadata
Release files for surfsky-cli 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| surfsky_cli-0.0.9.tar.gz | 53.7 kB | Without provenance | Details for surfsky_cli-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| surfsky_cli-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for surfsky_cli-0.0.9-py3-none-any.whl |
Total release size: 97.1 kB
Release files / surfsky_cli-0.0.9.tar.gz
| Download URL | surfsky_cli-0.0.9.tar.gz |
|---|---|
| Size | 53.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7871b6c7d6e7668cd066d3ce6bc3698f5423a142c1dd13b3c9f0f91a67e113b8
|
|
BLAKE2b-256 checksum How to use checksums |
f4fb790af56994550d4898b7217c3028e4319ff507d21f11c74a4e748388e0e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / surfsky_cli-0.0.9-py3-none-any.whl
| Download URL | surfsky_cli-0.0.9-py3-none-any.whl |
|---|---|
| Size | 43.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
480f9e633d70ea665643e9536df23118161fb1518492c77977ce74ccf03078b3
|
|
BLAKE2b-256 checksum How to use checksums |
e71ad176655ee1a9f424705141aff0e97beff16e84bd4a802abf89999dde4c85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for surfsky-cli 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.