mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
docs: document inspect, style, cleanup, prettyscreenshot browse commands
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -585,6 +585,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
### Interaction
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `cleanup [--ads] [--cookies] [--sticky] [--social] [--all]` | Remove page clutter (ads, cookie banners, sticky elements, social widgets) |
|
||||
| `click <sel>` | Click element |
|
||||
| `cookie <name>=<value>` | Set cookie on current page domain |
|
||||
| `cookie-import <json>` | Import cookies from JSON file |
|
||||
@@ -597,6 +598,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
| `press <key>` | Press key — Enter, Tab, Escape, ArrowUp/Down/Left/Right, Backspace, Delete, Home, End, PageUp, PageDown, or modifiers like Shift+Enter |
|
||||
| `scroll [sel]` | Scroll element into view, or scroll to page bottom if no selector |
|
||||
| `select <sel> <val>` | Select dropdown option by value, label, or visible text |
|
||||
| `style <sel> <prop> <value> | style --undo [N]` | Modify CSS property on element (with undo support) |
|
||||
| `type <text>` | Type into focused element |
|
||||
| `upload <sel> <file> [file2...]` | Upload file(s) |
|
||||
| `useragent <string>` | Set user agent |
|
||||
@@ -612,6 +614,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
| `css <sel> <prop>` | Computed CSS value |
|
||||
| `dialog [--clear]` | Dialog messages |
|
||||
| `eval <file>` | Run JavaScript from file and return result as string (path must be under /tmp or cwd) |
|
||||
| `inspect [selector] [--all] [--history]` | Deep CSS inspection via CDP — full rule cascade, box model, computed styles |
|
||||
| `is <prop> <sel>` | State check (visible/hidden/enabled/disabled/checked/editable/focused) |
|
||||
| `js <expr>` | Run JavaScript expression and return result as string |
|
||||
| `network [--clear]` | Network requests |
|
||||
@@ -623,6 +626,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
|---------|-------------|
|
||||
| `diff <url1> <url2>` | Text diff between pages |
|
||||
| `pdf [path]` | Save as PDF |
|
||||
| `prettyscreenshot [--scroll-to sel|text] [--cleanup] [--hide sel...] [--width px] [path]` | Clean screenshot with optional cleanup, scroll positioning, and element hiding |
|
||||
| `responsive [prefix]` | Screenshots at mobile (375x812), tablet (768x1024), desktop (1280x720). Saves as {prefix}-mobile.png etc. |
|
||||
| `screenshot [--viewport] [--clip x,y,w,h] [selector|@ref] [path]` | Save screenshot (supports element crop via CSS/@ref, --clip region, --viewport) |
|
||||
|
||||
|
||||
@@ -434,6 +434,30 @@ $B click @c1 # cursor-interactive ref (from -C)
|
||||
|
||||
Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
|
||||
## CSS Inspector & Style Modification
|
||||
|
||||
### Inspect element CSS
|
||||
```bash
|
||||
$B inspect .header # full CSS cascade for selector
|
||||
$B inspect # latest picked element from sidebar
|
||||
$B inspect --all # include user-agent stylesheet rules
|
||||
$B inspect --history # show modification history
|
||||
```
|
||||
|
||||
### Modify styles live
|
||||
```bash
|
||||
$B style .header background-color #1a1a1a # modify CSS property
|
||||
$B style --undo # revert last change
|
||||
$B style --undo 2 # revert specific change
|
||||
```
|
||||
|
||||
### Clean screenshots
|
||||
```bash
|
||||
$B cleanup --all # remove ads, cookies, sticky, social
|
||||
$B cleanup --ads --cookies # selective cleanup
|
||||
$B prettyscreenshot --cleanup --scroll-to ".pricing" --width 1440 ~/Desktop/hero.png
|
||||
```
|
||||
|
||||
## Full Command List
|
||||
|
||||
### Navigation
|
||||
@@ -462,6 +486,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
### Interaction
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `cleanup [--ads] [--cookies] [--sticky] [--social] [--all]` | Remove page clutter (ads, cookie banners, sticky elements, social widgets) |
|
||||
| `click <sel>` | Click element |
|
||||
| `cookie <name>=<value>` | Set cookie on current page domain |
|
||||
| `cookie-import <json>` | Import cookies from JSON file |
|
||||
@@ -474,6 +499,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
| `press <key>` | Press key — Enter, Tab, Escape, ArrowUp/Down/Left/Right, Backspace, Delete, Home, End, PageUp, PageDown, or modifiers like Shift+Enter |
|
||||
| `scroll [sel]` | Scroll element into view, or scroll to page bottom if no selector |
|
||||
| `select <sel> <val>` | Select dropdown option by value, label, or visible text |
|
||||
| `style <sel> <prop> <value> | style --undo [N]` | Modify CSS property on element (with undo support) |
|
||||
| `type <text>` | Type into focused element |
|
||||
| `upload <sel> <file> [file2...]` | Upload file(s) |
|
||||
| `useragent <string>` | Set user agent |
|
||||
@@ -489,6 +515,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
| `css <sel> <prop>` | Computed CSS value |
|
||||
| `dialog [--clear]` | Dialog messages |
|
||||
| `eval <file>` | Run JavaScript from file and return result as string (path must be under /tmp or cwd) |
|
||||
| `inspect [selector] [--all] [--history]` | Deep CSS inspection via CDP — full rule cascade, box model, computed styles |
|
||||
| `is <prop> <sel>` | State check (visible/hidden/enabled/disabled/checked/editable/focused) |
|
||||
| `js <expr>` | Run JavaScript expression and return result as string |
|
||||
| `network [--clear]` | Network requests |
|
||||
@@ -500,6 +527,7 @@ Refs are invalidated on navigation — run `snapshot` again after `goto`.
|
||||
|---------|-------------|
|
||||
| `diff <url1> <url2>` | Text diff between pages |
|
||||
| `pdf [path]` | Save as PDF |
|
||||
| `prettyscreenshot [--scroll-to sel|text] [--cleanup] [--hide sel...] [--width px] [path]` | Clean screenshot with optional cleanup, scroll positioning, and element hiding |
|
||||
| `responsive [prefix]` | Screenshots at mobile (375x812), tablet (768x1024), desktop (1280x720). Saves as {prefix}-mobile.png etc. |
|
||||
| `screenshot [--viewport] [--clip x,y,w,h] [selector|@ref] [path]` | Save screenshot (supports element crop via CSS/@ref, --clip region, --viewport) |
|
||||
|
||||
|
||||
@@ -137,6 +137,30 @@ After `resume`, you get a fresh snapshot of wherever the user left off.
|
||||
|
||||
{{SNAPSHOT_FLAGS}}
|
||||
|
||||
## CSS Inspector & Style Modification
|
||||
|
||||
### Inspect element CSS
|
||||
```bash
|
||||
$B inspect .header # full CSS cascade for selector
|
||||
$B inspect # latest picked element from sidebar
|
||||
$B inspect --all # include user-agent stylesheet rules
|
||||
$B inspect --history # show modification history
|
||||
```
|
||||
|
||||
### Modify styles live
|
||||
```bash
|
||||
$B style .header background-color #1a1a1a # modify CSS property
|
||||
$B style --undo # revert last change
|
||||
$B style --undo 2 # revert specific change
|
||||
```
|
||||
|
||||
### Clean screenshots
|
||||
```bash
|
||||
$B cleanup --all # remove ads, cookies, sticky, social
|
||||
$B cleanup --ads --cookies # selective cleanup
|
||||
$B prettyscreenshot --cleanup --scroll-to ".pricing" --width 1440 ~/Desktop/hero.png
|
||||
```
|
||||
|
||||
## Full Command List
|
||||
|
||||
{{COMMAND_REFERENCE}}
|
||||
|
||||
Reference in New Issue
Block a user