### Install Divebell CLI and run setup Source: https://github.com/2heal1/divebell/blob/main/README.md Install the Divebell CLI globally and run the setup command to check the environment and repair browser startup when needed. The setup browser probe runs in a temporary session and cleans up after itself. ```bash npm install --global @divebell/cli divebell setup ``` -------------------------------- ### Add internal evidence with Runtime SDK commands in the same session Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md When a page already provides Runtime SDK information, the same session can add internal evidence using these commands. Runtime SDK is optional; do not add it merely to start debugging a regular page. ```sh divebell snapshot --session orders-debug divebell actions --session orders-debug divebell wait-for --session orders-debug business:orders ready --timeout 5000 ``` -------------------------------- ### Install dependencies and build Modern.js Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Run from the local Modern.js repository root to install dependencies and build the framework before starting the demo. ```bash pnpm install pnpm build ``` -------------------------------- ### Clone repository and install dependencies Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md Clone the Divebell repository, change into its directory, install root and package dependencies with pnpm using a frozen lockfile, and build the project. The filtered install matches CI and avoids optional demos that may depend on another local framework checkout. ```bash git clone https://github.com/2heal1/divebell.git cd divebell pnpm --filter . --filter "./packages/*" install --frozen-lockfile pnpm build ``` -------------------------------- ### Run example scripts Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Commands to run the example shell and Node.js scripts with a local URL. ```sh bash scripts/check-home.sh http://localhost:3000 node scripts/check-home.mjs http://localhost:3000 ``` -------------------------------- ### Visualize Module Federation resource timing Source: https://github.com/2heal1/divebell/blob/main/README.md Install the Module Federation Extension, open the public playground with MF diagnostics enabled, and render observed module loading in the terminal. The output is a timeline view; observed timings vary between navigations. ```bash divebell extensions add @divebell/extension-mf divebell open https://module-federation.io/playground/index.html --mf divebell mf module-perf --report --view timeline ``` -------------------------------- ### Divebell CLI examples for opening and managing tabs Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-connections.md Shows common Divebell CLI commands for opening URLs, creating tabs, switching tabs, and listing runtimes. The first open starts a daemon and browser session; subsequent commands reuse the daemon. ```bash # First open in a directory — starts daemon + browser session divebell open http://localhost:3000 # Open another URL in the same directory — reuses daemon, navigates to new URL divebell open http://localhost:4000 # Open a new tab in the current session — daemon unchanged divebell tab new http://localhost:5000 # Switch tabs within the session divebell tab list divebell tab # Check which Runtimes are connected (per tab/page) divebell runtimes ``` -------------------------------- ### Install Divebell CLI and code-usage extension Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Install the Divebell CLI globally and add the code-usage extension. Do not add the CLI to the application; only the matching build integration belongs in the project. ```bash npm install --global @divebell/cli divebell extensions add @divebell/extension-code-usage ``` -------------------------------- ### Run the Quick Start app locally with pnpm filter Source: https://github.com/2heal1/divebell/blob/main/demos/quickstart/README.md Starts the development server for the @divebell/demo-quickstart package from the repository root. After running, open http://localhost:19084/ in a browser. ```bash pnpm --filter @divebell/demo-quickstart dev ``` -------------------------------- ### Print local path of the bundled Divebell Skill Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md Run `divebell skill` to print the local path of the main Divebell Skill for an agent that does not already have it installed. This is distinct from Skills supplied by installed Extensions. ```sh divebell skill ``` -------------------------------- ### Start the SSR demo Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr/README.md Start the Modern.js SSR demo in a second terminal. ```bash pnpm --filter @divebell/demo-modern-ssr dev ``` -------------------------------- ### Create and install a Runtime Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-sdk-api.md Creates a Runtime and installs it on the window. Reuse an existing framework or host Runtime when available; do not create competing instances in multiple entry points. ```ts import { createDivebell, installDivebellOnWindow, } from "@divebell/core"; const runtime = installDivebellOnWindow(createDivebell()); ``` -------------------------------- ### Start coverage in a fresh blank page Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Starts precise code coverage in a fresh blank page target before navigating to the page. This is the first step of the representative page journey recording workflow. ```bash divebell tab new about:blank divebell coverage start divebell goto https://example.com/ ``` -------------------------------- ### Run code-usage analysis with divebell code-usage analyze Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md Maps browser execution back to chunks, source files, and packages. Requires build metadata from `@divebell/modern-plugin` or `@divebell/rspack-plugin`. ```sh divebell extensions add @divebell/extension-code-usage divebell code-usage analyze \ --chunk-map /path/to/deployed-build/divebell-chunks.json \ --coverage /tmp/first-screen.coverage.json \ --output /tmp/code-usage-report.json ``` -------------------------------- ### Install a CLI Extension with divebell extensions add Source: https://github.com/2heal1/divebell/blob/main/README.md Installs an optional CLI extension package, such as @divebell/extension-memory, into Divebell. After installation, the extension's commands appear in divebell --help and run with the same CLI, browser sessions, and login state as built-in commands. ```bash divebell extensions add @divebell/extension-memory ``` -------------------------------- ### Install and list Divebell extensions Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md Adds optional team and focused workflow extensions to the divebell executable. Use `extensions update ` or `extensions remove ` to manage installed packages. ```sh divebell extensions add @divebell/extension-code-usage divebell extensions add @divebell/extension-imitate divebell extensions add @divebell/extension-memory divebell extensions list ``` -------------------------------- ### Agent prompt to install extension and record workflow Source: https://github.com/2heal1/divebell/blob/main/docs/record-browser-workflows.md Ask the Agent to install @divebell/extension-imitate and run divebell record --skill to record a browser workflow. The returned Skill guides the recording session. ```text Run divebell extensions add @divebell/extension-imitate to install the Extension, then run divebell record --skill and follow the returned Skill to record my browser workflow. I will demonstrate how to . ``` -------------------------------- ### Example script filenames in scripts directory Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Example script files that can be placed in the project's scripts/ directory. ```text scripts/check-home.sh scripts/check-home.mjs scripts/release-latest.mjs ``` -------------------------------- ### Install local .tgz and verify extension with divebell commands Source: https://github.com/2heal1/divebell/blob/main/docs/cli-extensions.md Install the local .tgz for final verification before publishing. Run these commands to add the extension, list extensions, and check help output for the main CLI and the extension's command. ```sh divebell extensions add ./scope-my-extension-1.0.0.tgz divebell extensions list divebell --help divebell foo --help ``` -------------------------------- ### Serve the code usage report locally Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Starts a local streaming viewer for large reports on the specified port. The command prints the HTML path, its data-file path, and the optional -code directory; keep all together when moving or sharing a report. ```bash divebell code-usage serve /tmp/code-usage-report.json --port 4173 ``` -------------------------------- ### Install Divebell CLI globally and show help Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Install the Divebell CLI globally with npm and verify the installation by displaying its help. Requires Node.js 20 or later. ```sh npm install --global @divebell/cli divebell --help ``` -------------------------------- ### Check divebell record CLI help Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/skills/record-divebell-workflow/SKILL.md Run before recording to confirm the `divebell record` command is available. If `divebell` is unavailable, complete the global installation first; if the top-level help does not include `record`, install the recording Extension. Continue only after help can be read, and do not use a project-local CLI. ```bash divebell record --help ``` -------------------------------- ### Install Divebell CLI and Memory Extension Source: https://github.com/2heal1/divebell/blob/main/docs/memory-analysis.md Install the Divebell CLI globally and add the memory analysis Extension. Do not add the CLI to the application. ```bash npm install --global @divebell/cli divebell extensions add @divebell/extension-memory ``` -------------------------------- ### Start streaming report server with report:serve Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Starts the local server that streams the page experience report. Open http://127.0.0.1:4173/ to view the summary and progressively added details. Press Ctrl+C to stop. ```bash pnpm --filter @divebell/demo-modern-basic report:serve ``` -------------------------------- ### Install and print Agent skill path Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/README.md Adds the extension and prints the path to the Agent skill shipped inside the package without starting a recording. ```bash divebell extensions add @divebell/extension-imitate divebell record --skill ``` -------------------------------- ### Install @divebell/core package Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-sdk-api.md Install the page-side package with pnpm before creating a Runtime. ```sh pnpm add @divebell/core ``` -------------------------------- ### Check divebell memory command availability Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/memory/skills/analyze-memory-growth/SKILL.md Run `divebell memory --help` to confirm the memory command is available. If `divebell` is unavailable, ask the user to install `@divebell/cli` globally and run `divebell setup`. If the `memory` command is missing, ask the user to run `divebell extensions add @divebell/extension-memory`. Do not install the CLI or Extension in the application project. ```bash divebell memory --help ``` -------------------------------- ### Run memory analysis with divebell memory check Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md Runs memory analysis without a framework or build plugin. The scenario describes only the real page journey; the Extension owns browser lifecycle, warmup, metrics, allocation sampling, snapshots, report generation, and cleanup. ```sh divebell extensions add @divebell/extension-memory divebell memory check \ --url http://localhost:19081/ \ --scenario ./scripts/memory-scenario.mjs \ --warmup 3 \ --iterations 12 ``` -------------------------------- ### Build and serve production demo Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Run these commands to build and serve the production demo for @divebell/demo-modern-basic. The first command verifies the chunk map, the second serves the build. ```bash pnpm --filter @divebell/demo-modern-basic verify:chunk-map pnpm --filter @divebell/demo-modern-basic serve ``` -------------------------------- ### Install Divebell CLI globally Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/skills/record-divebell-workflow/references/divebell-cli.md Installs the global Divebell CLI and runs setup and help. Required if the `divebell` command is unavailable. Does not add a dependency to the application project. ```bash npm install --global @divebell/cli divebell setup divebell --help ``` -------------------------------- ### Run Divebell setup Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Prepare the browser runtime for Divebell commands. Safe to repeat and returns success without changing an already-ready environment. Uses existing Chrome if available, otherwise downloads Chrome for Testing; on Linux it also installs required system libraries. Interactive approval is required when connecting to an existing desktop Chrome. ```sh divebell setup ``` -------------------------------- ### divebell raw install Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-extension/references/browser-raw.md Installs browser binaries. Use --help for detailed options. ```APIDOC ## [CLI] divebell raw install ### Description Installs browser binaries. ### Usage `divebell raw install --help` ``` -------------------------------- ### Record Allocations with Sampling Source: https://github.com/2heal1/divebell/blob/main/docs/memory-analysis.md Starts sampling allocations, performs the page journey with Divebell commands, then stops and saves the profile. The result includes the top allocation functions and saves the complete profile. ```bash divebell memory sampling start --sampling-interval 32768 # Perform the page journey with Divebell commands. divebell memory sampling stop /tmp/page.heapprofile --top 20 ``` -------------------------------- ### Show divebell open help Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/proxy-and-request-rules.md Inspect the installed command's help output to confirm current option names and constraints before constructing an invocation. Treat the help as the source of truth. ```bash divebell open --help ``` -------------------------------- ### Enable Corepack and prepare pnpm version Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md Run these commands to enable Corepack and activate the required pnpm version (10.18.1) for repository development. Corepack must be available on your system. ```bash corepack enable corepack prepare pnpm@10.18.1 --activate ``` -------------------------------- ### List Installed Extensions and CLI Help Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/extensions.md After installation, inspect installed Extensions and current commands. Installed Extension commands appear in the CLI help. ```bash divebell extensions list ``` ```bash divebell --help ``` -------------------------------- ### Real development debugging flow with Divebell open and browser commands Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md Use these commands for a real development debugging flow. An ordinary open uses a read-only copy of the current OS user's most recently used Chrome Profile; pass an explicit prepared Profile or agent-browser state when the account must be stable or different. The commented alternatives show selecting a stable context via `--profile` or `--state`. After the coding agent changes source code, reuse the same login state and session to rerun the real user journey. Browser commands work without application integration. ```sh divebell open http://localhost:19080/orders --session orders-debug # Or select a stable context: divebell open http://localhost:19080/orders --profile "Test Account" --session orders-debug # Or: divebell open http://localhost:19080/orders --state /path/to/test-account.json --session orders-debug divebell stack divebell console --level error divebell network --url /api/orders divebell page-snapshot ``` -------------------------------- ### Spoken instruction example for GitHub Issues Source: https://github.com/2heal1/divebell/blob/main/docs/record-browser-workflows.md Example of a spoken instruction to provide intent context during recording. It specifies the data to collect and the expected output format. ```text Collect bug issues closed in the last week and open bug issues from the last two weeks. Return JSON with the number, title, state, updated time, and URL. ``` -------------------------------- ### Install extension and print skill path Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/README.md Installs the Divebell Extension and prints the path to the Agent skill shipped inside the package without starting an analysis. The target build must produce a divebell-chunks.json file via @divebell/modern-plugin/chunk-map or @divebell/rspack-plugin. ```bash divebell extensions add @divebell/extension-code-usage divebell code-usage --skill ``` -------------------------------- ### Start the Divebell Bridge Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Start the Bridge in the first terminal before launching the Modern.js demo. ```bash divebell start ``` -------------------------------- ### Check divebell code-usage CLI availability Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/skills/analyze-code-usage/references/analyze.md Run this command to confirm the global divebell CLI supports the code-usage subcommand. If it is unavailable, ask the user to install the global CLI and Code Usage Extension; do not install them in the application project. ```bash divebell code-usage --help ``` -------------------------------- ### Useful Development Commands (pnpm build, test, lint, check) Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md Run these commands from the repository root to build, test, lint, and run the complete pre-submission check. Use `pnpm --filter @divebell/cli build` or `pnpm --filter @divebell/cli test` to target a single package. ```bash # Build every package pnpm build # Build one package pnpm --filter @divebell/cli build # Test one package pnpm --filter @divebell/cli test # Test every package pnpm test # Lint package and repository scripts pnpm lint # Run the complete pre-submission check pnpm check ``` -------------------------------- ### Close, amend start, and reopen with divebell stop, amend start, and open Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/skills/record-divebell-workflow/SKILL.md Closes the current page, prepares the supplement, and reopens the same start URL with the same authentication mode. This is step 2 of the supplement workflow. ```bash divebell stop divebell record amend start --input --after divebell open [--profile | --state ] --ui ``` -------------------------------- ### Install dependencies and build the CLI Source: https://github.com/2heal1/divebell/blob/main/demos/cli-extension/README.md Run from the repository root to install dependencies and build the @divebell/cli package before loading the demo extension. ```sh pnpm install pnpm --filter @divebell/cli build ``` -------------------------------- ### Rebuild CLI and run a command Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md After changing the CLI, Runtime SDK, or Bridge, rebuild the CLI and its referenced packages before trying the command again. The second command runs the CLI with a specific command and options. ```bash pnpm --filter @divebell/cli build ./divebell [options] ``` -------------------------------- ### divebell CLI help commands Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-runtime/references/integration.md Use the installed CLI help as the source of truth for verifying Runtime integration. Run each command to see available options and subcommands. ```bash divebell --help ``` ```bash divebell runtimes --help ``` ```bash divebell targets --help ``` ```bash divebell snapshot --help ``` ```bash divebell actions --help ``` ```bash divebell run-action --help ``` ```bash divebell wait-for --help ``` -------------------------------- ### Open page and query targets, snapshot, wait-for Source: https://github.com/2heal1/divebell/blob/main/packages/modern-plugin/README.md CLI commands to open the page so it can connect every registered runtime, then query it. Includes divebell open, targets, snapshot, and wait-for commands. ```sh divebell open http://localhost:19081/ divebell targets --url http://localhost:19081/ divebell snapshot --url http://localhost:19081/ divebell wait-for modern:route ready --url http://localhost:19081/ --where pathname=/orders ``` -------------------------------- ### Regenerate and Verify CLI Reference (pnpm docs:cli) Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md After changing a command name, option, or help text, run `pnpm docs:cli` to update the generated CLI reference pages and `pnpm docs:cli:check -- --no-build` to verify them. Do not edit `docs/cli-reference.md` by hand. ```bash pnpm docs:cli pnpm docs:cli:check -- --no-build ``` -------------------------------- ### Confirm setup and prefix with divebell record confirm Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/skills/record-divebell-workflow/SKILL.md Confirms the recording setup and the correct prefix up to a given step. Use when the user says an action is missing after a particular step. ```bash divebell record confirm --input --through ``` -------------------------------- ### Open the demo URL Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr/README.md Open the demo URL in a browser. ```txt http://localhost:19082/ ``` -------------------------------- ### browser.memory.sampling.start Source: https://github.com/2heal1/divebell/blob/main/docs/extension-api.md Starts allocation sampling. ```APIDOC ## browser.memory.sampling.start ### Description Starts allocation sampling. ### Method browser.memory.sampling.start ### Endpoint browser.memory.sampling.start ### Parameters No parameters documented. ### Response Returns the result of starting allocation sampling. ### Response Example ```json { "capture": {} } ``` ``` -------------------------------- ### Run the current CLI locally Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md Run the CLI from the repository root using the local build. The `./divebell` command points directly to `packages/cli/dist/bin.js` in this checkout and does not use a globally installed or published `divebell` command. ```bash ./divebell --help ``` -------------------------------- ### Record first-screen coverage with divebell CLI Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/skills/analyze-code-usage/references/analyze.md Use a fresh browser target to avoid Chromium reusing compiled scripts across reloads. Keep the same authenticated profile, create a blank tab, start coverage, navigate to the target page, then capture with `code-usage capture` using a chunk map and output file. Verify the fresh target's recorder/spec and the actual URL before measuring. ```bash divebell tab new about:blank # Verify that the fresh target has the intended recorder/spec when used. divebell coverage start divebell goto # Verify the actual URL/spec and reach the fixed ready boundary before capture. divebell code-usage capture \ --chunk-map /divebell-chunks.json \ --output /tmp/first-screen.coverage.json --label first-screen ``` -------------------------------- ### Start recording a manual walkthrough Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/README.md Prepares the recording so browser interaction and optional voice capture are active from page startup. Output defaults to ./recordings. Microphone capture is attempted automatically; if the user does not speak, audio cannot be captured, or permission is denied, recording continues with browser actions only. ```bash divebell record start ``` -------------------------------- ### Start the Modern.js demo Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Start the Modern.js demo in a second terminal using the package filter. ```bash pnpm --filter @divebell/demo-modern-basic dev ``` -------------------------------- ### List installed Extensions Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/extensions.md Lists all installed Divebell Extensions. ```bash divebell extensions list ``` -------------------------------- ### Install dependencies and build from repository root Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr-stream/README.md Run from the Divebell repository root to install dependencies and build the project. ```bash pnpm install pnpm build ``` -------------------------------- ### Install extension and run code-usage analyze CLI Source: https://github.com/2heal1/divebell/blob/main/packages/rspack-plugin/README.md Installs @divebell/extension-code-usage, then analyzes code usage with the exact build metadata path. Record the target page with `divebell coverage` first. If the Chunk Map is stored outside the build output, pass the build directory with `--assets`. ```sh divebell extensions add @divebell/extension-code-usage divebell code-usage analyze \ --chunk-map /path/to/dist/divebell-chunks.json \ --coverage /tmp/first-screen.coverage.json \ --output /tmp/code-usage-report.json ``` -------------------------------- ### Build check Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr/README.md Run the build check for the demo package. ```bash pnpm --filter @divebell/demo-modern-ssr build ``` -------------------------------- ### Build GitHub Pages and verify analysis assets Source: https://github.com/2heal1/divebell/blob/main/demos/quickstart/README.md Builds the GitHub Pages form and then verifies the analysis assets. The DIVEBELL_PAGES_BASE environment variable is set to /divebell/quickstart/ for the verification step. ```bash pnpm --filter @divebell/demo-quickstart build:pages ``` ```bash DIVEBELL_PAGES_BASE=/divebell/quickstart/ \ pnpm --filter @divebell/demo-quickstart verify:build ``` -------------------------------- ### Retry divebell setup with short socket directory Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/skills/analyze-code-usage/references/analyze.md Use this command to retry divebell setup once after a Unix-socket path-length failure. It sets AGENT_BROWSER_SOCKET_DIR to a temporary short directory and reruns setup. A browser-connection error from a sandbox is not proof that the user denied Chrome access; inspect diagnostics and use the host's normal permission flow. ```bash export AGENT_BROWSER_SOCKET_DIR="$(mktemp -d /tmp/code-usage-browser.XXXXXX)" divebell setup ``` -------------------------------- ### browser.network.har.start Source: https://github.com/2heal1/divebell/blob/main/docs/extension-api.md Starts HAR capture. ```APIDOC ## browser.network.har.start ### Description Starts HAR capture. ### Method browser.network.har.start ### Endpoint options.divebell.browser.network.har.start ### Parameters - **options** (DivebellBrowserHarStartOptions) - Optional - HAR start options. ### Response Confirmation of the start. ``` -------------------------------- ### Install and open Rstack Extension with stack detection commands Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/rstack/README.md Install the Rstack Extension, open the page, and run stack detection and HMR inspection commands. The MF Extension is optional and only adds runtime ownership and shared-provider evidence. ```sh divebell extensions add @divebell/extension-rstack divebell open http://localhost:3000 divebell stack --refresh divebell rstack status divebell rstack hmr inspect ``` -------------------------------- ### Discover Divebell CLI commands Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/SKILL.md Use these commands to list available Divebell commands and view help for a specific command. Treat installed help as the source of truth; do not guess commands or options. ```bash divebell --help ``` ```bash divebell --help ``` -------------------------------- ### browser.coverage.start Source: https://github.com/2heal1/divebell/blob/main/docs/extension-api.md Starts JavaScript coverage capture. ```APIDOC ## browser.coverage.start ### Description Starts JavaScript coverage capture. ### Method browser.coverage.start ### Endpoint browser.coverage.start ### Parameters No parameters documented. ### Response No response documented. ``` -------------------------------- ### Capture first-screen coverage phase Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Saves the first coverage phase after verifying the actual page and reaching the recorded ready boundary. Uses the production Chunk Map and a label matching the experience label. ```bash divebell code-usage capture --chunk-map /path/to/production-dist/divebell-chunks.json \ --output /tmp/first-screen.coverage.json \ --label first-screen ``` -------------------------------- ### installDivebellOnWindow Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-runtime/references/api.md Installs a Divebell runtime on the window object and returns the DivebellCore instance. ```APIDOC ## installDivebellOnWindow ### Description Installs a Divebell runtime on the window object and returns the DivebellCore instance. ### Signature ```ts function installDivebellOnWindow( runtime?: DivebellCore, host?: DivebellWindowHost, options?: DivebellInstanceOptions, ): DivebellCore; ``` ### Parameters - **runtime** (DivebellCore) - Optional - The runtime to install. - **host** (DivebellWindowHost) - Optional - The window host. - **options** (DivebellInstanceOptions) - Optional - Instance options. ### Returns - **DivebellCore** - The installed runtime. ``` -------------------------------- ### Run modern.route.list action Source: https://github.com/2heal1/divebell/blob/main/packages/modern-plugin/README.md Invoke the safe action modern.route.list, which returns the known route manifest stored on the modern:route target. ```sh divebell run-action modern.route.list ``` -------------------------------- ### Example runtimes JSON response Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-connections.md Shortened example output from `divebell runtimes` showing a shell and a child application. Each entry includes runtimeId, name, source, and status; the child also has parentRuntimeId. ```json { "runtimes": [ { "runtimeId": "runtime-shell", "name": "shell", "source": "host", "status": "connected" }, { "runtimeId": "runtime-orders", "name": "orders", "source": "micro-frontend", "parentRuntimeId": "runtime-shell", "status": "connected" } ] } ``` -------------------------------- ### Success output JSON object Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Example of a final script output object with status, URL, session, and readiness flag. ```json { "status": "ok", "url": "http://localhost:3000", "session": "check-home", "ready": true } ``` -------------------------------- ### Call raw with get cdp-url Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-extension/references/browser-raw.md Pass agent-browser command tokens without the executable name. This example calls `get cdp-url --json` and returns a Promise. Always check `exitCode` because `raw` returns failures instead of throwing them. ```TypeScript const result = await options.divebell.browser.raw([ "get", "cdp-url", "--json" ]); ``` -------------------------------- ### Run experience check and report server Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md In another terminal, run the complete experience check and report server. The report is available at http://127.0.0.1:4173/. Use the same build output for the page, Chunk Map, JavaScript files, and source maps. ```bash pnpm --filter @divebell/demo-modern-basic verify:experience pnpm --filter @divebell/demo-modern-basic report:serve ``` -------------------------------- ### Load local extension entry with DIVEBELL_EXTENSIONS_DIR Source: https://github.com/2heal1/divebell/blob/main/docs/cli-extensions.md Build the extension, then point DIVEBELL_EXTENSIONS_DIR at the generated .mjs entry to test an unfinished Extension without installing it. Run divebell --help, divebell foo --help, and divebell foo inspect --name demo to confirm the Command appears in top-level help and command-specific help shows detailed usage. Implementations are dynamically imported, so rerun the command after a change; no persistent development process is required. ```sh cd my-extension pnpm build DIVEBELL_EXTENSIONS_DIR="$PWD/dist/extension.mjs" \ divebell --help DIVEBELL_EXTENSIONS_DIR="$PWD/dist/extension.mjs" \ divebell foo --help DIVEBELL_EXTENSIONS_DIR="$PWD/dist/extension.mjs" \ divebell foo inspect --name demo ``` -------------------------------- ### Open a page without Runtime connections: divebell open --no-bridge --ui Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-connections.md Opens a page without starting the Bridge or installing the connection manager. Use this when Runtime connections are not needed; running divebell start first is normally unnecessary. ```bash divebell open http://localhost:3000 --no-bridge --ui ``` -------------------------------- ### Inspect detected command help with divebell --help Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/extensions.md Use the installed help output to learn the command's description, arguments, and subcommands before invoking it. ```bash divebell --help ``` -------------------------------- ### Open and Capture Experience with Ready Signal Options Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/skills/analyze-code-usage/references/analyze.md Use this bash workflow to open a measurement-enabled page and save one experience file per phase. Add optional flags for a supplied or verified discovered ready signal: --code-usage-ready-measure, --code-usage-ready-mark, or --code-usage-ready-selector. Without an explicit signal, the tool-default page-stable@3 signal is used. ```bash divebell open --code-usage-experience # Add one for a supplied or verified discovered signal: # --code-usage-ready-measure # --code-usage-ready-mark # --code-usage-ready-selector divebell code-usage experience \ --output /tmp/first-screen.experience.json \ --label first-screen ``` -------------------------------- ### Open page with code-usage experience measurement Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Opens a page with the code-usage experience recorder to measure page readiness and loading memory before coverage. The ready option is appended to this command when a business-ready signal is available. ```bash divebell open https://example.com/ --code-usage-experience ``` -------------------------------- ### Run verification Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr/README.md Run the verification script in a third terminal. ```bash pnpm --filter @divebell/demo-modern-ssr verify ``` -------------------------------- ### Build the workspace Source: https://github.com/2heal1/divebell/blob/main/demos/bridge-readonly/README.md Build the entire workspace from the repository root before starting the demo. ```bash pnpm build ``` -------------------------------- ### Install @module-federation/observability-plugin Source: https://github.com/2heal1/divebell/blob/main/docs/module-federation-observability.md Adds the observability plugin package to the Module Federation consumer application for continuous MF reporting. ```bash pnpm add @module-federation/observability-plugin ``` -------------------------------- ### Open the page with the CLI Source: https://github.com/2heal1/divebell/blob/main/demos/bridge-readonly/README.md Opens the page using the Divebell CLI, which automatically starts the Bridge and installs the connection manager before the page loads. ```bash divebell open http://localhost:19080/ --ui ``` -------------------------------- ### installDivebellOnWindow function signature Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-runtime/references/api.md Installs a Divebell runtime on the window host. Returns the DivebellCore instance. ```typescript function installDivebellOnWindow( runtime?: DivebellCore, host?: DivebellWindowHost, options?: DivebellInstanceOptions, ): DivebellCore; ``` -------------------------------- ### Open page and detect stack Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/extensions.md Opens a target page and then runs stack detection. The stack command invokes detectStack hooks from installed Extensions only. ```bash divebell open divebell stack ``` -------------------------------- ### DivebellInstanceOptions interface Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-runtime/references/api.md Options for installing a Divebell instance on the window. ```typescript interface DivebellInstanceOptions { runtimeId?: string; name?: string; source?: string; parentRuntimeId?: string; renderId?: string; } ``` -------------------------------- ### Memory Scenario Script (scripts/memory-scenario.mjs) Source: https://github.com/2heal1/divebell/blob/main/docs/memory-analysis.md Defines a page journey to repeat for memory analysis. The setup waits for an orders link, then the run clicks it and returns to the home page, waiting for each navigation. ```javascript export default { async setup({ page }) { await page.waitEval('document.querySelector(\'a[href="/orders"]\') !== null'); }, async run({ page }) { await page.eval('document.querySelector(\'a[href="/orders"]\').click()'); await page.waitEval('window.location.pathname === "/orders"'); await page.eval('document.querySelector(\'a[href="/"]\').click()'); await page.waitEval('window.location.pathname === "/"'); }, }; ``` -------------------------------- ### Example JSON output from check-home script Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Shows the expected output when the page exposes Divebell Runtime data. If the page does not expose it, targetCount is null and browser-level checks still work. ```json { "status": "ok", "url": "http://localhost:3000", "session": "check-home-1760000000000", "ready": true, "targetCount": 4 } ``` -------------------------------- ### Run the Command path that does not require a page Source: https://github.com/2heal1/divebell/blob/main/demos/cli-extension/README.md Invokes the extension-demo hello command with a --name option to exercise argument handling without needing a browser page. ```sh DIVEBELL_EXTENSIONS_DIR="$PWD/demos/cli-extension/index.mjs" \ node packages/cli/dist/bin.js extension-demo hello --name Codex ``` -------------------------------- ### markDivebellReady Source: https://github.com/2heal1/divebell/blob/main/packages/modern-plugin/README.md Marks a previously registered business readiness target as 'ready'. This indicates that the business code has completed its readiness requirements. ```APIDOC ## markDivebellReady ### Description Marks a previously registered business readiness target as 'ready'. This indicates that the business code has completed its readiness requirements. ### Method markDivebellReady ### Parameters - **runtime** (object) - Required - The Divebell runtime obtained from `getDivebellFromWindow()`. - **id** (string) - Required - The business target ID. - **data** (object) - Required - Additional data to associate with the readiness state (e.g., `{ screen: "checkout" }`). ### Example ```ts markDivebellReady(runtime, "checkout", { screen: "checkout" }); ``` ``` -------------------------------- ### Add a changeset with pnpm changeset Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md Run this command to add a changeset for a change that affects a published package. Choose the affected package or packages and describe the user-visible result. Documentation-only changes and repository-local tooling do not need a changeset. ```bash pnpm changeset ``` -------------------------------- ### Save first-screen experience measurement Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Saves the measured page-readiness and loading-memory data to a JSON file with a label matching the coverage label. Run from a fresh recorder-enabled page load for each report phase. ```bash divebell code-usage experience \ --output /tmp/first-screen.experience.json \ --label first-screen ``` -------------------------------- ### Run Complete Memory Check Source: https://github.com/2heal1/divebell/blob/main/docs/memory-analysis.md Opens the target page and runs a full memory check using the scenario. The --warmup and --iterations flags control the measurement, and artifacts are saved to ./.memory-artifacts. ```bash divebell open http://localhost:19081/ divebell memory check \ --scenario ./scripts/memory-scenario.mjs \ --warmup 3 \ --iterations 12 \ --artifact-dir ./.memory-artifacts ``` -------------------------------- ### Review and confirm recording before script generation Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/README.md Reviews the recording and then confirms every setup item and action. The confirm command writes generated-script.mjs only after all items are confirmed. ```bash divebell record review --input ./recordings/example.orrec ``` ```bash divebell record confirm --input ./recordings/example.orrec --all ``` -------------------------------- ### Append ready option to divebell open Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Append exactly one ready option to `divebell open` when a business-ready signal is available. If none is supplied, Divebell uses the `page-stable@3` heuristic with a 30-second maximum wait. ```bash --code-usage-ready-measure --code-usage-ready-mark --code-usage-ready-selector ``` -------------------------------- ### Run CLI from a different working directory Source: https://github.com/2heal1/divebell/blob/main/CONTRIBUTING.md When a test needs a different working directory, invoke the same built entry from that directory using an absolute path to the repository's `divebell` script. The CLI keeps page and browser context by working directory. ```bash /absolute/path/to/divebell/divebell [options] ``` -------------------------------- ### Stop recording and write draft workflow.json Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/README.md Stops the recording with the output path returned by start. Captures final state and writes a draft workflow.json, keeping step 0 authentication setup, ordered actions, confirmation state, revisions, and multiple recorded ways to find each operated element. ```bash divebell record stop --out ./recordings/divebell-.orrec ``` -------------------------------- ### Open a page with Bridge and UI: divebell open --ui Source: https://github.com/2heal1/divebell/blob/main/docs/runtime-connections.md Starts a dedicated local Bridge on an automatically assigned port and installs a connection manager before page code runs. The successful result includes bridgeUrl and bridgePort, and the working directory remembers the page and Bridge for later commands. ```bash divebell open http://localhost:3000 --ui ``` -------------------------------- ### Open the code usage report Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Generates an HTML report from the specified JSON data file and opens it in the browser. Use --no-open to create files only or --output to choose the location. ```bash divebell code-usage report /tmp/code-usage-report.json ``` -------------------------------- ### Open the demo URL Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Open the demo in a browser at the specified localhost port. ```txt http://localhost:19081/ ``` -------------------------------- ### Explore WebMCP from any coding agent Source: https://github.com/2heal1/divebell/blob/main/README.md Launch local Chrome with experimental WebMCP features enabled, then list and call WebMCP tools exposed by the current page. The --ui and --no-default-profile flags are used for the showcase; the same discovery and invocation capabilities are available to Extensions through divebell.browser.webmcp. ```bash divebell open https://margin-local-docs.openai.chatgpt.site/ \ --ui \ --no-default-profile divebell webmcp list --json divebell webmcp call create_document \ --input '{"title":"Divebell WebMCP demo","content":"Created through WebMCP."}' \ --json ``` -------------------------------- ### Run page experience check with verify:experience Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Runs the page experience check after creating a production build with verify:chunk-map and keeping the demo server running. Uses the bundled browser by default to avoid startup slowdown from external browser configuration. ```bash pnpm --filter @divebell/demo-modern-basic verify:experience ``` -------------------------------- ### Supplement a missing action with divebell record confirm, stop, amend, open, replay Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/README.md Workflow to add a missing action to a recording: confirm setup, stop current page, start an amendment after a step, open a page with state, replay the amendment, then stop and confirm the new step. Prefix replay events are excluded from the amendment. Obtain user approval before rerunning with --allow-risky-replay. ```bash divebell record confirm --input ./recordings/example.orrec --through step-2 divebell stop divebell record amend start --input ./recordings/example.orrec --after step-2 divebell open https://example.com/ --state /path/to/test-account.json --ui divebell record amend replay --input ./recordings/example.orrec ``` ```bash divebell record amend stop --input ./recordings/example.orrec divebell record confirm --input ./recordings/example.orrec --step ``` -------------------------------- ### Start the Bridge Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr-stream/README.md Start the Divebell Bridge in the first terminal. ```bash divebell start ``` -------------------------------- ### Review recorded actions with divebell record review Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/imitate/skills/record-divebell-workflow/SKILL.md Run to review the recorded actions. Present setup as step 0 and show every semantic step with its concrete divebell click, fill, select, or press command and element evidence. The review output aligns available transcript segments with nearby recorded operations, but browser interactions remain the source of truth. Do not conclude nothing was recorded merely because the page has no Divebell target; inspect interactions.jsonl first. ```bash divebell record review --input ``` -------------------------------- ### Preferred runtime initialization pattern Source: https://github.com/2heal1/divebell/blob/main/skills/divebell-runtime/references/api.md Use getDivebellFromWindow() first, falling back to installDivebellOnWindow(createDivebell()) to avoid creating duplicate runtimes. ```typescript const runtime = getDivebellFromWindow() ?? installDivebellOnWindow(createDivebell()); ``` -------------------------------- ### Start the streaming SSR demo Source: https://github.com/2heal1/divebell/blob/main/demos/modern-ssr-stream/README.md Start the streaming SSR demo in a second terminal. ```bash pnpm --filter @divebell/demo-modern-ssr-stream dev ``` -------------------------------- ### How the code-usage analysis works Source: https://github.com/2heal1/divebell/blob/main/docs/code-usage-analysis.md Shows the pipeline: the build plugin creates a Chunk Map and source maps, Divebell records executed code, combines both sets of evidence, and creates JSON and an interactive report. All build metadata, JavaScript files, source maps, and the deployed page must come from the same build. ```text Build plugin creates a Chunk Map and source maps ↓ Divebell records code executed by the target page ↓ The analysis combines both sets of evidence ↓ Divebell creates JSON and an interactive report ``` -------------------------------- ### Run a business Action Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Runs the business Action `release-note.list-latest` with a payload of `{"limit":3}` using session `check-home`. Applies only when the page uses Runtime SDK. ```shell divebell run-action release-note.list-latest --session check-home --payload '{"limit":3}' ``` -------------------------------- ### Install Extension from npm Source: https://github.com/2heal1/divebell/blob/main/docs/extensions.md Install a trusted Extension by npm package name using the `divebell extensions add` command. ```sh divebell extensions add @scope/package ``` -------------------------------- ### Start the demo page Source: https://github.com/2heal1/divebell/blob/main/demos/bridge-readonly/README.md Starts the readonly demo page in the first terminal. ```bash pnpm --filter @divebell/demo-bridge-readonly dev ``` -------------------------------- ### Authenticate again when state file fails with login or auth errors Source: https://github.com/2heal1/divebell/blob/main/packages/cli/README.md When a state file redirects to login, returns 401/403, or shows an authentication or permission failure, do not guess related origins or broaden the state. The consumer must authenticate again, either by signing in manually in a headed browser or by explicitly providing login information for the auth vault. The commented lines show saving user-provided credentials with `auth save --password-stdin` and then running `divebell auth login `. ```sh divebell open --state --ui # Let the user complete login and verify the protected target. # Or save user-provided credentials with `auth save --password-stdin`, # then run `divebell auth login `. ``` -------------------------------- ### Combine recordings with build metadata Source: https://github.com/2heal1/divebell/blob/main/packages/extensions/code-usage/README.md Combines coverage and experience recordings with build metadata into a JSON report. Experience files are optional, but when supplied their labels must match every coverage phase. Without them, the report hides readiness and memory instead of showing empty cards. ```bash divebell code-usage analyze \ --chunk-map /path/to/dist/divebell-chunks.json \ --coverage /tmp/first-screen.coverage.json \ --coverage /tmp/orders.coverage.json \ --experience /tmp/first-screen.experience.json \ --experience /tmp/orders.experience.json \ --output /tmp/code-usage-report.json ``` -------------------------------- ### Take a screenshot Source: https://github.com/2heal1/divebell/blob/main/docs/cli-automation-scripts.md Captures a screenshot named `home-ready`. ```shell divebell screenshot home-ready ``` -------------------------------- ### Install @divebell/modern-plugin with pnpm Source: https://github.com/2heal1/divebell/blob/main/docs/modernjs-integration.md Install the planned Modern.js runtime plugin package using pnpm. This is intended for contributors testing against a Modern.js source checkout, not for regular application teams. ```bash pnpm add @divebell/modern-plugin ``` -------------------------------- ### Example stack detection result Source: https://github.com/2heal1/divebell/blob/main/skills/divebell/references/extensions.md Example JSON output from the stack command. data.detections[] contains valid matches, data.failures lists hook failures, and data.cached indicates whether the result was reused. ```json { "data": { "detections": [ { "id": "mf", "name": "MF", "extension": "mf-detector", "command": "mf" } ], "failures": [], "cached": false } } ``` -------------------------------- ### Build Check with pnpm Source: https://github.com/2heal1/divebell/blob/main/demos/modern-basic/README.md Run this command to build the demo package. It is part of the build check. ```bash pnpm --filter @divebell/demo-modern-basic build ```