Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dassi_ai/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@dassi_ai/cli
Standalone CLI for the Dassi Chrome extension — run browser automation from the terminal.
Quickstart
# 1. Install the Dassi extension from the Chrome Web Store and sign in.
# 2. Open the Dassi side panel once — this wakes the extension so the CLI can reach it.
# 3. Run a command (no install needed):
npx @dassi_ai/cli@latest list-tabs # find a TAB ID
npx @dassi_ai/cli@latest run "summarize this page" --tab <id>Prefer a permanent dassi command? npm install -g @dassi_ai/cli (Node ≥ 20.11), then drop the npx @dassi_ai/cli@latest prefix.
Two things that trip people up:
runneeds a target — pass--tab <id>(or--group <id>/--group-title <name>).--profileonly selects which connected Chrome, not the tab.- Multiple Chrome windows/profiles connected? Commands need
--profile <label>; rundassi list-profilesto see the labels (one profile = no flag needed).
Installation
# Zero-install
npx @dassi_ai/cli --help
# Or install globally
npm install -g @dassi_ai/cliOr, for local development from a clone of this repo:
cd cli
npm install
npm link # exposes `dassi` on PATHPrerequisites
- Node.js >= 20.11.1
- Dassi Chrome extension installed and running
- External Bridge enabled in Dassi Options (
options.html?dev)
Usage
# List all open Chrome tabs
dassi list-tabs
# Run an agent prompt on a specific tab
dassi run "summarize the top issues" --tab 456
# Run with a timeout (ms)
dassi run "check inbox" --tab 123 --timeout 60000
# Send a raw JSON command
dassi raw '{"id":"1","action":"list_tabs"}'
# Output as JSON (for scripting)
dassi list-tabs --json
# Use a named session
dassi list-tabs --session work
# List connected profiles (multiple Chrome profiles can connect at once)
dassi list-profiles
# Target a specific profile by label when more than one is connected
dassi list-tabs --profile dev
dassi run "summarize" --tab 456 --profile dev # alias: --label
# Launch a fresh Chrome with a locally-built dev dist (for testing extension changes)
pnpm build # build extension/dist first
dassi launch # loads extension/dist as profile "dev"
dassi launch --label qa --dist some/dist # custom label + dist
# Drive the launched Chrome — run still needs a tab/group target; --profile selects which Chrome:
dassi list-tabs --profile dev # find a tab id in the launched profile
dassi run "summarize this page" --tab <id> --profile dev
dassi launch --stop # close the "dev" Chrome (or --stop-all)
# Pass extra args to Chrome by appending `-- <args>` after all CLI flags
# (forwarded verbatim in both load modes; rejected on non-launch commands):
dassi launch -- --headless=new --remote-debugging-port=9222
# Note: launch reuses the default daemon (port 18790). To launch on an isolated
# port (DASSI_BRIDGE_PORT=18791 dassi launch), no default daemon may be running —
# it errors clearly otherwise, since it can't confirm the running daemon's port.
#
# How the extension is loaded (auto-detected per Chrome binary):
# • Branded Google Chrome (137+) disabled the `--load-extension` flag, so launch
# installs the dist at runtime via the `Extensions.loadUnpacked` CDP command over
# `--remote-debugging-pipe`. Because such an extension lives only as long as the
# debugging pipe, launch spawns a detached `__launch-hold` helper that keeps the
# pipe open; `--stop` kills the helper, which closes the pipe and its Chrome.
# • Chrome for Testing / Chromium still honour `--load-extension` (persistent), so
# launch uses that directly there — no helper. Point at one with `--chrome <path>`.
# • The mode is auto-detected from the binary; override with `--load-mode auto|pipe|flag`
# (e.g. `dassi launch --chrome <cft> --load-mode pipe` to exercise the pipe path on CfT).
# Show version / help
dassi --version
dassi --helpTab groups
# List all tab groups
dassi list-groups
# Run agent against every tab in a group (sequential)
dassi run "summarize each page" --group 7
# Use a group title instead of id (errors if title is ambiguous)
dassi run "extract prices" --group-title "Shopping"
# Tool commands also accept --group / --group-title
dassi screenshot --group-title "Research" -o shot.pngWhen --group/--group-title is used, the CLI expands to member tab ids and runs them sequentially in one daemon session. True parallel execution is not currently supported — the daemon binds a fixed WebSocket port (18790 by default, override with DASSI_BRIDGE_PORT), so multiple daemon processes can't coexist regardless of --session. Sequential dispatch is the only supported pattern.
Claude Code Plugin
This package also ships as a Claude Code plugin under the dassi namespace. After installation (via either npm install -g @dassi_ai/cli or npm link from this directory), Claude Code auto-discovers two skills:
dassi:pick-tabs— a reusable tab/group picker. Lists open tabs and Chrome tab groups, asks the user to pick, returns the selected Chrome tab IDs.dassi:operate— main entry point. Translates natural-language browser asks ("summarize my Research group", "screenshot the active tab", etc.) intodassiCLI invocations.
The plugin manifest lives at .claude-plugin/plugin.json; skill content is under skills/<name>/SKILL.md. No additional configuration is required — installing the CLI is sufficient.
How It Works
The CLI (dassi.mjs) auto-spawns a background daemon (dassi-daemon.mjs) that:
- Hosts a WebSocket server on port 18790 for the Chrome extension to connect to
- Exposes a Unix socket (
~/.dassi/<session>.sock) for CLI commands via NDJSON protocol - Serializes concurrent
runcommands via a FIFO queue - Handles first-run onboarding (extension install detection, login flow)
- Shuts down after 30 minutes of idle
Dependencies
Development
# Run tests
npm testLicense
MIT