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