glidercli 0.2.0 → 0.3.1
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 +69 -9
- package/bin/glider.js +615 -68
- package/lib/bexplore.js +815 -0
- package/lib/bextract.js +236 -0
- package/lib/bfetch.js +274 -0
- package/lib/bserve.js +43 -7
- package/lib/bspawn.js +154 -0
- package/lib/bwindow.js +335 -0
- package/lib/cdp-direct.js +305 -0
- package/lib/glider-daemon.sh +31 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
<img src="assets/icons/glider-blue-squircle.webp" alt="glider" width="80" height="80" />
|
|
4
|
+
<img src="assets/icons/chrome.webp" alt="chrome" width="80" height="80" />
|
|
4
5
|
<img src="assets/icons/claude.webp" alt="claude" width="80" height="80" />
|
|
5
6
|
<img src="assets/icons/ralph-wiggum.webp" alt="ralph" width="80" height="80" />
|
|
6
7
|
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
<a href="#the-loop">🔄 The Loop</a><br/>
|
|
24
25
|
<a href="#task-files">📄 Task Files</a><br/>
|
|
25
26
|
<a href="#commands">⚡ Commands</a><br/>
|
|
27
|
+
<a href="#roadmap">🗺️ Roadmap</a><br/>
|
|
26
28
|
<a href="#tools-used">🔧 Tools used</a><br/>
|
|
27
29
|
<a href="#contact">👤 Contact</a>
|
|
28
30
|
</ol>
|
|
@@ -42,20 +44,19 @@ Control Chrome from terminal. Run YAML tasks. Loop until complete (Ralph Wiggum
|
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
46
|
npm i -g glidercli
|
|
47
|
+
glider install # start daemon (runs forever, auto-restarts)
|
|
45
48
|
```
|
|
46
49
|
|
|
47
50
|
### Requirements
|
|
48
51
|
|
|
49
52
|
1. **Node 18+**
|
|
50
53
|
|
|
51
|
-
2. **Glider Chrome Extension** - [
|
|
52
|
-
- For now: clone repo, load unpacked in `chrome://extensions`
|
|
53
|
-
|
|
54
|
-
3. **bserve relay server** - included with extension, auto-starts
|
|
54
|
+
2. **Glider Chrome Extension** - [Install from Chrome Web Store](https://chromewebstore.google.com/detail/glider/njbidokkffhgpofcejgcfcgcinmeoalj)
|
|
55
55
|
|
|
56
56
|
## 🚀Usage
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
+
glider connect # connect to browser
|
|
59
60
|
glider status # check connection
|
|
60
61
|
glider goto "https://x.com" # navigate
|
|
61
62
|
glider eval "document.title" # run JS
|
|
@@ -63,15 +64,27 @@ glider run task.yaml # execute task file
|
|
|
63
64
|
glider loop task.yaml -n 50 # autonomous loop
|
|
64
65
|
```
|
|
65
66
|
|
|
67
|
+
### Daemon
|
|
68
|
+
|
|
69
|
+
The daemon keeps the relay server running 24/7. Auto-restarts on crash.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
glider install # install daemon (runs at login)
|
|
73
|
+
glider uninstall # remove daemon
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Logs: `~/.glider/daemon.log`
|
|
77
|
+
|
|
66
78
|
## 🔄The Loop
|
|
67
79
|
|
|
68
|
-
The `loop` command runs your task repeatedly until:
|
|
80
|
+
The `loop` (or `ralph`) command runs your task repeatedly until:
|
|
69
81
|
- Completion marker found (`LOOP_COMPLETE` or `DONE`)
|
|
70
82
|
- Max iterations reached
|
|
71
83
|
- Timeout hit
|
|
72
84
|
|
|
73
85
|
```bash
|
|
74
86
|
glider loop scrape-feed.yaml -n 100 -t 3600
|
|
87
|
+
glider ralph task.yaml # same thing
|
|
75
88
|
```
|
|
76
89
|
|
|
77
90
|
Safety: max iterations, timeout, exponential backoff on errors, state persistence.
|
|
@@ -89,20 +102,65 @@ steps:
|
|
|
89
102
|
|
|
90
103
|
## ⚡Commands
|
|
91
104
|
|
|
105
|
+
### Setup
|
|
92
106
|
| Command | What |
|
|
93
107
|
|---------|------|
|
|
108
|
+
| `glider install` | Install daemon (runs at login) |
|
|
109
|
+
| `glider uninstall` | Remove daemon |
|
|
110
|
+
| `glider connect` | Connect to browser |
|
|
94
111
|
| `glider status` | Server/extension/tab status |
|
|
95
|
-
| `glider
|
|
112
|
+
| `glider test` | Run diagnostics |
|
|
113
|
+
|
|
114
|
+
### Navigation
|
|
115
|
+
| Command | What |
|
|
116
|
+
|---------|------|
|
|
96
117
|
| `glider goto <url>` | Navigate |
|
|
97
118
|
| `glider eval <js>` | Execute JavaScript |
|
|
98
119
|
| `glider click <sel>` | Click element |
|
|
99
120
|
| `glider type <sel> <text>` | Type into input |
|
|
100
121
|
| `glider screenshot` | Capture page |
|
|
122
|
+
| `glider html <sel>` | Get element HTML |
|
|
123
|
+
| `glider title` | Get page title |
|
|
124
|
+
| `glider text` | Get page text |
|
|
125
|
+
|
|
126
|
+
### Multi-Tab
|
|
127
|
+
| Command | What |
|
|
128
|
+
|---------|------|
|
|
129
|
+
| `glider fetch <url>` | Fetch URL with browser session (authenticated) |
|
|
130
|
+
| `glider spawn <urls...>` | Open multiple tabs |
|
|
131
|
+
| `glider extract [opts]` | Extract content from all connected tabs |
|
|
132
|
+
| `glider explore <url>` | Crawl site, capture links/network |
|
|
133
|
+
|
|
134
|
+
### Automation
|
|
135
|
+
| Command | What |
|
|
136
|
+
|---------|------|
|
|
101
137
|
| `glider run <file>` | Run YAML task |
|
|
102
138
|
| `glider loop <file>` | Autonomous loop |
|
|
139
|
+
| `glider ralph <file>` | Alias for loop |
|
|
140
|
+
|
|
141
|
+
## 🗺️Roadmap
|
|
142
|
+
|
|
143
|
+
- [x] CDP-based browser control via relay
|
|
144
|
+
- [x] YAML task file execution
|
|
145
|
+
- [x] Ralph Wiggum autonomous loop pattern
|
|
146
|
+
- [x] Daemon mode (auto-start, auto-restart)
|
|
147
|
+
- [x] macOS notifications
|
|
148
|
+
- [x] Multi-tab orchestration (spawn, extract)
|
|
149
|
+
- [x] Authenticated fetch via browser session
|
|
150
|
+
- [x] Site exploration/crawling
|
|
151
|
+
- [x] Chrome Web Store extension publish
|
|
152
|
+
- [ ] Linux support
|
|
153
|
+
- [ ] Windows support
|
|
154
|
+
- [ ] Headless mode
|
|
155
|
+
- [ ] Task chaining (output of one -> input of next)
|
|
156
|
+
- [ ] Built-in scraping templates
|
|
157
|
+
- [ ] Session recording/playback
|
|
158
|
+
- [ ] AI-assisted task generation
|
|
159
|
+
- [ ] Web dashboard for monitoring loops
|
|
103
160
|
|
|
104
161
|
## 🔧Tools Used
|
|
105
162
|
|
|
163
|
+
[![Claude Code][claudecode-badge]][claudecode-url]
|
|
106
164
|
[![Claude][claude-badge]][claude-url]
|
|
107
165
|
[![Node.js][nodejs-badge]][nodejs-url]
|
|
108
166
|
[![Chrome DevTools Protocol][cdp-badge]][cdp-url]
|
|
@@ -113,10 +171,12 @@ steps:
|
|
|
113
171
|
[![Twitter][twitter]][twitter-url]
|
|
114
172
|
|
|
115
173
|
<!-- BADGES -->
|
|
116
|
-
[github]: https://img.shields.io/badge
|
|
174
|
+
[github]: https://img.shields.io/badge/glidercli-000000?style=for-the-badge&logo=github
|
|
117
175
|
[github-url]: https://github.com/vdutts7/glidercli
|
|
118
|
-
[npm]: https://img.shields.io/badge/npm-
|
|
176
|
+
[npm]: https://img.shields.io/badge/npm%20i%20--g%20glidercli-CB3837?style=for-the-badge&logo=npm
|
|
119
177
|
[npm-url]: https://www.npmjs.com/package/glidercli
|
|
178
|
+
[claudecode-badge]: https://img.shields.io/badge/Claude_Code-D97757?style=for-the-badge&logo=anthropic&logoColor=white
|
|
179
|
+
[claudecode-url]: https://claude.ai/code
|
|
120
180
|
[claude-badge]: https://img.shields.io/badge/Claude-D97757?style=for-the-badge&logo=anthropic&logoColor=white
|
|
121
181
|
[claude-url]: https://claude.ai
|
|
122
182
|
[nodejs-badge]: https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white
|
|
@@ -126,4 +186,4 @@ steps:
|
|
|
126
186
|
[email]: https://img.shields.io/badge/Email-000000?style=for-the-badge&logo=Gmail&logoColor=white
|
|
127
187
|
[email-url]: mailto:me@vd7.io
|
|
128
188
|
[twitter]: https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=Twitter&logoColor=white
|
|
129
|
-
[twitter-url]: https://
|
|
189
|
+
[twitter-url]: https://x.com/vdutts7
|