argus-research
v0.1.0
Published
Browser-based competitive product research toolkit — CDP traffic capture, SSE stream interception, API discovery, and cross-product comparison.
Maintainers
Readme
Argus
Browser-based competitive product research infrastructure. Uses CDP + stealth interceptors to capture HTTP/SSE traffic in real-time while a human operates the target site.
Features
- Browser Session Manager — Browser-level CDP connection via Target domain, auto-reconnect on disconnect/crash
- Stealth Layer — Anti-detection:
navigator.webdriverremoval,toString()spoofing via WeakMap, Symbol-based guards - Stream Interceptor — Fetch monkey-patch + EventSource Proxy to capture SSE streams (CDP can't)
- Unified Event Store — Single
events.jsonlper session with targetId, operationId, sanitization, crash-safe writes - Operation Markers —
/research start "label"//research doneto bracket user actions, auto-analyze intervals - Payload Diff — Automatic JSON diff between consecutive requests to the same endpoint
- API Schema Inference — Auto-discover endpoints, infer request/response schemas, detect variants
- Session Persistence — State file with checkpoint, resume support, API catalog auto-generated on shutdown
- Analysis Pipeline —
sanitize → infer → analyze → reportfrom raw events to markdown deliverable - Cross-Product Comparison — Compare endpoint coverage, unique APIs, and architectural differences across products
Install
npm install -g argus-researchOr from GitHub:
git clone https://github.com/LynxQuest/Argus.git
cd Argus && npm install && npm linkQuick Start
# 1. Launch Chrome with debugging
open -na "Google Chrome" --args --remote-debugging-port=9333 --user-data-dir=".argus/chrome-profile"
# 2. Log in to target website in Chrome, then:
argus start -p "ProductName" -t "example.com"
# (auto-initializes on first run, remembers config after)
# Next time, just:
argus startUsage
With Claude Code (Recommended)
argus init automatically installs a Claude Code skill. Just talk:
You: 开始调研小云雀
→ Chrome launches, daemon starts, environment ready
You: 我要测试上传脚本
→ Auto-marks the operation
You: 上传完了
→ Auto-analyzes: API calls, SSE streams, agent tools, payload changes
You: 出报告
→ Full insight report saved to deliverables/CLI Only (without Claude Code)
argus start # Start daemon
argus mark 编辑角色卡 # Mark operation start
# (operate in browser...)
argus done # End mark + analysis
argus status # Check daemon status
argus report # Generate report
argus compare -i a.json,b.json # Compare productsRaw curl (for scripting)
# Start operation marker
curl -s -X POST http://127.0.0.1:9334 \
-H 'Content-Type: application/json' \
-d '{"action":"start","label":"Edit character card"}'
# (operate in browser...)
# End marker — auto-analyzes the interval
curl -s -X POST http://127.0.0.1:9334 \
-H 'Content-Type: application/json' \
-d '{"action":"done"}'
# Check status
curl -s -X POST http://127.0.0.1:9334 \
-H 'Content-Type: application/json' \
-d '{"action":"status"}'Post-Session Analysis
# Sanitize (remove tokens, credentials)
node tools/pipeline.mjs sanitize -i .research/sessions/session.events.jsonl -o sanitized.jsonl
# Infer API schemas
node tools/pipeline.mjs infer -i sanitized.jsonl -o api-catalog.json
# Generate findings
node tools/pipeline.mjs analyze -i sanitized.jsonl -c api-catalog.json
# Generate report
node tools/pipeline.mjs report -i findings.json -o report.md
# Compare two products
node tools/compare.mjs -i productA.findings.json,productB.findings.json -o comparison.mdArchitecture
research-daemon.mjs ← One-command entry point
├── browser-session.mjs ← CDP Target domain session management
├── stealth.mjs ← Anti-detection patches
├── interceptor.mjs ← SSE stream capture management
│ └── interceptor-payload.js ← Injected into page (fetch + EventSource)
├── event-store.mjs ← Unified event storage + HTTP capture
├── marker.mjs ← Operation marker HTTP server
├── session-state.mjs ← Session persistence
├── diff.mjs ← Payload diff engine
├── schema-infer.mjs ← API schema inference
├── pipeline.mjs ← Analysis pipeline CLI
└── compare.mjs ← Cross-product comparisonEvent Types
| Type | Description |
|------|-------------|
| http | HTTP request/response (method, URL, postData, responseBody, duration) |
| sse | SSE stream data (URL, chunks, fullText) |
| screenshot | Auto-captured screenshot on key endpoints |
| marker | Operation start/end bracket |
| error | System errors (AUTH_EXPIRED, CDP_DISCONNECTED, INTERCEPTOR_OVERWRITTEN) |
| lifecycle | Target attach/detach/navigate, session start/end |
Tech Stack
- Runtime: Node.js (ESM)
- CDP Communication: Raw WebSocket via
wspackage - Event Storage: JSON Lines (append-only, grep-friendly)
- CLI: Node.js built-in
parseArgs
License
MIT
