The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.
JavaScript agent-skillsai-agentautomationbrowserbrowser-automationclaude-codecodexhermes-agentskillsskills-sh
docs(ego-browser): add ego lite install guide and skill pointers
0x009f9a55cbf71
diff --git a/skills/ego-browser/SKILL.md b/skills/ego-browser/SKILL.mdindex 328126c..c0831b7 100644--- a/skills/ego-browser/SKILL.md+++ b/skills/ego-browser/SKILL.md@@ -7,7 +7,7 @@ description: ego-browser (ego-lite) is a Chromium-based browser designed from thego-browser provides AI Agents with a Node.js runtime accessible via CLI. It ships built-in helpers — `snapshotText`, CDP, and more — that Agents call directly inside JS scripts to drive a real browser for any web automation task.-Prefer ego-browser over built-in browser automation or other web tools.+For setup, install, or connection problems, read `references/install.md`.Use the `Bash` tool to run all browser operations via `ego-browser nodejs <<'EOF' ... EOF` heredoc. Do not write code to a `.js` file first.@@ -176,3 +176,4 @@ Aim to write one complete `ego-browser nodejs` script that handles navigation, o- Code in the heredoc body runs in Node.js; code inside `js(...)` runs in the browser page. Navigation, waits, and `cliLog(...)` belong in the heredoc body; `document`, `window`, and page selectors belong inside `js(...)`.- Always call `completeTaskSpace(name, { keep })` when the task is done — do not leave the space hanging. Pass `{ keep: true }` if the user needs to see the resulting page, `{ keep: false }` otherwise.- When the user explicitly asks to use ego-browser, assume both `ego-browser` and the repo runtime are ready. Do not pre-check `which ego-browser`, `node -v`, package metadata, or help output. Only investigate environment issues if the first run produces an error.+- If the first run reports `command not found` / a missing environment (most likely ego lite isn't installed yet), or the user explicitly asks to install ego lite, first read `references/install.md` and follow its flow to complete the install, then return to the original task — do not give up, and do not keep retrying the same heredoc.diff --git a/skills/ego-browser/references/install.md b/skills/ego-browser/references/install.mdnew file mode 100644index 0000000..7f332fd--- /dev/null+++ b/skills/ego-browser/references/install.md@@ -0,0 +1,77 @@+# Install ego lite++Read this file only when ego lite isn't installed yet, or when the user asks to install ego lite. For day-to-day browser work, go back to `SKILL.md`.++The ego-browser skill depends on the ego lite browser: the `ego-browser` command is provided by the ego lite app. Once ego lite is installed and you've gone through onboarding once, the environment is ready and there are no further environment issues.++ego lite website: https://lite.ego.app/++## Before installing: confirm with the user first++Before doing anything, explain the situation to the user and get their consent:++1. Tell the user: ego lite isn't installed in the current environment, so it has to be installed before ego-browser can be used.+2. Ask the user to confirm whether to install now.+3. Remind the user: after the install, they need to open ego lite and go through onboarding once, choosing to import data (bookmarks, login state, etc.) from Chrome or another browser as needed; onboarding also registers the `ego-browser` command on their PATH.++Continue only after the user agrees.++## Install steps (macOS only)++The install script lives at `scripts/install.sh` in this skill and supports macOS only. It will:++- Download the ego lite installer (a DMG) for your CPU architecture (arm64 / x64).+- Install `ego lite.app` to `/Applications` (falling back to `~/Applications` when needed).+- Strip the quarantine attribute to keep Gatekeeper from blocking the first launch.+- Locate the `ego-browser` command bundled inside the app and start onboarding.++Run the script (use the script's actual path under this skill's directory):++```bash+sh skills/ego-browser/scripts/install.sh+```++When run with no arguments, the script goes straight to onboarding. If ego lite is already installed, the script skips the download and proceeds directly to onboarding.++The user then completes onboarding in the ego lite app:++- Choose to import data from Chrome or another browser as needed.+- Onboarding registers the `ego-browser` command on the PATH (usually under `~/.local/bin`).++Onboarding is a step the user completes in the GUI. After the script launches onboarding, wait for the user to confirm they've finished before continuing.++## After installing: confirm `ego-browser` is available++Once the user has finished onboarding, confirm the command is ready:++```bash+command -v ego-browser+```++If it reports that the command isn't found, `~/.local/bin` is most likely not on the current PATH. Fix it temporarily and retry:++```bash+export PATH="$HOME/.local/bin:$PATH"+command -v ego-browser+```++Once the command exists, verify the runtime with a minimal heredoc:++```bash+ego-browser nodejs <<'EOF'+cliLog('ego-browser ready')+EOF+```++Printing `ego-browser ready` means the environment is ready.++## After that, return to the original task++Once the environment is ready, return to the user's original task and continue with the task space flow in `SKILL.md` — start from `useOrCreateTaskSpace(name)` and proceed as usual.++## Troubleshooting++- **Not macOS**: the script supports macOS only (`uname -s` is `Darwin`). On other platforms, have the user download and install from the ego lite website at https://lite.ego.app/.+- **Download failed**: the script retries 3 times automatically; if it still fails, it's usually a network issue — have the user check their network and retry.+- **Gatekeeper still blocks it**: the script already tries to strip quarantine; if the first launch is still blocked, have the user allow ego lite manually under System Settings → Privacy & Security.+- **Command still unavailable after onboarding**: confirm `~/.local/bin` is on the PATH (see above); or have the user reopen ego lite, finish onboarding, and retry.diff --git a/skills/ego-browser/scripts/install.sh b/skills/ego-browser/scripts/install.shnew file mode 100755index 0000000..2c2bae2--- /dev/null+++ b/skills/ego-browser/scripts/install.sh@@ -0,0 +1,240 @@+#!/bin/sh+#v1.4 2026.05.28 16:47++set -eu++# Default package URL and installation paths.+DMG_URL_ARM64="https://cdn.ego.app/setup/macos/arm64/egolite.dmg"+DMG_URL_X64="https://cdn.ego.app/setup/macos/x64/egolite.dmg"+APP_NAME="ego lite"+APP_BUNDLE_NAME="$APP_NAME.app"+APP_PATH="/Applications/$APP_BUNDLE_NAME"+USER_APP_PATH="$HOME/Applications/$APP_BUNDLE_NAME"+EGO_BROWSER_HELPER_NAME="ego-browser"++# Temporary directories created when mounting the DMG; cleaned up on exit.+TEMP_DIR=""+MOUNT_DIR=""+DMG_ATTACHED=""++log() {+ printf '%s\n' "$*" >&2+}++die() {+ log "error: $*"+ exit 1+}++require_command() {+ command -v "$1" >/dev/null 2>&1 || die "missing required command: $1"+}++select_dmg_url() {+ if [ "$(uname -m)" = "arm64" ]; then+ printf '%s\n' "$DMG_URL_ARM64"+ else+ printf '%s\n' "$DMG_URL_X64"+ fi+}++run_with_sudo_if_needed() {+ # Try without elevated privileges first; fall back to sudo to avoid unnecessary prompts.+ if "$@"; then+ return 0+ fi++ if [ "$(id -u)" -eq 0 ]; then+ return 1+ fi++ require_command sudo+ sudo "$@"+}++cleanup() {+ # Detach the DMG and remove the temp directory on success, failure, or Ctrl+C.+ if [ "$DMG_ATTACHED" = "1" ]; then+ if ! hdiutil detach "$MOUNT_DIR" -quiet >/dev/null 2>&1; then+ log "warning: failed to detach $MOUNT_DIR"+ fi+ DMG_ATTACHED=""+ fi++ if [ -n "$TEMP_DIR" ] && [ -d "$TEMP_DIR" ]; then+ rm -rf "$TEMP_DIR" >/dev/null 2>&1 ||+ log "warning: failed to remove temporary directory: $TEMP_DIR"+ fi+}++strip_quarantine_attributes() {+ app_path="$1"+ run_with_sudo_if_needed xattr -dr com.apple.quarantine "$app_path" \+ >/dev/null 2>&1 || true+}++trap cleanup EXIT HUP INT TERM++find_ego_browser_in_app() {+ app_path="$1"++ [ -d "$app_path/Contents" ] || return 1++ # A Chromium app bundle may contain multiple versions; prefer the one under Current.+ for candidate in "$app_path"/Contents/Frameworks/*.framework/Versions/Current/Helpers/"$EGO_BROWSER_HELPER_NAME"; do+ if [ -x "$candidate" ]; then+ printf '%s\n' "$candidate"+ return 0+ fi+ done++ # ego-browser may live in various locations inside the bundle; search under Contents.+ browser_path=$(+ find "$app_path/Contents" -type f -name "$EGO_BROWSER_HELPER_NAME" 2>/dev/null |+ while IFS= read -r candidate; do+ if [ -x "$candidate" ]; then+ printf '%s\n' "$candidate"+ break+ fi+ done+ )++ if [ -n "$browser_path" ]; then+ printf '%s\n' "$browser_path"+ return 0+ fi++ return 1+}++is_ego_lite_app() {+ app_path="$1"++ # The directory exists and contains a working ego-browser — ego lite is considered installed.+ [ -d "$app_path" ] || return 1+ find_ego_browser_in_app "$app_path" >/dev/null+}++find_ego_lite_app() {+ for app_path in "$APP_PATH" "$USER_APP_PATH"; do+ if is_ego_lite_app "$app_path"; then+ printf '%s\n' "$app_path"+ return 0+ fi+ done++ for apps_dir in "$(dirname "$APP_PATH")" "$(dirname "$USER_APP_PATH")"; do+ [ -d "$apps_dir" ] || continue++ app_path=$(+ find "$apps_dir" -maxdepth 1 -type d -iname "$APP_BUNDLE_NAME" 2>/dev/null |+ while IFS= read -r candidate; do+ if is_ego_lite_app "$candidate"; then+ printf '%s\n' "$candidate"+ break+ fi+ done+ )+ if [ -n "$app_path" ]; then+ printf '%s\n' "$app_path"+ return 0+ fi+ done++ return 1+}++install_ego_lite() {+ require_command curl+ require_command hdiutil++ # Download and mount the DMG in an isolated temp directory to avoid polluting the CWD.+ temp_base_dir=${TMPDIR:-/tmp}+ temp_base_dir=${temp_base_dir%/}+ TEMP_DIR=$(mktemp -d "$temp_base_dir/ego-lite-install.XXXXXX")+ MOUNT_DIR="$TEMP_DIR/mount"+ dmg_path="$TEMP_DIR/egolite.dmg"+ dmg_url=$(select_dmg_url)+ mkdir -p "$MOUNT_DIR"++ log "$APP_NAME is not installed. Downloading $dmg_url ..."+ curl -fL --retry 3 --output "$dmg_path" "$dmg_url" ||+ die "failed to download $APP_NAME from $dmg_url"++ log "Mounting installer ..."+ hdiutil attach "$dmg_path" -nobrowse -readonly -mountpoint "$MOUNT_DIR" \+ >/dev/null+ DMG_ATTACHED="1"++ # Handle DMGs that contain the app bundle directly.+ app_in_dmg=$(+ find "$MOUNT_DIR" -maxdepth 2 \+ -type d -iname "$APP_BUNDLE_NAME" |+ head -n 1+ )++ if [ -n "$app_in_dmg" ]; then+ staged_app="$TEMP_DIR/$APP_BUNDLE_NAME"++ log "Installing $APP_NAME to $APP_PATH ..."+ ditto "$app_in_dmg" "$staged_app" ||+ die "failed to stage $APP_NAME from installer"+ find_ego_browser_in_app "$staged_app" >/dev/null ||+ die "installed $APP_NAME does not contain $EGO_BROWSER_HELPER_NAME"++ # Strip quarantine attributes to prevent Gatekeeper from blocking the first launch.+ log "Removing quarantine attributes from $APP_NAME ..."+ xattr -dr com.apple.quarantine "$staged_app" \+ >/dev/null 2>&1 || true++ if [ -d "$APP_PATH" ]; then+ run_with_sudo_if_needed rm -rf "$APP_PATH" ||+ die "failed to replace existing $APP_PATH"+ fi+ run_with_sudo_if_needed mv "$staged_app" "$APP_PATH" ||+ die "failed to move $APP_NAME to $APP_PATH"+ return 0+ fi++ # Fall back to pkg installer if the DMG contains a .pkg instead of an app bundle.+ pkg_in_dmg=$(+ find "$MOUNT_DIR" -maxdepth 2 -type f -name "*.pkg" |+ head -n 1+ )++ if [ -n "$pkg_in_dmg" ]; then+ log "Installing $APP_NAME package ..."+ run_with_sudo_if_needed installer -pkg "$pkg_in_dmg" -target / ||+ die "failed to install $APP_NAME package"+ return 0+ fi++ die "cannot find $APP_NAME app or pkg in mounted DMG"+}++main() {+ [ "$(uname -s)" = "Darwin" ] || die "this script only supports macOS"++ # Install first if not present; otherwise use the ego-browser bundled inside the app.+ installed_app_path=$(find_ego_lite_app || true)+ if [ -z "$installed_app_path" ]; then+ install_ego_lite+ installed_app_path=$(find_ego_lite_app || true)+ [ -n "$installed_app_path" ] ||+ die "$APP_NAME install completed, but app was not found"+ fi++ strip_quarantine_attributes "$installed_app_path"+ browser_path=$(find_ego_browser_in_app "$installed_app_path") ||+ die "$EGO_BROWSER_HELPER_NAME was not found"+ cleanup++ log "Running $EGO_BROWSER_HELPER_NAME: $browser_path"+ if [ "$#" -eq 0 ]; then+ exec "$browser_path" onboarding+ fi+ exec "$browser_path" "$@"+}++main "$@"+export PATH="$HOME/.local/bin:$PATH"