Quick browser screenshots with one command.
The -b flag (or co browser) takes instant screenshots without writing code. Perfect for debugging, testing, and sharing visual proof.
co -b "screenshot localhost:3000"Saves to .tmp/screenshot_YYYYMMDD_HHMMSS.png by default.
co -b "screenshot [URL] [save to PATH] [size SIZE]"All parts except URL are optional.
# Screenshot local development
co -b "screenshot localhost:3000"
# With specific port
co -b "screenshot localhost:8080"
# External site
co -b "screenshot example.com"# Save to temp directory
co -b "screenshot localhost:3000 save to /tmp/debug.png"
# Save to current directory with name
co -b "screenshot localhost:3000 save to homepage.png"
# Save to subdirectory
co -b "screenshot localhost:3000 save to screenshots/test.png"# iPhone viewport
co -b "screenshot localhost:3000 size iphone"
# Custom dimensions
co -b "screenshot localhost:3000 size 390x844"
# Common presets
co -b "screenshot localhost:3000 size ipad"
co -b "screenshot localhost:3000 size desktop"# Debug mobile checkout flow
co -b "screenshot localhost:3000/checkout save to /tmp/checkout-mobile.png size iphone"
# Document bug on specific page
co -b "screenshot localhost:3000/xray save to bug-report.png size 1920x1080"
# Test responsive design
co -b "screenshot localhost:3000 save to mobile.png size 390x844"
co -b "screenshot localhost:3000 save to tablet.png size 768x1024"
co -b "screenshot localhost:3000 save to desktop.png size 1920x1080"| Preset | Dimensions | Device |
|---|---|---|
iphone |
390x844 | iPhone 14/15 |
android |
360x800 | Common Android |
ipad |
768x1024 | iPad |
desktop |
1920x1080 | Full HD Desktop |
The command intelligently handles URLs:
localhost→http://localhostlocalhost:3000→http://localhost:3000example.com→https://example.comhttp://example.com→http://example.com(unchanged)
If no path specified:
- Saves under
.tmp/ - Named
screenshot_YYYYMMDD_HHMMSS.png - Example:
.tmp/screenshot_20240115_143022.png
Browser features require Playwright:
pip install playwright
playwright install chromiumOr install ConnectOnion with browser support:
pip install connectonion[browser]# Quick check of homepage
co -b "screenshot localhost:3000"
# Debug specific route
co -b "screenshot localhost:3000/api/status"# Capture error state
co -b "screenshot localhost:3000/error save to bug.png"
# Mobile-specific issue
co -b "screenshot localhost:3000/mobile-bug save to mobile-issue.png size iphone"# Test different viewports
for size in iphone android ipad desktop; do
co -b "screenshot localhost:3000 save to view-$size.png size $size"
done# In GitHub Actions or similar
co -b "screenshot $DEPLOY_URL save to artifacts/deployed.png"# Missing URL
co -b "screenshot"
❌ Usage: co -b "screenshot [URL] [save to PATH] [size SIZE]"
# Playwright not installed
co -b "screenshot localhost:3000"
❌ Browser tools not installed
Run: pip install playwright && playwright install chromium
# Missing OPENAI_API_KEY
co -b "screenshot localhost:3000"
❌ Natural language browser agent unavailable. Set OPENAI_API_KEY and try again.
# Cannot reach URL
co -b "screenshot localhost:3000"
❌ Cannot reach http://localhost:3000
Is your server running?
# Permission denied
co -b "screenshot localhost:3000 save to /root/test.png"
❌ Cannot save to /root/test.png (permission denied)- Quick Debug: Just
co -b "screenshot localhost:3000"for instant feedback - Organize Screenshots: Use descriptive paths like
save to bugs/issue-123.png - Test Viewports: Use device names (
iphone,ipad) for common sizes - Timestamps: Default filenames include timestamp for versioning
- Screenshots only (no interaction, clicking, forms)
- Single page at a time
- Headless browser only
- PNG format only
For complex browser automation, use the full ConnectOnion browser agent or Playwright directly.
OPENAI_API_KEYmust be set (managed keys are not used here)- Playwright installed and set up
co -b "screenshot localhost:3000"
co -b "screenshot localhost:3000/_error save to error.png"co -b "screenshot localhost:8000"
co -b "screenshot localhost:8000/docs save to api-docs.png"co -b "screenshot localhost:8000"
co -b "screenshot localhost:8000/admin save to admin.png"co -b "screenshot localhost:3000"
co -b "screenshot localhost:3000 size iphone"The -b flag provides dead-simple browser screenshots. No setup, no complexity - just describe what screenshot you want and where to save it. Perfect for debugging during development.