How octoparse/octoparse-cli works
Octoparse CLI lets users authenticate, discover and manage extraction tasks, create task definitions from URLs, run tasks locally or in the cloud, and inspect or export results. The principal URL-to-task workflow moves from the detect command through browser/page analysis and optional agent-assisted planning to a saved task definition; the separate run workflow executes tasks and records local run state and artifacts. README-described capabilities such as user-browser setup, cloud operations, and data export are included. Some command implementations were not sampled, so their internal links are limited to documented behavior.
Main entry points: index.ts Command dispatch · command.ts URL detection command · run.ts Local run command · data.ts Data history and export
Components 23
CLI interaction
- Command dispatch
src/index.ts - Task management
src/commands/task.ts - Browser setup
src/commands/browser.ts
Task creation
- URL detection command
src/commands/detect/command.ts - Page analysis
src/runtime/detector/page-detector.ts - API-list detection
src/runtime/detector/api-list-detector.ts - Agent candidate context
src/runtime/detector/agent-context.ts - Agent task planning
src/runtime/detector/agent-plan.ts - Agent workflow
src/commands/detect/agent-runner.ts - Task persistence
src/commands/detect/persist.ts
Extraction execution
- Cloud task operations
src/commands/cloud.ts - Local run command
src/commands/run.ts - Browser task runtime
src/runtime/engine-host.ts - User browser lifecycle
src/runtime/user-browser.ts
Account and API
- Authentication commands
src/commands/auth.ts - Credential resolution
src/runtime/auth.ts - Octoparse API client
src/runtime/api-client.ts
Run results
- Local run controls
src/commands/local.ts - Run artifacts
src/runtime/artifacts.ts - Data history and export
src/commands/data.ts
Other components
- CLI user
- Octoparse services
- Target website
Connections 31
- CLI user → Command dispatch: invokes
README.md - Command dispatch → Authentication commands: dispatches
src/index.ts - Command dispatch → URL detection command: dispatches
src/index.ts - Command dispatch → Local run command: dispatches
src/index.ts - Command dispatch → Task management: dispatches
src/index.ts - Command dispatch → Cloud task operations: dispatches
src/index.ts - Command dispatch → Data history and export: dispatches
src/index.ts - Command dispatch → Browser setup: dispatches
src/index.ts - Authentication commands → Credential resolution: stores credentials
src/commands/auth.ts - Authentication commands → Octoparse API client: validates credentials
src/commands/auth.ts - Credential resolution → Octoparse services: refreshes OAuth
src/runtime/auth.ts - Task management → Octoparse API client: lists and inspects
- URL detection command → Page analysis: analyzes pages
src/commands/detect/command.ts - URL detection command → API-list detection: detects API lists
src/commands/detect/command.ts - URL detection command → Agent workflow: starts agent mode
src/commands/detect/command.ts - Agent workflow → Agent candidate context: builds context
src/commands/detect/agent-runner.ts - Agent workflow → Agent task planning: requests plan
src/commands/detect/agent-runner.ts - URL detection command → Task persistence: saves task
README.md - Target website → URL detection command: provides URL
README.md - CLI user → Local run command: starts extraction
README.md - Local run command → Browser task runtime: runs browser task
src/commands/run.ts - Local run command → Run artifacts: records run output
src/commands/run.ts - Browser task runtime → User browser lifecycle: prepares profile
src/runtime/engine-host.ts - Browser task runtime → Octoparse services: requests proxy and captcha
src/runtime/engine-host.ts - Cloud task operations → Octoparse services: controls cloud runs
README.md - Browser setup → User browser lifecycle: manages profiles
src/commands/browser.ts - CLI user → Local run controls: controls local run
README.md - Local run controls → Run artifacts: reads run history
- CLI user → Data history and export: requests export
README.md - Data history and export → Octoparse services: fetches cloud data
- Data history and export → Run artifacts: exports local data