---
name: docyrus-chrome-devtools-cli
description: Use Docyrus CLI chrome commands for visible browser automation through Chrome DevTools. Use when you need to launch Chrome with remote debugging, navigate pages, inspect DOM state, evaluate JavaScript, capture screenshots, pick elements interactively, inspect cookies, extract readable page content, or scrape Hacker News.
---

# Docyrus Chrome DevTools CLI

Chrome DevTools Protocol workflows exposed through the local `docyrus` CLI.

## Commands

Start Chrome with remote debugging on `:9222`:

```bash
docyrus chrome start
docyrus chrome start --profile
```

- `--profile` copies the user's default Chrome profile so cookies and existing logins are available.

Navigate tabs:

```bash
docyrus chrome nav https://example.com
docyrus chrome nav https://example.com --new
docyrus chrome nav https://example.com --reload
```

Run JavaScript in the active tab:

```bash
docyrus chrome eval 'document.title'
docyrus chrome eval 'document.querySelectorAll("a").length'
```

Capture a screenshot of the active tab:

```bash
docyrus chrome screenshot
```

Interactively pick DOM elements in the visible browser:

```bash
docyrus chrome pick "Click the submit button"
```

Inspect cookies for the active tab:

```bash
docyrus chrome cookies
```

Extract readable content as markdown:

```bash
docyrus chrome content https://example.com
```

Scrape Hacker News:

```bash
docyrus chrome hn-scraper
docyrus chrome hn-scraper --limit 10
```

## When To Use

- Visible browser automation is required.
- A page needs JavaScript execution before content is available.
- You need to inspect DOM state without guessing selectors.
- You want the user to click elements directly through an interactive picker.
- You need quick page extraction or screenshot capture from a real browser session.

## Working Style

- Start Chrome first with `docyrus chrome start` if the debugger is not already available.
- Prefer `docyrus chrome eval` for DOM inspection and structured page state.
- Use `docyrus chrome pick` when element targeting is ambiguous or user choice matters.
- Use `docyrus chrome content` for readable markdown extraction from article-like pages.
