glidercli 0.1.3 → 0.1.5
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/.github/hooks/post-commit +13 -0
- package/.github/workflows/release.yml +19 -0
- package/README.md +12 -7
- package/assets/icons/claude.webp +0 -0
- package/assets/icons/glider-blue-squircle.webp +0 -0
- package/assets/icons/ralph-wiggum.webp +0 -0
- package/bin/glider.js +77 -8
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# post-commit hook - auto push tags after npm version creates them
|
|
3
|
+
# npm version patch/minor/major creates a commit AND a tag
|
|
4
|
+
|
|
5
|
+
# Check if the last commit was from npm version (has version in message)
|
|
6
|
+
LAST_MSG=$(git log -1 --pretty=%B)
|
|
7
|
+
|
|
8
|
+
if [[ "$LAST_MSG" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
9
|
+
echo "📦 Detected npm version commit: $LAST_MSG"
|
|
10
|
+
echo "🏷️ Pushing tag v$LAST_MSG..."
|
|
11
|
+
git push --tags 2>/dev/null &
|
|
12
|
+
echo "✓ Tag push triggered (background)"
|
|
13
|
+
fi
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Create Release
|
|
15
|
+
uses: softprops/action-gh-release@v1
|
|
16
|
+
with:
|
|
17
|
+
generate_release_notes: true
|
|
18
|
+
env:
|
|
19
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="
|
|
4
|
-
<img src="
|
|
3
|
+
<img src="assets/icons/glider-blue-squircle.webp" alt="glider" width="80" height="80" />
|
|
4
|
+
<img src="assets/icons/claude.webp" alt="claude" width="80" height="80" />
|
|
5
|
+
<img src="assets/icons/ralph-wiggum.webp" alt="ralph" width="80" height="80" />
|
|
5
6
|
|
|
6
7
|
<h1 align="center">glidercli</h1>
|
|
7
8
|
<p align="center"><i><b>Browser automation CLI with autonomous loop execution.</b></i></p>
|
|
@@ -9,8 +10,6 @@
|
|
|
9
10
|
[![Github][github]][github-url]
|
|
10
11
|
[![npm][npm]][npm-url]
|
|
11
12
|
|
|
12
|
-
<img src="https://res.cloudinary.com/ddyc1es5v/image/upload/v1768050244/gh-repos/glidercli/social-preview.png" />
|
|
13
|
-
|
|
14
13
|
</div>
|
|
15
14
|
|
|
16
15
|
<br/>
|
|
@@ -47,9 +46,12 @@ npm i -g glidercli
|
|
|
47
46
|
|
|
48
47
|
### Requirements
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
49
|
+
1. **Node 18+**
|
|
50
|
+
|
|
51
|
+
2. **Glider Chrome Extension** - [Source](https://github.com/vdutts7/glider) *(Chrome Web Store pending approval)*
|
|
52
|
+
- For now: clone repo, load unpacked in `chrome://extensions`
|
|
53
|
+
|
|
54
|
+
3. **bserve relay server** - included with extension, auto-starts
|
|
53
55
|
|
|
54
56
|
## 🚀Usage
|
|
55
57
|
|
|
@@ -101,6 +103,7 @@ steps:
|
|
|
101
103
|
|
|
102
104
|
## 🔧Tools Used
|
|
103
105
|
|
|
106
|
+
[![Claude][claude-badge]][claude-url]
|
|
104
107
|
[![Node.js][nodejs-badge]][nodejs-url]
|
|
105
108
|
[![Chrome DevTools Protocol][cdp-badge]][cdp-url]
|
|
106
109
|
|
|
@@ -114,6 +117,8 @@ steps:
|
|
|
114
117
|
[github-url]: https://github.com/vdutts7/glidercli
|
|
115
118
|
[npm]: https://img.shields.io/badge/npm-glidercli-CB3837?style=for-the-badge&logo=npm
|
|
116
119
|
[npm-url]: https://www.npmjs.com/package/glidercli
|
|
120
|
+
[claude-badge]: https://img.shields.io/badge/Claude-D97757?style=for-the-badge&logo=anthropic&logoColor=white
|
|
121
|
+
[claude-url]: https://claude.ai
|
|
117
122
|
[nodejs-badge]: https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white
|
|
118
123
|
[nodejs-url]: https://nodejs.org
|
|
119
124
|
[cdp-badge]: https://img.shields.io/badge/Chrome_DevTools_Protocol-4285F4?style=for-the-badge&logo=googlechrome&logoColor=white
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/glider.js
CHANGED
|
@@ -36,6 +36,21 @@ const SCRIPTS_DIR = process.env.SCRIPTS || path.join(os.homedir(), 'scripts');
|
|
|
36
36
|
const STATE_FILE = '/tmp/glider-state.json';
|
|
37
37
|
const LOG_FILE = '/tmp/glider.log';
|
|
38
38
|
|
|
39
|
+
// Domain extensions - load from ~/.cursor/glider/domains.json or ~/.glider/domains.json
|
|
40
|
+
const DOMAIN_CONFIG_PATHS = [
|
|
41
|
+
path.join(os.homedir(), '.cursor', 'glider', 'domains.json'),
|
|
42
|
+
path.join(os.homedir(), '.glider', 'domains.json'),
|
|
43
|
+
];
|
|
44
|
+
let DOMAINS = {};
|
|
45
|
+
for (const cfgPath of DOMAIN_CONFIG_PATHS) {
|
|
46
|
+
if (fs.existsSync(cfgPath)) {
|
|
47
|
+
try {
|
|
48
|
+
DOMAINS = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
49
|
+
break;
|
|
50
|
+
} catch (e) { /* ignore parse errors */ }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
39
54
|
// Colors
|
|
40
55
|
const RED = '\x1b[31m';
|
|
41
56
|
const GREEN = '\x1b[32m';
|
|
@@ -48,15 +63,25 @@ const BOLD = '\x1b[1m';
|
|
|
48
63
|
const DIM = '\x1b[2m';
|
|
49
64
|
const NC = '\x1b[0m';
|
|
50
65
|
|
|
51
|
-
//
|
|
66
|
+
// Gradient colors for rainbow effect
|
|
67
|
+
const G1 = '\x1b[38;5;51m'; // cyan
|
|
68
|
+
const G2 = '\x1b[38;5;45m'; // teal
|
|
69
|
+
const G3 = '\x1b[38;5;39m'; // blue
|
|
70
|
+
const G4 = '\x1b[38;5;33m'; // deeper blue
|
|
71
|
+
const G5 = '\x1b[38;5;27m'; // indigo
|
|
72
|
+
const G6 = '\x1b[38;5;21m'; // purple
|
|
73
|
+
|
|
74
|
+
// Banner - simple ASCII, works everywhere
|
|
52
75
|
const BANNER = `
|
|
53
|
-
${CYAN}
|
|
54
|
-
${CYAN}
|
|
55
|
-
${CYAN}
|
|
56
|
-
${CYAN}
|
|
57
|
-
${CYAN}
|
|
58
|
-
${
|
|
59
|
-
${
|
|
76
|
+
${CYAN} ------------------------------------------------------->${NC}
|
|
77
|
+
${CYAN} _____ ${BLUE}__ ${MAGENTA}__ ${CYAN}____ ${BLUE}_____ ${MAGENTA}____ ${NC}
|
|
78
|
+
${CYAN} / ____|${BLUE}| | ${MAGENTA}| |${CYAN}| _ \\${BLUE}| ____|${MAGENTA}| _ \\ ${NC}
|
|
79
|
+
${CYAN} | | __ ${BLUE}| | ${MAGENTA}| |${CYAN}| | | ${BLUE}| _| ${MAGENTA}| |_) |${NC}
|
|
80
|
+
${CYAN} | | |_ |${BLUE}| | ${MAGENTA}| |${CYAN}| | | ${BLUE}| |___${MAGENTA}| _ < ${NC}
|
|
81
|
+
${CYAN} | |__| |${BLUE}| |___${MAGENTA}| |${CYAN}| |_| ${BLUE}| ____|${MAGENTA}| | \\ \\${NC}
|
|
82
|
+
${CYAN} \\_____|${BLUE}|_____|${MAGENTA}__|${CYAN}|____/${BLUE}|_____|${MAGENTA}|_| \\_\\${NC}
|
|
83
|
+
${CYAN} ------------------------------------------------------->${NC}
|
|
84
|
+
${DIM} Browser Automation CLI ${WHITE}v${require('../package.json').version}${NC} ${DIM}|${NC} ${CYAN}github.com/vdutts7/glidercli${NC}
|
|
60
85
|
`;
|
|
61
86
|
|
|
62
87
|
function showBanner() {
|
|
@@ -689,7 +714,28 @@ ${YELLOW}REQUIREMENTS:${NC}
|
|
|
689
714
|
- Node.js 18+
|
|
690
715
|
- bserve relay server (~/scripts/bserve)
|
|
691
716
|
- Glider Chrome extension connected
|
|
717
|
+
|
|
718
|
+
${YELLOW}DOMAIN EXTENSIONS:${NC}
|
|
719
|
+
Add custom domain commands via ~/.cursor/glider/domains.json:
|
|
720
|
+
{
|
|
721
|
+
"mysite": { "url": "https://mysite.com/dashboard" },
|
|
722
|
+
"mytool": { "script": "~/.cursor/tools/scripts/mytool.sh" }
|
|
723
|
+
}
|
|
724
|
+
Then: glider mysite → navigates to that URL
|
|
725
|
+
glider mytool → runs that script
|
|
692
726
|
`);
|
|
727
|
+
|
|
728
|
+
// Show loaded domains if any
|
|
729
|
+
const domainKeys = Object.keys(DOMAINS);
|
|
730
|
+
if (domainKeys.length > 0) {
|
|
731
|
+
console.log(`${YELLOW}LOADED DOMAINS:${NC} (from config)`);
|
|
732
|
+
for (const key of domainKeys) {
|
|
733
|
+
const d = DOMAINS[key];
|
|
734
|
+
const desc = d.description || d.url || d.script || '';
|
|
735
|
+
console.log(` ${GREEN}${key}${NC} ${DIM}${desc}${NC}`);
|
|
736
|
+
}
|
|
737
|
+
console.log('');
|
|
738
|
+
}
|
|
693
739
|
}
|
|
694
740
|
|
|
695
741
|
// Main
|
|
@@ -763,6 +809,29 @@ async function main() {
|
|
|
763
809
|
await cmdLoop(taskArg, loopOpts);
|
|
764
810
|
break;
|
|
765
811
|
default:
|
|
812
|
+
// Check if it's a domain command from config
|
|
813
|
+
if (DOMAINS[cmd]) {
|
|
814
|
+
const domain = DOMAINS[cmd];
|
|
815
|
+
if (domain.script) {
|
|
816
|
+
// Execute external script
|
|
817
|
+
const scriptPath = domain.script.replace(/^~/, os.homedir());
|
|
818
|
+
if (fs.existsSync(scriptPath)) {
|
|
819
|
+
const { execSync } = require('child_process');
|
|
820
|
+
try {
|
|
821
|
+
execSync(`"${scriptPath}" ${args.slice(1).map(a => `"${a}"`).join(' ')}`, { stdio: 'inherit' });
|
|
822
|
+
} catch (e) {
|
|
823
|
+
process.exit(e.status || 1);
|
|
824
|
+
}
|
|
825
|
+
} else {
|
|
826
|
+
log.fail(`Domain script not found: ${scriptPath}`);
|
|
827
|
+
process.exit(1);
|
|
828
|
+
}
|
|
829
|
+
} else if (domain.url) {
|
|
830
|
+
// Navigate to domain URL
|
|
831
|
+
await cmdGoto(domain.url);
|
|
832
|
+
}
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
766
835
|
log.fail(`Unknown command: ${cmd}`);
|
|
767
836
|
showHelp();
|
|
768
837
|
process.exit(1);
|
package/package.json
CHANGED