CLI
CLIはエージェントとスクリプト向けの安定したinterfaceです。
まず状態と共有タブを確認します。
abg statusabg tabs --compactabg inspect返ってきた t1 のようなタブ参照をread-onlyコマンドに渡します。
abg read t1 --format markdownabg read t1 --selector article --format markdownabg frames t1abg get text t1 "h1"abg snapshot t1 --interactive-only --compactabg screenshot t1 --out page.pngabg console t1abg table t1 --format markdownabg network t1 --url "*api*"abg audit --lines 50変更系コマンドも同じ共有タブに対して実行します。設定によりローカル承認promptが出ます。
abg click t1 --selector "button.save"abg fill t1 --selector "input[name=email]" --value "me@example.com"abg paste t1 --selector "[contenteditable=true]" --stdinabg key t1 Enterabg upload t1 --selector "input[type=file]" --file ./report.pdfabg navigate t1 "https://example.com"abg revoke t1明示的なタブ参照の代わりにmatch flagも使えます。
abg read --match-url "*notion.so*" --format markdownabg click --match-title "Dashboard" --selector "button.refresh"iframeを扱う前には frames を使います。同一originでアクセスできるframeには @f1 のような参照が付きます。
abg frames t1abg read t1 --frame @f1 --selector "main" --format markdownリッチエディタ
Section titled “リッチエディタ”通常のinputや素直なeditableには fill を使います。合成inputを無視するリッチエディタでは paste を使い、
空にする必要がある場合は先に clear します。
abg clear t1 --selector "[contenteditable=true]"printf "new content" | abg paste t1 --selector "[contenteditable=true]" --stdin監査ログにはselector、action名、byte lengthなどが記録されます。貼り付けた本文は監査ログに書きません。
escape hatch
Section titled “escape hatch”通常は get、find、wait、snapshot、plugin commandのような名前付きprimitiveを優先します。
どうしても足りないときだけ eval を使います。
abg eval t1 --script "document.title" --approveevalは拡張popupで初期状態OFFです。Trusted automationがOFFの場合、各eval呼び出しに --approve とローカル承認が必要です。