Skip to content

Add --llm-context flag for AI agent discoverability #57

@SeMmyT

Description

@SeMmyT

Problem

The --help output is designed for humans. AI agents consistently fail to construct correct surf commands without a pre-written cheatsheet.

Proposed fix

Add surf --llm-context that outputs a condensed, single-block reference optimized for LLM context windows:

SURF-CLI QUICK REFERENCE (for AI agents)
Navigate: surf navigate "URL"
Screenshot: surf screenshot /tmp/name.png
Full page: surf screenshot --fullpage /tmp/name.png
Read DOM: surf page.read --depth 2 --compact
Click ref: surf click e5
Type: surf type "text" --submit
JS eval: surf js "expression"
Scroll: surf scroll down 800 | surf scroll bottom
Device: surf emulate.device "iPhone 14"
Resize: surf resize 375 812
Wait: sleep 2 (between navigate and screenshot)
Cookies: surf cookie list | surf cookie get "name"
NOTE: Always sleep 2 after navigate. Refs come from page.read.

Severity

Medium — agents fail without a cheatsheet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions