OpenCLI is designed with AI agents in mind. This guide covers the AI-native discovery and code generation tools.
Generate a single command for a specific page URL — just a URL + one-line goal, 4 steps done:
opencli generate https://example.com --goal "trending"This runs: explore → synthesize → register in one shot.
For the complete one-shot workflow details, see CLI-ONESHOT.md.
Discover APIs, infer capabilities, and detect framework:
opencli explore https://example.com --site mysiteOutputs to .opencli/explore/<site>/:
manifest.json— Site metadataendpoints.json— Discovered API endpointscapabilities.json— Inferred capabilitiesauth.json— Authentication strategy details
Generate YAML adapters from explore artifacts:
opencli synthesize mysiteAuto-probe authentication strategies: PUBLIC → COOKIE → HEADER:
opencli cascade https://api.example.com/dataopencli validate # Validate generated YAML
opencli <site> <command> --limit 3 -f json # Test the commandThe explorer uses a decision tree to determine the best authentication approach:
- PUBLIC — No auth, direct API call
- COOKIE — Reuse Chrome session cookies
- HEADER — Custom auth headers
- BROWSER — Full browser automation
- CDP — Chrome DevTools Protocol for Electron apps
For the complete browser exploration workflow and debugging guide, see CLI-EXPLORER.md.