@oya-ai/cli 1.0.107 → 1.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -15
- package/dist/index.js +928 -429
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -66,19 +66,28 @@ oya rm --all
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
+
## Scripting: `--json` and exit codes
|
|
70
|
+
|
|
71
|
+
- `--json` puts exactly one JSON document on stdout. Prompts and progress go to stderr.
|
|
72
|
+
- A failure prints one line on stderr (`✗ message`, then a hint), or with `--json` one object: `{"error", "code", "status"}`.
|
|
73
|
+
- Exit codes: `0` done, `1` the request failed or got no answer, `2` the command could not be run as typed and nothing was sent.
|
|
74
|
+
- An unknown flag is an error, not ignored. `--flag=value` works as well as `--flag value`.
|
|
75
|
+
- `--debug` (or `OYA_DEBUG=1`) adds the status, the response body and the stack to a failure.
|
|
76
|
+
- `oya install`, `oya init` and `oya stealth-test` are for people and refuse `--json`.
|
|
77
|
+
|
|
69
78
|
## 📖 Command Reference
|
|
70
79
|
|
|
71
80
|
### Fleet Execution & Control
|
|
72
81
|
|
|
73
|
-
| Command
|
|
74
|
-
|
|
75
|
-
| `oya start`
|
|
76
|
-
| `oya goto <url>`
|
|
77
|
-
| `oya ask "<prompt>"` | `[--id <id>]`
|
|
78
|
-
| `oya open`
|
|
79
|
-
| `oya ls`
|
|
80
|
-
| `oya status`
|
|
81
|
-
| `oya rm <id>...`
|
|
82
|
+
| Command | Flags | Description |
|
|
83
|
+
| :------------------- | :------------------------------------------------------------------------------------- | :-------------------------------------------------------- |
|
|
84
|
+
| `oya start` | `[--persona <id\|auto>] [--provider <p>] [--name <n>] [--governed] [--budget-usd <n>]` | Launch browser instance and print its ID and CDP endpoint |
|
|
85
|
+
| `oya goto <url>` | `[--id <id>]` | Navigate to URL (defaults to newest browser) |
|
|
86
|
+
| `oya ask "<prompt>"` | `[--id <id>]` | Drive page using configured AI model |
|
|
87
|
+
| `oya open` | `[--id <id>]` | Launch interactive SSE live view in system browser |
|
|
88
|
+
| `oya ls` | `[--json]` | List active fleet browsers with health status |
|
|
89
|
+
| `oya status` | `[--id <id>] [--json]` | Detailed metrics, error counts, and recent activity log |
|
|
90
|
+
| `oya rm <id>...` | `[--all]` | Terminate target browser or entire fleet |
|
|
82
91
|
|
|
83
92
|
### Persona Management (Anti-Ban Identities)
|
|
84
93
|
|
|
@@ -102,6 +111,24 @@ oya personas edit <id> --max 4 --geo US
|
|
|
102
111
|
oya personas rm <id>
|
|
103
112
|
```
|
|
104
113
|
|
|
114
|
+
### Moving logins (`oya cookies`)
|
|
115
|
+
|
|
116
|
+
A persona's cookie jar is its logins. Sign in once, then carry the session to wherever it is needed:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Save a persona's logins to a file (owner-readable only: it holds live sessions)
|
|
120
|
+
oya cookies export <persona> --out logins.json
|
|
121
|
+
|
|
122
|
+
# The same, shaped for Playwright's context.addCookies()
|
|
123
|
+
oya cookies export <persona> --format playwright --out pw-cookies.json
|
|
124
|
+
|
|
125
|
+
# Bring logins in from a file: an export, or any JSON list of cookies
|
|
126
|
+
oya cookies import <persona> logins.json
|
|
127
|
+
|
|
128
|
+
# Give one persona another persona's logins (each keeps its own device)
|
|
129
|
+
oya cookies copy <from-persona> <to-persona>
|
|
130
|
+
```
|
|
131
|
+
|
|
105
132
|
### Human-in-the-Loop Takeover
|
|
106
133
|
|
|
107
134
|
When automation encounters hardware 2FA, phone biometric approvals, or complex verification:
|
|
@@ -171,12 +198,12 @@ export OYA_BASE_URL="https://oyabrowser.com"
|
|
|
171
198
|
oya start --provider browserbase --persona auto --json
|
|
172
199
|
```
|
|
173
200
|
|
|
174
|
-
| Global Flag
|
|
175
|
-
|
|
176
|
-
| `--key <key>` | Override API key for command
|
|
177
|
-
| `--url <url>` | Override control plane URL
|
|
178
|
-
| `--id <id>`
|
|
179
|
-
| `--json`
|
|
201
|
+
| Global Flag | Description |
|
|
202
|
+
| :------------ | :---------------------------------------- |
|
|
203
|
+
| `--key <key>` | Override API key for command |
|
|
204
|
+
| `--url <url>` | Override control plane URL |
|
|
205
|
+
| `--id <id>` | Target specific browser instance ID |
|
|
206
|
+
| `--json` | Output pure JSON for programmatic parsing |
|
|
180
207
|
|
|
181
208
|
---
|
|
182
209
|
|