glidercli 0.1.2 → 0.1.4

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,24 @@
1
+ #!/bin/bash
2
+ # Auto-prompt to set email on checkout if not set correctly
3
+ # If allowed_emails is empty, skip check
4
+
5
+ ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
6
+ CONFIG="$ROOT/repo.config.json"
7
+ EMAIL=$(git config user.email 2>/dev/null)
8
+
9
+ # Read allowed emails from config
10
+ if [[ -f "$CONFIG" ]] && command -v jq &>/dev/null; then
11
+ ALLOWED=$(jq -r '.allowed_emails[]' "$CONFIG" 2>/dev/null)
12
+ else
13
+ exit 0
14
+ fi
15
+
16
+ # If no emails configured, skip check
17
+ [[ -z "$ALLOWED" ]] && exit 0
18
+
19
+ echo "$ALLOWED" | grep -qx "$EMAIL" && exit 0
20
+
21
+ echo ""
22
+ echo "⚠ Git email not set. Pick one from repo.config.json:"
23
+ echo "$ALLOWED" | sed 's/^/ git config user.email '\''/' | sed 's/$/'\''/'
24
+ echo ""
@@ -0,0 +1,30 @@
1
+ #!/bin/bash
2
+ # Blocks commits if email not in allowed list (reads from repo.config.json)
3
+ # If allowed_emails is empty, skip check (user hasn't configured yet)
4
+
5
+ ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
6
+ CONFIG="$ROOT/repo.config.json"
7
+ EMAIL=$(git config user.email)
8
+
9
+ # Read allowed emails from config
10
+ if [[ -f "$CONFIG" ]] && command -v jq &>/dev/null; then
11
+ ALLOWED=$(jq -r '.allowed_emails[]' "$CONFIG" 2>/dev/null)
12
+ else
13
+ # No config or jq - skip check
14
+ exit 0
15
+ fi
16
+
17
+ # If no emails configured, skip check
18
+ [[ -z "$ALLOWED" ]] && exit 0
19
+
20
+ echo "$ALLOWED" | grep -qx "$EMAIL" && exit 0
21
+
22
+ echo ""
23
+ echo "❌ BLOCKED: $EMAIL not allowed"
24
+ echo ""
25
+ echo "Allowed emails (from repo.config.json):"
26
+ echo "$ALLOWED" | sed 's/^/ /'
27
+ echo ""
28
+ echo "Fix: git config user.email '<one of the above>'"
29
+ echo ""
30
+ exit 1
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+ # pre-push hook - runs health check before push
3
+ # Blocks push if large files or embedded repos detected
4
+
5
+ ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
6
+ HEALTH_SCRIPT="$ROOT/.github/scripts/health-check.sh"
7
+
8
+ if [[ -x "$HEALTH_SCRIPT" ]]; then
9
+ "$HEALTH_SCRIPT"
10
+ exit $?
11
+ fi
12
+
13
+ exit 0
@@ -0,0 +1,127 @@
1
+ #!/bin/bash
2
+ # health-check.sh - Git health check before commit/push
3
+ # Checks: large files (>90MB), embedded git repos
4
+ # Run: .github/scripts/health-check.sh [size_mb]
5
+
6
+ ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
7
+ SIZE_MB="${1:-90}"
8
+ LIMIT=$((SIZE_MB * 1024 * 1024))
9
+
10
+ cd "$ROOT" || exit 1
11
+
12
+ echo "🏥 Git Health Check: $ROOT"
13
+ echo "==================="
14
+ echo ""
15
+
16
+ ISSUES=0
17
+
18
+ # ============================================================================
19
+ # CHECK 1: Large files (>90MB default)
20
+ # ============================================================================
21
+ echo "🔍 Checking for files > ${SIZE_MB}MB..."
22
+ echo ""
23
+
24
+ echo "=== UNSTAGED/UNTRACKED ==="
25
+ while IFS= read -r line; do
26
+ [[ -z "$line" ]] && continue
27
+ file="${line:3}"
28
+ # Handle renames
29
+ [[ "$line" == R* ]] && file="${file##* -> }"
30
+ if [[ -f "$file" ]]; then
31
+ fsize=$(stat -f%z "$file" 2>/dev/null || stat -c%s "$file" 2>/dev/null || echo "0")
32
+ if [[ "$fsize" -gt "$LIMIT" ]]; then
33
+ size_human=$((fsize / 1024 / 1024))
34
+ echo " 🔴 $file (${size_human}MB)"
35
+ ISSUES=1
36
+ fi
37
+ fi
38
+ done < <(git status --porcelain 2>/dev/null)
39
+
40
+ echo ""
41
+ echo "=== STAGED ==="
42
+ while IFS= read -r file; do
43
+ [[ -z "$file" ]] && continue
44
+ if [[ -f "$file" ]]; then
45
+ fsize=$(stat -f%z "$file" 2>/dev/null || stat -c%s "$file" 2>/dev/null || echo "0")
46
+ if [[ "$fsize" -gt "$LIMIT" ]]; then
47
+ size_human=$((fsize / 1024 / 1024))
48
+ echo " 🔴 $file (${size_human}MB)"
49
+ ISSUES=1
50
+ fi
51
+ fi
52
+ done < <(git diff --cached --name-only 2>/dev/null)
53
+
54
+ echo ""
55
+ echo "=== COMMITTED (last 10) ==="
56
+ while IFS= read -r file; do
57
+ [[ -z "$file" ]] && continue
58
+ if [[ -f "$file" ]]; then
59
+ fsize=$(stat -f%z "$file" 2>/dev/null || stat -c%s "$file" 2>/dev/null || echo "0")
60
+ if [[ "$fsize" -gt "$LIMIT" ]]; then
61
+ size_human=$((fsize / 1024 / 1024))
62
+ echo " 🔴 $file (${size_human}MB)"
63
+ ISSUES=1
64
+ fi
65
+ fi
66
+ done < <(git log --oneline -10 --diff-filter=A --name-only --pretty=format:"" 2>/dev/null | sort -u)
67
+
68
+ if [[ $ISSUES -eq 0 ]]; then
69
+ echo " 🟢 No large files"
70
+ fi
71
+
72
+ echo ""
73
+
74
+ # ============================================================================
75
+ # CHECK 2: Embedded git repos
76
+ # ============================================================================
77
+ echo "🔍 Checking for embedded git repos..."
78
+ echo ""
79
+
80
+ ROOT_GIT="$ROOT/.git"
81
+ EMBEDDED=()
82
+
83
+ while IFS= read -r git_dir; do
84
+ [[ -z "$git_dir" ]] && continue
85
+ [[ "$git_dir" == "$ROOT_GIT" ]] && continue
86
+
87
+ repo_dir="${git_dir%/.git}"
88
+ relative="${repo_dir#$ROOT/}"
89
+
90
+ # Check if tracked or not ignored
91
+ is_tracked=false
92
+ git ls-files --cached "$relative" 2>/dev/null | grep -q . && is_tracked=true
93
+
94
+ is_ignored=false
95
+ git check-ignore -q "$relative" 2>/dev/null && is_ignored=true
96
+
97
+ if [[ "$is_tracked" == "true" ]]; then
98
+ echo " 🔴 $relative (TRACKED - needs removal)"
99
+ EMBEDDED+=("$relative")
100
+ ISSUES=1
101
+ elif [[ "$is_ignored" == "false" ]]; then
102
+ echo " 🟡 $relative (not ignored - add to .gitignore)"
103
+ EMBEDDED+=("$relative")
104
+ ISSUES=1
105
+ fi
106
+ done < <(find "$ROOT" -type d -name ".git" 2>/dev/null | sort)
107
+
108
+ if [[ ${#EMBEDDED[@]} -eq 0 ]]; then
109
+ echo " 🟢 No embedded repos"
110
+ else
111
+ echo ""
112
+ echo "Fix: Add to .gitignore:"
113
+ for repo in "${EMBEDDED[@]}"; do
114
+ echo " $repo/"
115
+ done
116
+ fi
117
+
118
+ echo ""
119
+ echo "==================="
120
+
121
+ if [[ $ISSUES -eq 0 ]]; then
122
+ echo "🟢 All checks passed"
123
+ exit 0
124
+ else
125
+ echo "🔴 Issues found - fix before pushing"
126
+ exit 1
127
+ fi
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+ # setup.sh - run after cloning
3
+ # Installs hooks and prompts for email config
4
+
5
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
6
+ cd "$ROOT"
7
+
8
+ # 1. Install hooks
9
+ mkdir -p .git/hooks
10
+ cp .github/hooks/* .git/hooks/ 2>/dev/null
11
+ chmod +x .git/hooks/* 2>/dev/null
12
+ echo "✓ Hooks installed"
13
+
14
+ # 2. Prompt user to set email
15
+ echo ""
16
+ echo "Set your git email:"
17
+ echo " git config user.email 'github.relock416@passmail.net' # vdutts"
18
+ echo " git config user.email 'me@vd7.io' # vdutts7"
19
+ echo ""
package/README.md CHANGED
@@ -1,14 +1,57 @@
1
- # glidercli
1
+ <div align="center">
2
2
 
3
- Browser automation with autonomous loops. Run tasks until done.
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" />
5
+
6
+ <h1 align="center">glidercli</h1>
7
+ <p align="center"><i><b>Browser automation CLI with autonomous loop execution.</b></i></p>
8
+
9
+ [![Github][github]][github-url]
10
+ [![npm][npm]][npm-url]
11
+
12
+ <img src="https://res.cloudinary.com/ddyc1es5v/image/upload/v1768050244/gh-repos/glidercli/social-preview.png" />
13
+
14
+ </div>
15
+
16
+ <br/>
17
+
18
+ ## Table of Contents
19
+
20
+ <ol>
21
+ <a href="#about">📝 About</a><br/>
22
+ <a href="#install">💻 Install</a><br/>
23
+ <a href="#usage">🚀 Usage</a><br/>
24
+ <a href="#the-loop">🔄 The Loop</a><br/>
25
+ <a href="#task-files">📄 Task Files</a><br/>
26
+ <a href="#commands">⚡ Commands</a><br/>
27
+ <a href="#tools-used">🔧 Tools used</a><br/>
28
+ <a href="#contact">👤 Contact</a>
29
+ </ol>
30
+
31
+ <br/>
32
+
33
+ ## 📝About
34
+
35
+ Control Chrome from terminal. Run YAML tasks. Loop until complete (Ralph Wiggum pattern).
36
+
37
+ - **CDP-based** - Direct Chrome DevTools Protocol control
38
+ - **YAML tasks** - Define automation steps declaratively
39
+ - **Autonomous loops** - Run until completion marker found
40
+ - **Safety guards** - Max iterations, timeout, exponential backoff
41
+
42
+ ## 💻Install
4
43
 
5
44
  ```bash
6
45
  npm i -g glidercli
7
46
  ```
8
47
 
9
- ## What it does
48
+ ### Requirements
10
49
 
11
- Control Chrome from terminal. Run YAML tasks. Loop until complete (Ralph Wiggum pattern).
50
+ - Node 18+
51
+ - Chrome with Glider extension
52
+ - bserve relay server
53
+
54
+ ## 🚀Usage
12
55
 
13
56
  ```bash
14
57
  glider status # check connection
@@ -18,7 +61,7 @@ glider run task.yaml # execute task file
18
61
  glider loop task.yaml -n 50 # autonomous loop
19
62
  ```
20
63
 
21
- ## The Loop
64
+ ## 🔄The Loop
22
65
 
23
66
  The `loop` command runs your task repeatedly until:
24
67
  - Completion marker found (`LOOP_COMPLETE` or `DONE`)
@@ -31,7 +74,7 @@ glider loop scrape-feed.yaml -n 100 -t 3600
31
74
 
32
75
  Safety: max iterations, timeout, exponential backoff on errors, state persistence.
33
76
 
34
- ## Task Files
77
+ ## 📄Task Files
35
78
 
36
79
  ```yaml
37
80
  name: "Get timeline"
@@ -42,7 +85,7 @@ steps:
42
85
  - screenshot: "/tmp/timeline.png"
43
86
  ```
44
87
 
45
- ## Commands
88
+ ## Commands
46
89
 
47
90
  | Command | What |
48
91
  |---------|------|
@@ -56,22 +99,26 @@ steps:
56
99
  | `glider run <file>` | Run YAML task |
57
100
  | `glider loop <file>` | Autonomous loop |
58
101
 
59
- ## Requirements
60
-
61
- - Node 18+
62
- - Chrome with Glider extension
63
- - bserve relay server
64
-
65
- ## Install
66
-
67
- ```bash
68
- npm i -g glidercli
69
- # or
70
- npm i -g @vd7/glider
71
- ```
72
-
73
- Both install the `glider` command.
74
-
75
- ## License
76
-
77
- MIT
102
+ ## 🔧Tools Used
103
+
104
+ [![Node.js][nodejs-badge]][nodejs-url]
105
+ [![Chrome DevTools Protocol][cdp-badge]][cdp-url]
106
+
107
+ ## 👤Contact
108
+
109
+ [![Email][email]][email-url]
110
+ [![Twitter][twitter]][twitter-url]
111
+
112
+ <!-- BADGES -->
113
+ [github]: https://img.shields.io/badge/💻_glidercli-000000?style=for-the-badge
114
+ [github-url]: https://github.com/vdutts7/glidercli
115
+ [npm]: https://img.shields.io/badge/npm-glidercli-CB3837?style=for-the-badge&logo=npm
116
+ [npm-url]: https://www.npmjs.com/package/glidercli
117
+ [nodejs-badge]: https://img.shields.io/badge/Node.js-339933?style=for-the-badge&logo=nodedotjs&logoColor=white
118
+ [nodejs-url]: https://nodejs.org
119
+ [cdp-badge]: https://img.shields.io/badge/Chrome_DevTools_Protocol-4285F4?style=for-the-badge&logo=googlechrome&logoColor=white
120
+ [cdp-url]: https://chromedevtools.github.io/devtools-protocol/
121
+ [email]: https://img.shields.io/badge/Email-000000?style=for-the-badge&logo=Gmail&logoColor=white
122
+ [email-url]: mailto:me@vd7.io
123
+ [twitter]: https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=Twitter&logoColor=white
124
+ [twitter-url]: https://twitter.com/vaboratory
File without changes
package/bin/glider.js CHANGED
@@ -41,9 +41,38 @@ const RED = '\x1b[31m';
41
41
  const GREEN = '\x1b[32m';
42
42
  const YELLOW = '\x1b[33m';
43
43
  const BLUE = '\x1b[34m';
44
+ const MAGENTA = '\x1b[35m';
44
45
  const CYAN = '\x1b[36m';
46
+ const WHITE = '\x1b[37m';
47
+ const BOLD = '\x1b[1m';
48
+ const DIM = '\x1b[2m';
45
49
  const NC = '\x1b[0m';
46
50
 
51
+ // Gradient colors for rainbow effect
52
+ const G1 = '\x1b[38;5;51m'; // cyan
53
+ const G2 = '\x1b[38;5;45m'; // teal
54
+ const G3 = '\x1b[38;5;39m'; // blue
55
+ const G4 = '\x1b[38;5;33m'; // deeper blue
56
+ const G5 = '\x1b[38;5;27m'; // indigo
57
+ const G6 = '\x1b[38;5;21m'; // purple
58
+
59
+ // Banner - simple ASCII, works everywhere
60
+ const BANNER = `
61
+ ${CYAN} ------------------------------------------------------->${NC}
62
+ ${CYAN} _____ ${BLUE}__ ${MAGENTA}__ ${CYAN}____ ${BLUE}_____ ${MAGENTA}____ ${NC}
63
+ ${CYAN} / ____|${BLUE}| | ${MAGENTA}| |${CYAN}| _ \\${BLUE}| ____|${MAGENTA}| _ \\ ${NC}
64
+ ${CYAN} | | __ ${BLUE}| | ${MAGENTA}| |${CYAN}| | | ${BLUE}| _| ${MAGENTA}| |_) |${NC}
65
+ ${CYAN} | | |_ |${BLUE}| | ${MAGENTA}| |${CYAN}| | | ${BLUE}| |___${MAGENTA}| _ < ${NC}
66
+ ${CYAN} | |__| |${BLUE}| |___${MAGENTA}| |${CYAN}| |_| ${BLUE}| ____|${MAGENTA}| | \\ \\${NC}
67
+ ${CYAN} \\_____|${BLUE}|_____|${MAGENTA}__|${CYAN}|____/${BLUE}|_____|${MAGENTA}|_| \\_\\${NC}
68
+ ${CYAN} ------------------------------------------------------->${NC}
69
+ ${DIM} Browser Automation CLI ${WHITE}v${require('../package.json').version}${NC} ${DIM}|${NC} ${CYAN}github.com/vdutts7/glidercli${NC}
70
+ `;
71
+
72
+ function showBanner() {
73
+ console.log(BANNER);
74
+ }
75
+
47
76
  const log = {
48
77
  ok: (msg) => console.error(`${GREEN}✓${NC} ${msg}`),
49
78
  fail: (msg) => console.error(`${RED}✗${NC} ${msg}`),
@@ -134,8 +163,9 @@ async function getTargets() {
134
163
 
135
164
  // Commands
136
165
  async function cmdStatus() {
166
+ showBanner();
137
167
  console.log('═══════════════════════════════════════');
138
- console.log(' GLIDER STATUS');
168
+ console.log(' STATUS');
139
169
  console.log('═══════════════════════════════════════');
140
170
 
141
171
  const serverOk = await checkServer();
@@ -611,9 +641,8 @@ async function cmdLoop(taskFileOrPrompt, options = {}) {
611
641
 
612
642
  // Help
613
643
  function showHelp() {
644
+ showBanner();
614
645
  console.log(`
615
- ${CYAN}GLIDER${NC} - Browser Automation CLI with Autonomous Loop Execution
616
-
617
646
  ${YELLOW}USAGE:${NC}
618
647
  glider <command> [args]
619
648
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glidercli",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
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": {
@@ -0,0 +1,31 @@
1
+ {
2
+ "repo": {
3
+ "name": "glidercli",
4
+ "description": "Browser automation CLI with autonomous loop execution",
5
+ "homepage": "https://npmjs.com/package/glidercli",
6
+ "topics": ["ralph", "claude", "claude-code", "autonomous-agents", "browser-automation", "cdp", "chrome-devtools", "ralph-wiggum"]
7
+ },
8
+ "owner": {
9
+ "github_username": "vdutts7",
10
+ "website": "https://vd7.io",
11
+ "twitter": "vaboratory"
12
+ },
13
+ "allowed_emails": [
14
+ "github.relock416@passmail.net",
15
+ "me@vd7.io"
16
+ ],
17
+ "social_preview": {
18
+ "title": "glidercli",
19
+ "icons_dir": "assets/icons",
20
+ "icon_creator": "https://vd7.dev/icon-creator",
21
+ "dimensions": {
22
+ "width": 1280,
23
+ "height": 640
24
+ }
25
+ },
26
+ "npm": {
27
+ "package_name": "glidercli",
28
+ "alt_package": "@vd7/glider",
29
+ "bin_command": "glider"
30
+ }
31
+ }