glidercli 0.1.4 → 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.
@@ -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="https://res.cloudinary.com/ddyc1es5v/image/upload/v1768050242/gh-repos/glidercli/code.png" alt="logo" width="80" height="80" />
4
- <img src="https://res.cloudinary.com/ddyc1es5v/image/upload/v1768050244/gh-repos/glidercli/github.png" alt="logo" width="80" height="80" />
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
- - Node 18+
51
- - Chrome with Glider extension
52
- - bserve relay server
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
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';
@@ -699,7 +714,28 @@ ${YELLOW}REQUIREMENTS:${NC}
699
714
  - Node.js 18+
700
715
  - bserve relay server (~/scripts/bserve)
701
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
702
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
+ }
703
739
  }
704
740
 
705
741
  // Main
@@ -773,6 +809,29 @@ async function main() {
773
809
  await cmdLoop(taskArg, loopOpts);
774
810
  break;
775
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
+ }
776
835
  log.fail(`Unknown command: ${cmd}`);
777
836
  showHelp();
778
837
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glidercli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Browser automation CLI with autonomous loop execution. Control Chrome via CDP, run YAML task files, execute in Ralph Wiggum loops.",
5
5
  "main": "index.js",
6
6
  "bin": {