{"id":50434505,"url":"https://github.com/kyungw00k/stealth-wright","last_synced_at":"2026-05-31T16:04:06.966Z","repository":{"id":347577437,"uuid":"1170351292","full_name":"kyungw00k/stealth-wright","owner":"kyungw00k","description":"Silent browser automation CLI with stealth capabilities","archived":false,"fork":false,"pushed_at":"2026-03-28T14:11:07.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T16:39:10.445Z","etag":null,"topics":["crawler","go","playwright","stealth-automation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyungw00k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"kyungw00k"}},"created_at":"2026-03-02T02:55:34.000Z","updated_at":"2026-03-28T14:11:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kyungw00k/stealth-wright","commit_stats":null,"previous_names":["kyungw00k/stealth-wright"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kyungw00k/stealth-wright","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fstealth-wright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fstealth-wright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fstealth-wright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fstealth-wright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyungw00k","download_url":"https://codeload.github.com/kyungw00k/stealth-wright/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyungw00k%2Fstealth-wright/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33737716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","go","playwright","stealth-automation"],"created_at":"2026-05-31T16:04:06.104Z","updated_at":"2026-05-31T16:04:06.955Z","avatar_url":"https://github.com/kyungw00k.png","language":"Go","funding_links":["https://github.com/sponsors/kyungw00k"],"categories":[],"sub_categories":[],"readme":"# sw (Stealth Wright)\n\n\u003e Silent browser automation CLI with stealth capabilities\n\n## Overview\n\n**sw** (Stealth Wright) is a browser automation CLI that provides:\n\n- **Playwright CLI-compatible UX** - Familiar commands and output format\n- **Stealth Mode** - Built-in bot detection evasion via seleniumbase-go\n- **Element References** - ARIA snapshot with inline `[ref=eN]` addressing\n- **Session Management** - Multiple isolated browser sessions via daemon\n- **AI-Friendly** - Skill system for coding agents\n\n## Installation\n\n### Homebrew\n\n```bash\nbrew install kyungw00k/cli/sw\n```\n\n### From Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/kyungw00k/stealth-wright.git\ncd stealth-wright\n\n# Build\ngo build -o build/sw ./cmd/sw\n\n# Install to ~/.local/bin\nmake install\n```\n\n## Quick Start\n\n```bash\n# Open browser\nsw open https://example.com\n\n# Take snapshot (shows ARIA tree with element references)\nsw snapshot\n\n# Interact using [ref=eN] references\nsw click e5\nsw fill e1 \"user@example.com\"\n\n# Or use semantic locators (no snapshot needed)\nsw click --role button --text \"Sign In\"\nsw fill --label \"Email\" \"user@example.com\"\n\n# Annotated screenshot (overlays ref numbers on elements)\nsw screenshot --annotate\n\n# Close browser\nsw close\n```\n\n## Semantic Locators\n\nsw supports two ways to target elements:\n\n### 1. Ref-based (via snapshot)\n\nRun `sw snapshot` first to assign `[ref=eN]` references to all visible elements, then use them in commands:\n\n```bash\nsw snapshot\n# → - textbox \"Email\" [ref=e1]\n# → - textbox \"Password\" [ref=e2]\n# → - button \"Sign In\" [ref=e3]\n\nsw fill e1 \"user@example.com\"\nsw fill e2 \"secret\"\nsw click e3\n```\n\n### 2. Semantic (no snapshot needed)\n\nTarget elements directly by ARIA role, visible text, label, or placeholder:\n\n```bash\nsw fill --label \"Email\" \"user@example.com\"\nsw fill --placeholder \"Password\" \"secret\"\nsw click --role button --text \"Sign In\"\n```\n\nUse `sw find` to discover elements before interacting:\n\n```bash\nsw find --role button\n# → ### Found 3 element(s)\n# → - [ref=e3] \u003cbutton\u003e \"Sign In\"\n# → - [ref=e7] \u003cbutton\u003e \"Register\"\n# → - [ref=e12] \u003cbutton\u003e \"Forgot password\"\n```\n\n### Annotated Screenshot\n\nCapture a screenshot with `[eN]` ref numbers overlaid on every element — useful for multimodal AI models:\n\n```bash\nsw screenshot --annotate\n```\n\n---\n\n## Snapshot Format\n\nSnapshots use Playwright-compatible ARIA tree format with inline `[ref=eN]` element references:\n\n```yaml\n- heading \"Example Domain\" [level=1] [ref=e1]\n- paragraph [ref=e2]: This domain is for use in illustrative examples.\n- link \"More information...\" [ref=e3]\n```\n\nUse the ref value to target elements in subsequent commands:\n\n```bash\nsw click e3\nsw fill e1 \"search query\"\n```\n\n## Commands\n\n### Navigation\n\n```bash\nsw open [url]              # Open browser and navigate\nsw close                   # Close browser session\nsw goto \u003curl\u003e              # Navigate to URL\nsw go-back                 # Go back\nsw go-forward              # Go forward\nsw reload                  # Reload page\n```\n\n### Snapshot \u0026 Screenshot\n\n```bash\nsw snapshot                         # Generate ARIA snapshot with element refs\nsw screenshot                       # Take screenshot\nsw screenshot --annotate            # Screenshot with ref number overlays on elements\nsw screenshot --full-page           # Full page screenshot\nsw screenshot --filename out.png    # Save to specific file\nsw pdf [filename]                   # Save page as PDF\n```\n\n### Interaction\n\nRef-based (requires prior `sw snapshot`):\n```bash\nsw click \u003cref\u003e [button]    # Click element (button: left/right/middle)\nsw dblclick \u003cref\u003e          # Double-click element\nsw hover \u003cref\u003e             # Hover over element\nsw fill \u003cref\u003e \u003ctext\u003e       # Fill input field\nsw check \u003cref\u003e             # Check checkbox/radio\nsw uncheck \u003cref\u003e           # Uncheck checkbox\n```\n\nSemantic (no snapshot needed — target by ARIA role, text, or label):\n```bash\nsw click --role button --text \"Submit\"\nsw click --label \"Close dialog\"\nsw fill --label \"Email\" \"user@example.com\"\nsw fill --placeholder \"Search...\" \"query\"\nsw hover --role link --text \"About\"\nsw check --label \"Remember me\"\n\n# Find elements matching criteria\nsw find --role button\nsw find --text \"Sign In\"\nsw find --label \"Username\"\nsw find --placeholder \"Password\"\n```\n\nFlags for semantic targeting:\n```\n--role \u003caria-role\u003e        ARIA role: button, link, textbox, checkbox, heading, etc.\n--text \u003cstring\u003e           Visible text content (partial match)\n--label \u003cstring\u003e          aria-label attribute (partial match)\n--placeholder \u003cstring\u003e    Input placeholder (partial match)\n--exact                   Require exact string match\n```\n\nOther interaction commands:\n```bash\nsw type \u003ctext\u003e             # Type into focused element\nsw press \u003ckey\u003e             # Press key (e.g. Enter, Tab)\nsw keydown \u003ckey\u003e           # Key down event\nsw keyup \u003ckey\u003e             # Key up event\nsw select \u003cref\u003e \u003cvalue\u003e    # Select dropdown option\nsw upload \u003cref\u003e \u003cfile\u003e     # Upload file\nsw drag \u003csrc\u003e \u003cdst\u003e        # Drag and drop\nsw eval \u003cscript\u003e           # Evaluate JavaScript\n```\n\n### Mouse\n\n```bash\nsw mousemove \u003cx\u003e \u003cy\u003e       # Move mouse\nsw mousedown \u003cx\u003e \u003cy\u003e       # Mouse button down\nsw mouseup \u003cx\u003e \u003cy\u003e         # Mouse button up\nsw mousewheel \u003cx\u003e \u003cy\u003e      # Mouse wheel scroll\n```\n\n### Dialogs\n\n```bash\nsw dialog-accept [text]    # Accept dialog (with optional input)\nsw dialog-dismiss          # Dismiss dialog\n```\n\n### Tabs\n\n```bash\nsw tab-list                # List open tabs\nsw tab-new [url]           # Open new tab\nsw tab-close [index]       # Close tab\nsw tab-select \u003cindex\u003e      # Switch to tab\n```\n\n### Cookies\n\n```bash\nsw cookie-list             # List all cookies\nsw cookie-get \u003cname\u003e       # Get cookie by name\nsw cookie-set \u003cname\u003e \u003cvalue\u003e [--domain] [--path] [--expires] [--httpOnly] [--secure] [--sameSite]\nsw cookie-delete \u003cname\u003e    # Delete cookie\nsw cookie-clear            # Clear all cookies\n```\n\n### Local Storage\n\n```bash\nsw localstorage-list       # List all entries\nsw localstorage-get \u003ckey\u003e  # Get value\nsw localstorage-set \u003ckey\u003e \u003cvalue\u003e  # Set value\nsw localstorage-delete \u003ckey\u003e       # Delete entry\nsw localstorage-clear      # Clear all entries\n```\n\n### Session Storage\n\n```bash\nsw sessionstorage-list     # List all entries\nsw sessionstorage-get \u003ckey\u003e  # Get value\nsw sessionstorage-set \u003ckey\u003e \u003cvalue\u003e  # Set value\nsw sessionstorage-delete \u003ckey\u003e       # Delete entry\nsw sessionstorage-clear    # Clear all entries\n```\n\n### State \u0026 Data\n\n```bash\nsw state-save [path]       # Save browser state to file\nsw state-load [path]       # Load browser state from file\nsw delete-data             # Clear all browser data\nsw resize \u003cwidth\u003e \u003cheight\u003e # Resize browser window\n```\n\n### Video Recording\n\n```bash\nsw video-start             # Start recording (saves WebM to current directory)\nsw video-stop              # Stop recording and save file\n```\n\n### Developer Tools\n\n```bash\nsw install-browser [--browser \u003ctype\u003e]  # Install browser binaries (chromium/firefox/webkit)\nsw devtools-start                      # Open browser DevTools (headed+Chromium only)\n```\n\n### Session Management\n\n```bash\nsw list                    # List all sessions\nsw kill-all                # Kill all browser sessions\nsw close-all               # Close all browser sessions\nsw daemon start            # Start daemon manually\nsw daemon stop             # Stop daemon\nsw daemon status           # Check daemon status\n```\n\n## Global Options\n\n```bash\n-s, --session \u003cname\u003e       Session name (default: \"default\")\n-b, --browser \u003ctype\u003e       Browser: chromium, firefox, webkit\n    --headed               Run in headed mode\n    --persistent           Persist profile to disk\n    --profile \u003cpath\u003e       Custom profile directory\n    --config \u003cfile\u003e        Config file path\n    --stealth              Enable stealth mode (default: true)\n    --no-stealth           Disable stealth mode\n```\n\n## Stealth Features\n\nStealth mode is powered by [seleniumbase-go](https://github.com/kyungw00k/seleniumbase-go) which launches Chrome with fingerprint evasion arguments:\n\n- Hide WebDriver automation markers\n- Randomized browser fingerprints\n- Custom User-Agent strings\n- WebGL and Canvas fingerprint spoofing\n- WebRTC leak prevention\n\n## Architecture\n\n```\nsw (Stealth Wright)\n│\n├── CLI (cobra)                    # Command-line interface\n├── Daemon (Unix socket)           # Background browser process\n├── Browser Abstraction Layer      # Pluggable browser backends\n│   └── seleniumbase-go (current)  # Playwright + stealth via seleniumbase-go\n└── Snapshot Generator             # ARIA tree with [ref=eN] annotations\n```\n\n### Protocol\n\nCommunication between CLI and Daemon uses JSON-RPC 2.0 over Unix sockets.\n\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"click\",\n  \"params\": {\"ref\": \"e5\"}\n}\n```\n\n## AI Skill System\n\nsw supports the [Agent Skills](https://vercel.com/docs/agent-resources/skills) open standard — a single skill works across 40+ AI coding agents (Claude Code, Cursor, Codex, opencode, GitHub Copilot, and more).\n\n### Install via npx skills (recommended)\n\n```bash\nnpx skills add kyungw00k/stealth-wright\n```\n\nThis installs the `sw` skill to all detected AI tools on your system (Claude Code, Codex, opencode, etc.) using symlinks to a shared canonical location.\n\n### Install manually (no Node.js required)\n\n```bash\n# Install sw skill files to .claude/skills/sw/ in the current project\nsw install --skills\n```\n\n### Example Usage with Claude Code\n\n```\nUser: Use sw to open example.com and click the first link\n\nClaude:\n1. sw open https://example.com\n2. sw snapshot\n   → - link \"More information...\" [ref=e3]\n3. sw click e3\n```\n\n## Comparison\n\n| Feature | Playwright CLI | sw |\n|---------|---------------|-----|\n| Daemon Sessions | ✅ | ✅ |\n| Element References (`[ref=eN]`) | ✅ | ✅ |\n| ARIA Snapshot Format | ✅ | ✅ |\n| Semantic Locators (`--role/--text/--label`) | ✅ | ✅ |\n| Annotated Screenshots | ❌ | ✅ |\n| Stealth Mode | ❌ | ✅ |\n| Video Recording | ✅ | ✅ |\n| AI Skills | ✅ | ✅ |\n| Go Native Binary | ❌ | ✅ |\n\n## Development\n\n```bash\n# Build\ngo build -o build/sw ./cmd/sw\n\n# Run unit tests\ngo test ./...\n\n# Run integration tests (requires built binary)\ngo build -o build/sw ./cmd/sw\ngo test -tags integration -v ./test/...\n\n# Lint\ngo vet ./...\n\n# Format\ngo fmt ./...\n```\n\n## Project Structure\n\n```\nsw/\n├── cmd/sw/main.go              # CLI entry point (cobra commands)\n├── internal/\n│   ├── browser/                # Browser interface abstraction\n│   ├── client/                 # Daemon JSON-RPC client\n│   ├── daemon/                 # Daemon server + command handlers\n│   ├── drivers/seleniumbase/   # seleniumbase-go driver implementation\n│   ├── session/                # Session lifecycle management\n│   └── snapshot/               # ARIA snapshot + [ref=eN] annotation\n├── pkg/protocol/               # JSON-RPC request/response types\n├── skills/sw/SKILL.md          # AI agent skill file\n├── test/                       # Integration tests\n└── README.md\n```\n\n## Claude Code Skill\n\nA Claude Code skill is available for AI agents to use stealth-wright automatically.\n\n```\n/plugin marketplace add kyungw00k/skills\n/plugin install cli-tools@kyungw00k-skills\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyungw00k%2Fstealth-wright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyungw00k%2Fstealth-wright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyungw00k%2Fstealth-wright/lists"}