Skip to main content

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.

  • --json or SURFSKY_JSON=1: success returns ok: true; errors return ok: false with code, message, hint and retryable under error. JSON errors go to stdout; text errors go to stderr.
  • -o FILE saves output; --pretty indents JSON. For screenshot, -o saves PNG and --json returns 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.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for surfsky-cli 0.0.8
File Size Uploaded Provenance Actions
surfsky_cli-0.0.8.tar.gz 53.7 kB Without provenance Details for surfsky_cli-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for surfsky-cli 0.0.8
File Interpreter ABI Platform Actions
surfsky_cli-0.0.8-py3-none-any.whl Python 3 none any Details for surfsky_cli-0.0.8-py3-none-any.whl

Total release size: 97.0 kB

Release files / surfsky_cli-0.0.8.tar.gz

Download URL surfsky_cli-0.0.8.tar.gz
Size 53.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b1d44035ac685556b1a6d1aa6d094bb6ddd5f6f58f1e505014d35857de3fb625
BLAKE2b-256 checksum
How to use checksums
e608ccc2f9dcc174f88ea13e89c9445734b02960cc9e7d1115e1c934a0cf8706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.8-py3-none-any.whl

Download URL surfsky_cli-0.0.8-py3-none-any.whl
Size 43.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47d69fb2e2daf9d69f6f421b16eebd9745d9ceeb5528013f613de2eca1666152
BLAKE2b-256 checksum
How to use checksums
b2b5d15dde226114aee51691086d954c7590713d4fa5113dbfb08e91329e8e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","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.8

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page