Screenshot tool for AI coding agents. Capture browser pages (PNG) and terminal output (SVG).
Get Go from https://go.dev/dl/ or use your package manager:
# Ubuntu/Debian
sudo apt install golang-go
# macOS
brew install goChrome/Chromium is required for browser screenshots.
# Ubuntu/Debian
sudo apt install chromium
# macOS
brew install --cask google-chromegit clone https://github.com/kamalmemon/agentshot.git
cd agentshot
make installBrowser: URL → Chromium (headless) → Chrome DevTools Protocol → PNG
Terminal: Command → PTY → ANSI codes → Parser → SVG
Add to your project's CLAUDE.md or ~/.claude/CLAUDE.md:
## Screenshots
Use agentshot to capture screenshots when building UI or debugging:
- After UI changes: `agentshot browser -o /tmp/shot.png http://localhost:3000`
- Terminal output: `agentshot tui -o /tmp/shot.svg "<command>"`
Then read the file to view the result.Add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(agentshot:*)"
]
}
}Create .claude/commands/screenshot.md:
Take a screenshot of $ARGUMENTS and show me the result.
Use agentshot:
- For URLs: `agentshot browser -o /tmp/shot.png <url>`
- For commands: `agentshot tui -o /tmp/shot.svg "<command>"`
Then read the resulting image file.Usage: /screenshot https://example.com
agentshot browser https://example.com
agentshot browser -o page.png https://example.com
agentshot browser -full https://example.com # full page
agentshot browser -selector "#main" https://example.com| Flag | Default | Description |
|---|---|---|
-o |
auto | Output path |
-full |
false | Full scrollable page |
-selector |
CSS selector | |
-width |
1280 | Viewport width |
-height |
720 | Viewport height |
-wait |
CSS selector to wait for | |
-delay |
0 | Wait after load |
-timeout |
30s | Navigation timeout |
agentshot tui "ls -la --color=always"
agentshot tui -o - "git status" # stdout
agentshot tui -cols 80 -rows 24 "htop"| Flag | Default | Description |
|---|---|---|
-o |
auto | Output path (- for stdout) |
-cols |
120 | Terminal width |
-rows |
40 | Terminal height |
-delay |
500ms | Wait for TUI apps |
-font-size |
14 | Font size |
-font |
monospace | Font family |
MIT