gologin-agent-browser-cli 0.1.1 → 0.1.2
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 +40 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Gologin Agent CLI
|
|
1
|
+
# Gologin Agent Browser CLI
|
|
2
2
|
|
|
3
|
-
Gologin Agent CLI is a cloud browser automation CLI built for AI agents. It turns Gologin Cloud Browser into a persistent, scriptable runtime with compact page snapshots, ref-based interaction, session memory, and shell-friendly commands.
|
|
3
|
+
Gologin Agent Browser CLI is a cloud browser automation CLI built for AI agents. It turns Gologin Cloud Browser into a persistent, scriptable runtime with compact page snapshots, ref-based interaction, session memory, and shell-friendly commands.
|
|
4
4
|
|
|
5
5
|
It is designed for agent loops that need to stay simple:
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ Local-browser automation is convenient, but it comes with hard limits for agent
|
|
|
22
22
|
- local networking is limited unless you bolt on your own proxy layer
|
|
23
23
|
- local sessions are harder to standardize across agents and environments
|
|
24
24
|
|
|
25
|
-
Gologin Agent CLI takes the opposite approach:
|
|
25
|
+
Gologin Agent Browser CLI takes the opposite approach:
|
|
26
26
|
|
|
27
27
|
- cloud browser runtime instead of a local browser process
|
|
28
28
|
- Gologin profiles as the session identity layer
|
|
@@ -93,6 +93,10 @@ Then export it in your shell:
|
|
|
93
93
|
export GOLOGIN_TOKEN='your_gologin_token'
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
API access depends on your Gologin account and plan. If token creation is unavailable in the dashboard, check your account access before troubleshooting the CLI.
|
|
97
|
+
|
|
98
|
+
Note: the local daemon reads environment variables and config on startup. If you change `GOLOGIN_TOKEN` or `~/.gologin-agent-browser/config.json`, restart the daemon before running `open` again.
|
|
99
|
+
|
|
96
100
|
If you prefer a local config file instead of an environment variable, save the same token to `~/.gologin-agent-browser/config.json`.
|
|
97
101
|
|
|
98
102
|
## Required Environment
|
|
@@ -118,28 +122,39 @@ Save it as `~/.gologin-agent-browser/config.json`.
|
|
|
118
122
|
## Quickstart
|
|
119
123
|
|
|
120
124
|
```bash
|
|
121
|
-
export GOLOGIN_TOKEN=
|
|
125
|
+
export GOLOGIN_TOKEN='your_gologin_token'
|
|
122
126
|
|
|
123
127
|
gologin-agent-browser open https://example.com
|
|
124
128
|
gologin-agent-browser snapshot -i
|
|
125
|
-
gologin-agent-browser current
|
|
126
129
|
gologin-agent-browser click @e3
|
|
127
|
-
gologin-agent-browser fill "input[name='email']" "test@example.com"
|
|
128
|
-
gologin-agent-browser scroll down 600
|
|
129
|
-
gologin-agent-browser get title
|
|
130
|
-
gologin-agent-browser pdf page.pdf
|
|
131
|
-
gologin-agent-browser screenshot page.png --annotate
|
|
132
|
-
gologin-agent-browser sessions
|
|
133
130
|
gologin-agent-browser close
|
|
134
131
|
```
|
|
135
132
|
|
|
136
|
-
|
|
133
|
+
## How Refs Work
|
|
134
|
+
|
|
135
|
+
`gologin-agent-browser snapshot` prints a compact page view and assigns refs like `@e1`, `@e2`, and `@e3`.
|
|
136
|
+
|
|
137
|
+
Example:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
- link "More information..." [ref=@e3]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
You can then act on that element with commands like:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
gologin-agent-browser click @e3
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Refs are best-effort and should be regenerated after navigation or major DOM changes.
|
|
150
|
+
|
|
151
|
+
## More Examples
|
|
137
152
|
|
|
138
153
|
```bash
|
|
139
154
|
gologin-agent-browser open https://example.com --proxy-host 1.2.3.4 --proxy-port 8080 --proxy-mode http --idle-timeout-ms 300000
|
|
140
155
|
gologin-agent-browser open https://example.com --profile your-preconfigured-gologin-profile
|
|
141
156
|
gologin-agent-browser click "a[href*='iana']"
|
|
142
|
-
gologin-agent-browser type
|
|
157
|
+
gologin-agent-browser type "textarea[name='message']" "hello world"
|
|
143
158
|
gologin-agent-browser focus "input[name='email']"
|
|
144
159
|
gologin-agent-browser press Enter
|
|
145
160
|
gologin-agent-browser select "select[name='plan']" pro
|
|
@@ -195,7 +210,7 @@ Agents can then use those refs:
|
|
|
195
210
|
|
|
196
211
|
```bash
|
|
197
212
|
gologin-agent-browser click @e3
|
|
198
|
-
gologin-agent-browser
|
|
213
|
+
gologin-agent-browser check @e4
|
|
199
214
|
gologin-agent-browser fill "input[name='email']" "test@example.com"
|
|
200
215
|
gologin-agent-browser find role button click --name "Submit"
|
|
201
216
|
gologin-agent-browser screenshot page.png --annotate
|
|
@@ -233,6 +248,15 @@ Supported aliases:
|
|
|
233
248
|
- Gologin cloud live-view URLs are not auto-fetched by default because the current endpoint can interfere with an active CDP session.
|
|
234
249
|
- Playwright is the automation layer on top of Gologin Cloud Browser. The browser runtime itself does not expose built-in agent actions such as `click()` or `type()`.
|
|
235
250
|
|
|
236
|
-
##
|
|
251
|
+
## Test Coverage
|
|
252
|
+
|
|
253
|
+
The repository includes unit tests for config loading, snapshot formatting, arg parsing, and URL construction.
|
|
254
|
+
|
|
255
|
+
A full live browser smoke test is not shipped yet. If you want one, run a manual check with:
|
|
237
256
|
|
|
238
|
-
|
|
257
|
+
```bash
|
|
258
|
+
export GOLOGIN_TOKEN='your_gologin_token'
|
|
259
|
+
gologin-agent-browser open https://example.com
|
|
260
|
+
gologin-agent-browser snapshot -i
|
|
261
|
+
gologin-agent-browser close
|
|
262
|
+
```
|