$npx -y skills add Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations --skill giilGet Image [from] Internet Link - Zero-setup CLI for downloading full-resolution images from iCloud, Dropbox, Google Photos, and Google Drive share links. Four-tier capture strategy, browser automation, HEIC conversion, album support. Node.js/Playwright.
| 1 | # GIIL — Get Image [from] Internet Link |
| 2 | |
| 3 | A zero-setup CLI that downloads full-resolution images from cloud photo shares. The missing link between your iPhone screenshots and remote AI coding sessions. |
| 4 | |
| 5 | ## Why This Exists |
| 6 | |
| 7 | The primary use case: **Remote AI-Assisted Debugging** |
| 8 | |
| 9 | You're SSH'd into a remote server running Claude Code, Codex, or another AI assistant. You need to debug a UI issue on your iPhone, but how do you get that screenshot to your remote terminal? |
| 10 | |
| 11 | **Without giil:** |
| 12 | ``` |
| 13 | Download image locally → SCP to server → Tell AI the path |
| 14 | Email yourself → Download on server → Hope it works |
| 15 | Set up complex file sync between devices |
| 16 | ``` |
| 17 | |
| 18 | **With giil:** |
| 19 | ```bash |
| 20 | giil "https://share.icloud.com/photos/0a1Abc_xYz..." --json |
| 21 | # {"path": "/tmp/icloud_20240115_143022.jpg", "width": 1170, ...} |
| 22 | ``` |
| 23 | |
| 24 | One command. AI sees it instantly. No file transfers, no context switching. |
| 25 | |
| 26 | ### The Workflow |
| 27 | |
| 28 | ``` |
| 29 | iPhone Screenshot → iCloud Sync → Photos.app Share Link → Paste to SSH → giil Downloads → AI Analyzes |
| 30 | ``` |
| 31 | |
| 32 | ### Why Cloud Shares Are Hard |
| 33 | |
| 34 | | Problem | Why It's Hard | How giil Solves It | |
| 35 | |---------|---------------|-------------------| |
| 36 | | JavaScript-heavy SPAs | Standard curl/wget can't execute JS | Headless Chromium via Playwright | |
| 37 | | Dynamic image loading | Images load asynchronously from CDN | Network interception captures CDN responses | |
| 38 | | No direct download links | URLs are session-specific and expire | Clicks Download button or intercepts live requests | |
| 39 | | Copy/paste loses quality | Manual screenshots compress images | Captures original resolution from source | |
| 40 | | HEIC format on Apple | Many tools can't process HEIC/HEIF | Platform-aware conversion (sips/heif-convert) | |
| 41 | |
| 42 | ## Quick Start |
| 43 | |
| 44 | ```bash |
| 45 | # Install |
| 46 | curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/giil/main/install.sh?v=3.0.0" | bash |
| 47 | |
| 48 | # Download single image |
| 49 | giil "https://share.icloud.com/photos/02cD9okNHvVd-uuDnPCH3ZEEA" |
| 50 | |
| 51 | # JSON output (best for AI workflows) |
| 52 | giil "https://share.icloud.com/photos/..." --json |
| 53 | |
| 54 | # Download entire album |
| 55 | giil "https://share.icloud.com/photos/..." --all --output ~/album |
| 56 | ``` |
| 57 | |
| 58 | **Note:** First run downloads Playwright Chromium (~200MB, cached in `~/.cache/giil/`). |
| 59 | |
| 60 | ## Supported Platforms |
| 61 | |
| 62 | | Platform | URL Patterns | Method | Browser Required | |
| 63 | |----------|--------------|--------|------------------| |
| 64 | | **iCloud** | `share.icloud.com/photos/*`, `icloud.com/photos/#*` | 4-tier capture strategy | Yes | |
| 65 | | **Dropbox** | `dropbox.com/s/*`, `dropbox.com/scl/fi/*` | Direct curl (`raw=1`) | **No** | |
| 66 | | **Google Photos** | `photos.app.goo.gl/*`, `photos.google.com/share/*` | URL extraction + `=s0` modifier | Yes | |
| 67 | | **Google Drive** | `drive.google.com/file/d/*`, `drive.google.com/open?id=*` | Multi-tier with auth detection | Yes | |
| 68 | |
| 69 | **Dropbox Fast Path:** Direct curl download with no browser overhead—typically 1-2 seconds. |
| 70 | |
| 71 | **Google Photos Full-Res:** Automatically appends `=s0` to CDN URLs for maximum resolution. |
| 72 | |
| 73 | ## Four-Tier Capture Strategy |
| 74 | |
| 75 | giil implements a fallback strategy to maximize reliability: |
| 76 | |
| 77 | ### 1. Download Button (Highest Quality) |
| 78 | - Locates visible Download button using 9 selector patterns |
| 79 | - Clicks and waits for browser download event |
| 80 | - Obtains **original file** (no re-encoding losses) |
| 81 | - Works with HEIC/HEIF originals |
| 82 | |
| 83 | ### 2. Network Interception (Full Resolution) |
| 84 | - Monitors all HTTP responses for CDN patterns (`cvws.icloud-content.com`, etc.) |
| 85 | - Filters by content-type (image formats only) |
| 86 | - Captures largest image buffer (>10KB threshold to skip thumbnails) |
| 87 | - Works even if UI elements are obscured |
| 88 | |
| 89 | ### 3. Element Screenshot |
| 90 | - Queries for image elements using 10 selector patterns |
| 91 | - Verifies element is visible and ≥100×100 pixels |
| 92 | - Takes PNG screenshot of the element |
| 93 | |
| 94 | ### 4. Viewport Screenshot (Last Resort) |
| 95 | - Captures visible viewport (1920×1080) |
| 96 | - Always succeeds if page loads |
| 97 | - Useful for debugging page state |
| 98 | |
| 99 | ## Command Reference |
| 100 | |
| 101 | ### Basic Usage |
| 102 | |
| 103 | ```bash |
| 104 | giil <url> [options] |
| 105 | ``` |
| 106 | |
| 107 | ### Options |
| 108 | |
| 109 | | Flag | Default | Description | |
| 110 | |------|---------|-------------| |
| 111 | | `--output DIR` | `.` | Output directory | |
| 112 | | `--preserve` | off | Keep original bytes (skip MozJPEG compression) | |
| 113 | | `--convert FMT` | — | Convert to: `jpeg`, `png`, `webp` | |
| 114 | | `--quality N` | `85` | JPEG quality 1-100 | |
| 115 | | `--base64` | off | Output base64 to stdout (no file saved) | |
| 116 | | `--json` | off | Output JSON metadata | |
| 117 | | `--all` | off | Download all photos from album | |
| 118 | | `--timeout N` | `60` | Page load timeout in seconds | |
| 119 | | `--debug` | off | Save debug artifacts on failure | |
| 120 | | `--verbose` | off | Show detailed progress | |
| 121 | | `--trace` | off | Enable Playwright tracing for deep debugging | |
| 122 | | `--print-url` | off | Output resolved CDN URL (don't download) | |
| 123 | | `--debug-dir DIR` | |