# CLI reference

Source: https://getanalog.io/docs/cli-reference/

Commands, options, accepted values, and bounds for the analog command line.

Find a command, choose its options, and try an example. Use `analog view`
for a page captured by your agent's browser or a saved result. Use
`analog browse` when you need Analog to acquire a URL. Run
`analog <command> --help` for detailed behavior and examples.

<!-- BEGIN GENERATED: cli-reference -->
<!-- Generated by tools/cli_mcp_reference/render.py; edit the registered CLI or renderer. -->

<details class="reference-index">
<summary>Find a command</summary>

**View and inspect pages**

- [`analog view`](https://getanalog.io/docs/cli-reference/#analog-view)
- [`analog browse`](https://getanalog.io/docs/cli-reference/#analog-browse)
- [`analog assess`](https://getanalog.io/docs/cli-reference/#analog-assess)
- [`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe)
- [`analog distinct`](https://getanalog.io/docs/cli-reference/#analog-distinct)
- [`analog diff`](https://getanalog.io/docs/cli-reference/#analog-diff)
- [`analog export`](https://getanalog.io/docs/cli-reference/#analog-export)

**Accounts and credentials**

- [`analog signup`](https://getanalog.io/docs/cli-reference/#analog-signup)
- [`analog login`](https://getanalog.io/docs/cli-reference/#analog-login)
- [`analog logout`](https://getanalog.io/docs/cli-reference/#analog-logout)
- [`analog whoami`](https://getanalog.io/docs/cli-reference/#analog-whoami)
- [`analog keys`](https://getanalog.io/docs/cli-reference/#analog-keys)
- [`analog keys list`](https://getanalog.io/docs/cli-reference/#analog-keys-list)
- [`analog keys revoke`](https://getanalog.io/docs/cli-reference/#analog-keys-revoke)

**Installation and diagnostics**

- [`analog status`](https://getanalog.io/docs/cli-reference/#analog-status)
- [`analog doctor`](https://getanalog.io/docs/cli-reference/#analog-doctor)
- [`analog browser`](https://getanalog.io/docs/cli-reference/#analog-browser)
- [`analog browser capture-script`](https://getanalog.io/docs/cli-reference/#analog-browser-capture-script)
- [`analog browser install`](https://getanalog.io/docs/cli-reference/#analog-browser-install)
- [`analog update`](https://getanalog.io/docs/cli-reference/#analog-update)

**Saved results**

- [`analog history`](https://getanalog.io/docs/cli-reference/#analog-history)
- [`analog rm`](https://getanalog.io/docs/cli-reference/#analog-rm)
- [`analog rename`](https://getanalog.io/docs/cli-reference/#analog-rename)
- [`analog rename-fields`](https://getanalog.io/docs/cli-reference/#analog-rename-fields)
- [`analog reorder-fields`](https://getanalog.io/docs/cli-reference/#analog-reorder-fields)

**Help and feedback**

- [`analog feedback`](https://getanalog.io/docs/cli-reference/#analog-feedback)
- [`analog feedback quality`](https://getanalog.io/docs/cli-reference/#analog-feedback-quality)
- [`analog feedback request`](https://getanalog.io/docs/cli-reference/#analog-feedback-request)
- [`analog help`](https://getanalog.io/docs/cli-reference/#analog-help)
- [`analog quickstart`](https://getanalog.io/docs/cli-reference/#analog-quickstart)
- [`analog docs`](https://getanalog.io/docs/cli-reference/#analog-docs)
- [`analog contact`](https://getanalog.io/docs/cli-reference/#analog-contact)

</details>



## <a id="analog-view"></a> [`$ analog view` `<file|handle|name|latest>`](https://getanalog.io/docs/cli-reference/#analog-view) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-view-flags)

View a supplied page or return to a saved result. Bare `view` requests an
overview; `--find` returns matching evidence directly. Repeat `--find` to ask
independent questions about the same capture.

For supplied HTML, pass an explicit file path and the actual browser URL.
Analog sends the HTML and URL for extraction, then saves the result locally.
It does not fetch that URL, render the file, execute scripts, or interact with
the page. `--mode local` converts to Markdown without hosted extraction.
Supplying a file does not establish that it captures every part of the page.

A JSON file from [`analog browser capture-script`](https://getanalog.io/docs/cli-reference/#analog-browser-capture-script)
includes its actual URL and visibility observations. `view` validates those
observations before extraction. Omit `--url`; a conflicting URL is rejected.
Invalid captures fail without fetching, extracting, or saving. Observed
shadow/frame omissions remain qualified when the result is reopened.

Saved-result viewing and searching are local: no refresh or new extraction.
The overview lists record sections and prose in page order. `section[N]`
identifiers keep their record indices for operations such as `analog export`.

**SOURCE** is an explicit file path (`./page.html`, `./page.capture.json`, or an
absolute path), a saved handle, a friendly name, or `latest`. Prefix a bare
filename with `./`; its existence never changes how a saved name resolves.



### Extract and search a browser capture

After [capturing through your browser tool](https://getanalog.io/docs/fetching/#capture-from-your-browsers-current-page):

```bash wrap=true example=illustrative fragment=true
analog view ./about.capture.json --save-as about --find Frankie --find Marcus
```

The file supplies its URL. The result saves once and answers both searches.

### Extract and search captured HTML

After your browser saves the page as `./about.html`:

```bash wrap=true example=illustrative fragment=true
analog view ./about.html --url https://getanalog.io/about/ \
  --save-as about --find Frankie --find Marcus
```

This saves once and answers both searches without an overview. Matches go to
stdout; the saved handle and capture qualifications go to stderr.

### Search the same result locally

```bash wrap=true example=illustrative fragment=true
analog view about --find Frankie
```

Use the returned handle instead of `about` when no friendly name was assigned.

### Request the page overview

```bash wrap=true example=illustrative fragment=true
analog view latest
```

Use a specific handle or name to keep referring to the same capture while
other pages are saved. Add `--complete` to list the overview's hidden fields.

### Save without viewing evidence

```bash wrap=true example=illustrative fragment=true
analog view ./about.html --url https://getanalog.io/about/ \
  --save-as about --save-only
```

The name must be unused. This prints a receipt; it does not overwrite an
existing result. Use a different name when capturing another version.

### Read the saved page as Markdown

```bash wrap=true example=illustrative fragment=true
analog view about --markdown
```

### Search a record field

The [saved quotes page](https://getanalog.io/docs/results/#start-with-the-page-map) has an author
field named `text_2`:

```bash wrap=true example=illustrative fragment=true
analog view quotes-before --find "Einstein|Austen" --field text_2 --regex --json
```



### Search and output

Search defaults to case-insensitive literal substrings across record values,
page text, and page regions. `--regex` interprets each search as a regular
expression. `--field` limits searches to that record field; unknown fields and
invalid regular expressions are errors. Matching records retain their other
fields. Text values and prose excerpts are bounded; JSON retains full values.

`--json` alone returns the full result. With one `--find`, it returns a match
array, with `_source` identifying each match; no matches returns `[]`. With
multiple searches it returns `queries` and `matches`. Each query has its
`pattern` and a list of zero-based `matches` indexes into the shared evidence
array. Empty indexes mean no matches for that query in this capture. Shared
evidence is emitted once; repeated identical source records remain distinct.

Choose either `--markdown` or `--json`. `--find` cannot accompany `--markdown`;
`--complete` applies only to the overview. `--save-only` accepts no view/search
option. Saved results do not accept file-ingestion options such as `--url`.

### Saving and failures

New captures save automatically. `--save-as` assigns a unique name in the
same publication; a known collision is rejected before extraction. A later
save or naming failure may still return current evidence, but exits with a
failure status and reports that the result was not saved. Partial captures
remain qualified when searched. No matches is a successful search, not proof
of absence beyond the captured content.

Viewing or searching an existing saved result is a local operation: success
returns `0`, including when the saved capture is partial. Its limitations
remain visible. Acquiring a new result from a supplied file still reports
extraction or save failures with a failure status.

An unreadable save fails with recovery guidance based on its recorded source.
For a supplied page, reuse the original capture or HTML file if available, or
capture the intended browser state again. Example filenames in the error are
placeholders: the result store retains neither the input file nor its path.
For a browser-backed save, a fresh `browse` does not restore earlier browser
state or capture settings. Unknown acquisition is identified as unknown;
recovery never runs automatically.

The overview keeps coverage notes visible. Add the root `--guidance` before
`view` to request an optional next action; it does not change the evidence.

### <a id="analog-view-flags"></a> Flags

**All options:** `--url`, `--save-as`, `--save-only`, `--find`, `--field`, `--regex`, `--markdown`, `--json`, `--complete`, `--mode`, `--help`.

- `--find` — repeatable.
- `--mode` — one of `auto`, `structured`, `local`.

For selecting and exporting records, see [Working with results](https://getanalog.io/docs/results/).





## <a id="analog-browse"></a> [`$ analog browse` `<url>`](https://getanalog.io/docs/cli-reference/#analog-browse) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-browse-flags)

Use Analog's built-in browser when your environment cannot supply a capture,
or when you choose Analog to acquire the URL. It saves the page's records, prose, and
navigation. The default output is a receipt with the saved handle and
material capture notes. Add `--find TEXT` to search the capture immediately,
or search the saved result later. Request an overview when you need context.

Analog saves the result locally and gives it a handle. Use that handle to
keep working with the same result, or fetch the URL again when you want a
fresh view.

**URL** is the webpage to fetch. Analog renders JavaScript before reading
the page. These examples assume you are [signed in](https://getanalog.io/docs/authenticate/).



### Fetch a page of quotes

```bash wrap=true example=runnable scenario=cli-reference-quotes
analog browse https://quotes.toscrape.com/js/
```

This run saved handle `20260913-zl65e4`. Your run will have its own handle.
The capture covers the first page; the notes qualify its content without
printing the page overview.

```text wrap=true example=output scenario=cli-reference-quotes
Saved 20260913-zl65e4
Captured page 1; a next-page link is available.
A single-subject interpretation was withheld; some page facts could not be verified.
```

### Include the next page

```bash wrap=true example=runnable scenario=cli-reference-quotes-pages
analog browse https://quotes.toscrape.com/js/ --pages 2
```

The receipt reports how many pages were captured and why pagination
stopped. The requested count is a maximum; reaching the normal end
earlier is still success.

### Fetch and find a known value

```bash wrap=true example=runnable scenario=cli-browse-find-about
analog browse https://getanalog.io/about/ --find "Frankie"
```

This fetches the page once, saves it, and searches that capture. Matching
evidence goes to stdout; the saved handle and capture notes go to stderr.
Use the printed handle for later searches without fetching again.



### <a id="analog-browse-flags"></a> Flags

#### `--find`

Search this invocation's capture for a case-insensitive literal substring,
using the same search scope and compact text display as
[`analog view --find`](https://getanalog.io/docs/cli-reference/#analog-view). Another process saving a newer result cannot
change which capture is searched. No overview is required.

With `--json`, return an array of matching objects, including full matching
records and their `_source` information. No matches returns `[]`; text
output describes the searched capture. A successful search is not proof
that the value is absent from uncaptured content.

Cannot be combined with `--markdown` or `--no-save`. For regular expressions
or field-specific searches, use `analog view --find` with the saved handle.

Returned partial results can still be searched; their capture notes and
failure status remain. If saving fails, current matches can still be
returned, but the command reports that the result was not saved and exits
unsuccessfully. A failed acquisition never searches an older result.
An interruption before a result is returned reports any confirmed partial
handle and exits without search output.

#### `--markdown`

Print the page as Markdown on stdout. The result is still saved; its
receipt and material capture notes go to stderr.

#### `--json`

Print the full result as JSON on stdout, or the matching objects when
combined with `--find`. The receipt and capture notes go to stderr.
Choose either `--json` or `--markdown` for a command.

#### `--pages`

Follow the site's next-page links and combine up to this many pages.
Pagination is experimental; see [fetching multiple pages](https://getanalog.io/docs/fetching/#pagination-reference)
for its behavior and limitations.

Accepts integer; 1–50; default `1`.

#### `--mode`

Choose structured records with or without a saved fit assessment,
or local Markdown. See [choose a fetch path](https://getanalog.io/docs/fetching/#choose-a-fetch-path).

Accepts one of `auto`, `structured`, `local`; default `"auto"`.

#### `--no-save`

Return data without saving it locally. Requires `--json` or `--markdown`;
there will be no saved handle to reopen afterward. Cannot be combined
with `--find`.

### Optional guidance

Put the root `--guidance` flag before `browse` to request one available next
action. It does not change the capture, selected data, or failure status:

```bash wrap=true example=runnable scenario=cli-browse-guidance-quotes
analog --guidance browse https://quotes.toscrape.com/js/
```

For complete preview fields, request `analog view <handle> --complete`.
Acquisition itself does not print a preview.

### All options

`--find`, `--markdown`, `--json`, `--headed`, `--no-reveal-all`, `--load-all`, `--expand-all`, `--pages`, `--mode`, `--no-save`, `--allow-private`, `--help`.

For browser controls, see [fetching](https://getanalog.io/docs/fetching/). Run
`analog browse --help` for every option's behavior.

Have a saved result? Continue with [analog view](https://getanalog.io/docs/cli-reference/#analog-view).





## <a id="analog-signup"></a> [`$ analog signup` `[<code>]`](https://getanalog.io/docs/cli-reference/#analog-signup) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-signup-flags)

Create an account and connect this terminal in the same step. Keep the
terminal open while you enter your invite code and verify your email in
the browser. No separate login is needed afterward.

**CODE** optionally pre-fills the invite code in the browser. Omit it to
enter the code there. For the full flow, see
[Authenticate](https://getanalog.io/docs/authenticate/#connect-your-account).

### <a id="analog-signup-flags"></a> Flags

`--help`



### Create your account


```bash example=runnable scenario=onboarding-new-user-auth-default
analog signup
```

Wait for the terminal to confirm that it is connected. The credential is
stored locally and reused by the CLI, Python SDK, and MCP server.





## <a id="analog-login"></a> [`$ analog login`](https://getanalog.io/docs/cli-reference/#analog-login) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-login-flags)

Connect this terminal to an existing account, including one you just
created on the website. By default, the command opens your browser for
email verification and waits for the connection to complete.

With `--no-browser`, use a browser on another machine and return its
one-time handoff to the waiting terminal's hidden prompt. This mode needs
an interactive terminal. See the
[authentication guide](https://getanalog.io/docs/authenticate/#sign-in-without-a-local-browser)
for the complete sequence.

### <a id="analog-login-flags"></a> Flags

`--no-browser`, `--help`.



### Connect on this machine


```bash example=runnable scenario=onboarding-existing-user-auth-default
analog login
```

### Connect an interactive remote terminal


```bash example=runnable scenario=onboarding-existing-user-auth-browserless
analog login --no-browser
```





## <a id="analog-logout"></a> [`$ analog logout`](https://getanalog.io/docs/cli-reference/#analog-logout) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-logout-flags)

Revoke this machine's credential and clear its local store. The CLI, SDK,
and MCP server using that credential lose access. This runs without a
confirmation prompt; saved results remain on disk.

If revocation cannot be completed, the command still clears the local
credential and prints a warning with a command to finish revoking the
key. Local removal alone does not disable a copy held elsewhere. A
backend mismatch refuses the operation without clearing the credential.

### <a id="analog-logout-flags"></a> Flags

`--help`



### Disconnect this machine

```bash wrap=true example=illustrative fragment=true
analog logout
```

Read any warning before treating the key as revoked. To reconnect later,
use [`analog login`](https://getanalog.io/docs/cli-reference/#analog-login).





## <a id="analog-whoami"></a> [`$ analog whoami`](https://getanalog.io/docs/cli-reference/#analog-whoami) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-whoami-flags)

Show whether a credential is stored and when it was saved. The default
check is local: “Signed in” alone does not confirm that the backend still
accepts the credential.

Add `--verify` to check it with the backend. The command reports connection
state without printing your email or credential.

### <a id="analog-whoami-flags"></a> Flags

`--verify` / `--no-verify`, `--help`.



### Verify the stored credential

```bash wrap=true example=runnable scenario=cli-whoami-verify
analog whoami --verify
```

This example has a connected account. The storage timestamp is shown
as `<stored-at>`:

```text wrap=true example=output scenario=cli-whoami-verify
Signed in.
Stored at:  <stored-at>
Storage:    local file (owner-only)
Backend:    accepted
```

`Backend: accepted` confirms the credential worked at the time of this
check. A missing or rejected credential exits with code `3`; an
unreachable backend exits with code `4`.





## <a id="analog-status"></a> [`$ analog status`](https://getanalog.io/docs/cli-reference/#analog-status) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-status-flags)

Report the stored connection, backend availability, and local saved-results
store together. With a credential, this also checks whether the backend
accepts it. Without one, it checks public backend health instead.

The results line reports the number of saves, their disk footprint, and
the store's size cap, or says that nothing is saved. This command does not
fetch a webpage or change any saved results.

### <a id="analog-status-flags"></a> Flags

`--help`



### Inspect this installation

This example has a connected account and an empty results store.

```bash wrap=true example=runnable scenario=cli-status-empty-store
analog status
```

The home directory is shown as `~` in the output.

<details>
<summary>View output</summary>

```text wrap=true example=output scenario=cli-status-empty-store
Credential: configured
Storage:    ~/.config/analog/credentials.json (owner-only file; readable by anything running as you — protection is revocation and origin-binding, not hiding bytes)
Backend:    ok (schema 29, build 6c8db2a3)
Results:    none saved
```

</details>

“None saved” describes the local results store; it does not mean the
account is disconnected. Your backend build and store totals may differ.





## <a id="analog-doctor"></a> [`$ analog doctor`](https://getanalog.io/docs/cli-reference/#analog-doctor) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-doctor-flags)

Check the local credential, outbound access to Analog's website, backend
health, and availability of the built-in browser. Use this to diagnose the
environment before retrying a command.

The credential check is local; it does not verify that the backend accepts
the key. Use [`analog whoami --verify`](https://getanalog.io/docs/cli-reference/#analog-whoami) for that. A healthy
report also does not guarantee that a particular website allows access.

### <a id="analog-doctor-flags"></a> Flags

`--help`



### Check the environment

This example has a connected account and the browser already installed.

```bash wrap=true example=runnable scenario=cli-doctor-connected
analog doctor
```

```text wrap=true example=output scenario=cli-doctor-connected
Credential: configured (bound to https://api.getanalog.io)
Egress:     ok — getanalog.io reachable
Backend:    ok
Browser:    installed

Everything Analog needs is available here.
```

A missing browser alone is not a failure: Analog can download it on first
use. Read the individual checks and suggested remedies when something is
unavailable.





## <a id="analog-feedback"></a> [`$ analog feedback` `<quality|request>` `[args]...`](https://getanalog.io/docs/cli-reference/#analog-feedback) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-feedback-flags)

Choose a reporting command: [`quality`](https://getanalog.io/docs/cli-reference/#analog-feedback-quality) for a
page that came out wrong, or [`request`](https://getanalog.io/docs/cli-reference/#analog-feedback-request) for
something you want to do. Both submit to Analog using your connected
account and return a receipt.

The [Feedback guide](https://getanalog.io/docs/feedback/) explains what to report and what
each submission includes.

### <a id="analog-feedback-flags"></a> Flags

`--help`



### Find the reporting commands

```bash wrap=true example=runnable scenario=cli-feedback-help
analog feedback --help
```

Help lists the two subcommands without submitting feedback. Add
`--help` after either subcommand to see its arguments and options.





## <a id="analog-feedback-quality"></a> [`$ analog feedback quality` `<url>`](https://getanalog.io/docs/cli-reference/#analog-feedback-quality) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-feedback-quality-flags)

Send a quality report about a page. **URL** must be a full HTTP(S)
address. Supply at least one `--reason`; repeat the option when several
labels independently describe the result. Each distinct label is sent once.

Use `--note` for a short explanation of what you expected and observed
(up to 2,000 characters). Choose labels in the
[Feedback guide](https://getanalog.io/docs/feedback/#reason-labels); start with
[Troubleshooting](https://getanalog.io/docs/troubleshooting/) if the earliest symptom is
unclear.

### <a id="analog-feedback-quality-flags"></a> Flags

`--reason`, `--note`, `--help`

- `--reason` — one of `undetected_block`, `under_rendered`, `no_records_found`, `poor_field_naming`, `misfielded_values`, `page_chrome_in_records`, `over_extraction`, `under_extraction`, `wrong_content_extracted`, `garbled_markdown`, `other`; required; repeatable.



### Report an affected page

Replace the example URL, reasons, and note before running this command:

```bash wrap=true example=illustrative
analog feedback quality https://example.com/page \
  --reason under_rendered \
  --reason poor_field_naming \
  --note "the final products are missing; prices landed under text_3"
```

This sends the report to Analog. The confirmation names the URL and
reasons, states that page content is not included, and prints a
`Receipt:` ID. The report does not attach a saved result. See
[submission privacy](https://getanalog.io/docs/feedback/#privacy).





## <a id="analog-feedback-request"></a> [`$ analog feedback request` `<text>`](https://getanalog.io/docs/cli-reference/#analog-feedback-request) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-feedback-request-flags)

Send **TEXT** to Analog as a feature request. Describe what you wanted
to do and could not do. The text must be non-empty and is limited to
2,000 characters. Quote it so the shell passes it as one argument.

This requires a connected account. Feature requests carry no page URL
or reason labels; see [Feedback](https://getanalog.io/docs/feedback/#feature-requests) for
the reporting guide and [privacy](https://getanalog.io/docs/feedback/#privacy).

### <a id="analog-feedback-request-flags"></a> Flags

`--help`



### Send your request

Replace the placeholder with the request you want to submit:

```bash wrap=true example=illustrative
analog feedback request "<your-request>"
```

The CLI confirms `Request received.`, prints a `Receipt:` ID, and
thanks you. The ID identifies the submission; it is not a URL or a
report-reading endpoint.





## <a id="analog-keys"></a> [`$ analog keys` `<list|revoke>` `[args]...`](https://getanalog.io/docs/cli-reference/#analog-keys) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-keys-flags)

Choose a key command: [`list`](https://getanalog.io/docs/cli-reference/#analog-keys-list) to see every key on the
connected account, or [`revoke`](https://getanalog.io/docs/cli-reference/#analog-keys-revoke) to disable one by its
prefix. Both use the credential this terminal is connected with.

[Authenticate](https://getanalog.io/docs/authenticate/#credential-storage-and-scope) explains
where the credential is stored and what a revoked key can no longer do.

### <a id="analog-keys-flags"></a> Flags

`--help`



### Find the key commands

```bash wrap=true example=runnable scenario=cli-keys-help
analog keys --help
```

Help lists the two subcommands without reading or changing any key. Add
`--help` after either subcommand to see its arguments and options.





## <a id="analog-keys-list"></a> [`$ analog keys list`](https://getanalog.io/docs/cli-reference/#analog-keys-list) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-keys-list-flags)

List the keys for the connected account, including revoked keys. Each row
shows a prefix, label, creation date, and whether it is active or revoked.
The current terminal's key is marked in the list.

This requires a working credential. It reads key metadata without printing
full key values or changing access.

### <a id="analog-keys-list-flags"></a> Flags

`--help`



### Find a key to revoke

```bash wrap=true example=illustrative fragment=true
analog keys list
```

Match the label and prefix to the key you intend to disable. Pass its
prefix to [`analog keys revoke`](https://getanalog.io/docs/cli-reference/#analog-keys-revoke).





## <a id="analog-keys-revoke"></a> [`$ analog keys revoke` `<prefix>`](https://getanalog.io/docs/cli-reference/#analog-keys-revoke) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-keys-revoke-flags)

Revoke the key identified by **PREFIX** from
[`analog keys list`](https://getanalog.io/docs/cli-reference/#analog-keys-list). This disables every copy of that
key, wherever it is used, without a confirmation prompt. Other keys for
the account remain active.

Revoking the current terminal's key disconnects it. Use
[`analog logout`](https://getanalog.io/docs/cli-reference/#analog-logout) when you also want to clear the local
credential store on this machine.

### <a id="analog-keys-revoke-flags"></a> Flags

`--help`



### Disable a selected key

```bash wrap=true example=illustrative fragment=true
analog keys revoke <prefix>
```

Replace `<prefix>` with the prefix from the list. Revoking an already
revoked key reports that state; it does not reactivate it. Connect again
with [`analog login`](https://getanalog.io/docs/cli-reference/#analog-login) if you revoked this terminal's key.





## <a id="analog-assess"></a> [`$ analog assess` `<url>`](https://getanalog.io/docs/cli-reference/#analog-assess) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-assess-flags)

Check a page's approximate Markdown size, available sources, and suggested
reading mode before choosing how to view it. The check runs locally,
requires no account, and makes no backend call. It does not create a
saved result.

The recommendation is advice; your task determines whether to use records,
local Markdown, or another source the page reports. See
[Assess a page](https://getanalog.io/docs/assess/) for a complete response and next commands.

**URL** is an HTTP(S) webpage address, not a saved handle, friendly name,
or `latest`. To inspect a saved result, use [`analog view`](https://getanalog.io/docs/cli-reference/#analog-view)
or [`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe).



### Assess the quotes page

```bash wrap=true example=runnable scenario=cli-assess-quotes
analog assess https://quotes.toscrape.com/js/
```

Read the [captured assessment](https://getanalog.io/docs/assess/#read-an-assessment) to see
how the recommendation and pagination note inform different decisions.

### Render the page again

```bash wrap=true example=runnable scenario=cli-assess-quotes-fresh
analog assess https://quotes.toscrape.com/js/ --fresh
```

Use this when you want a current assessment instead of one from a recent
saved result.

### Skip additional source checks

```bash wrap=true example=runnable scenario=cli-assess-quotes-no-probe
analog assess https://quotes.toscrape.com/js/ --no-probe
```

This can still fetch the page. Combine it with `--fresh` to render again
while skipping the extra feed and sitemap checks.



### Reuse and freshness

By default, a stored assessment from a result saved for the same URL
within the last 15 minutes is reused. The response names the saved result
and its age. Feed and sitemap checks run again unless `--no-probe` is set.

When changing expansion options, include `--fresh` to apply them to a new
render rather than reusing the stored assessment.

### <a id="analog-assess-flags"></a> Flags

#### `--fresh`

Fetch and render the page even when a recent saved assessment is available.

#### `--no-probe`

Skip the platform-feed check and the robots.txt sitemap listing. Sitemaps
themselves are never fetched by this command. Feeds and navigation declared
in the rendered page remain available. This does not disable the page
fetch or its robots.txt enforcement.

#### `--no-reveal-all`

Keep the page's default view instead of activating a control such as
"All" or "Clear filters" before assessing it.

#### `--load-all`

Request repeated "Load more" or "Show more" clicks before the assessment.
Off by default.

#### `--expand-all`

Request expansion of per-item disclosures, such as accordion rows,
before the assessment. Off by default. [Fetching](https://getanalog.io/docs/fetching/)
explains these expansion controls and their limits.

#### `--allow-private`

Allow private, loopback, and link-local URLs, which are refused by default.
Use this only for your own intranet or local development server.

**All options:** `--no-reveal-all`, `--load-all`, `--expand-all`, `--no-probe`, `--allow-private`, `--fresh`, `--help`.





## <a id="analog-browser"></a> [`$ analog browser` `<capture-script|install>` `[args]...`](https://getanalog.io/docs/cli-reference/#analog-browser) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-browser-flags)

Choose a browser command: [`capture-script`](https://getanalog.io/docs/cli-reference/#analog-browser-capture-script)
writes a helper that captures the page your harness's browser is showing,
and [`install`](https://getanalog.io/docs/cli-reference/#analog-browser-install) downloads Analog's built-in browser
before `analog browse` needs it. Neither command connects an account or
fetches a page.

[Fetching](https://getanalog.io/docs/fetching/#capture-from-your-browsers-current-page) covers
capturing from a supplied browser, and
[Install](https://getanalog.io/docs/install/#the-built-in-browser) covers the built-in browser.

### <a id="analog-browser-flags"></a> Flags

`--help`



### Find the browser commands

```bash wrap=true example=runnable scenario=cli-browser-help
analog browser --help
```

Help lists the two subcommands without downloading a browser or writing a
file. Add `--help` after either subcommand to see its arguments and options.





## <a id="analog-browser-capture-script"></a> [`$ analog browser capture-script`](https://getanalog.io/docs/cli-reference/#analog-browser-capture-script) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-browser-capture-script-flags)

Write a reusable capture helper for a harness's browser tool. The command
prints the helper's absolute path; it does not connect to a browser or fetch
a page. Import the generated ES module inside a runtime with supported browser
evaluation and Node filesystem access.

The helper captures the current page without scrolling, clicking, or changing
it. It writes a capture JSON file and returns a small receipt. See
[the browser handoff recipe](https://getanalog.io/docs/fetching/#capture-from-your-browsers-current-page)
for the import, capture, and `view` steps.

### <a id="analog-browser-capture-script-flags"></a> Flags

`--output`, `--help`

- `--output` — file path; required.



### Prepare the helper once

Choose a new `.mjs` destination:

```bash example=illustrative fragment=true
analog browser capture-script --output ./analog_capture.mjs
```

Import the returned absolute path in your browser tool's JavaScript runtime.
The module is self-contained: it needs no neighboring files or npm packages.
Existing files and symlinks are refused. Run the command again with a new
destination when you want the helper from a newer SDK.

### View the captured page

After the helper writes `./about.capture.json`:

```bash example=illustrative fragment=true
analog view ./about.capture.json --save-as about --find Frankie
```

The capture supplies its actual URL. `view` validates the capture before
extraction; observed shadow/frame omissions remain qualified in saved results.
Structured viewing sends page content and its URL to Analog. `--mode local`
converts to Markdown without sending either.





## <a id="analog-browser-install"></a> [`$ analog browser install`](https://getanalog.io/docs/cli-reference/#analog-browser-install) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-browser-install-flags)

Download Analog's built-in Chromium before using `analog browse`.
Download size varies by platform and browser version. Matching installed
browser binaries are reused.

Analog also downloads it automatically when needed. Preinstall it when
you want that download finished before a demo or an automated run. See
[Install](https://getanalog.io/docs/install/) for the full setup.

### <a id="analog-browser-install-flags"></a> Flags

`--help`



### Prepare the browser


```bash example=runnable scenario=onboarding-browser-preinstall-default
analog browser install
```

The command returns when the browser is ready. This does not connect an
account or fetch a webpage.





## <a id="analog-update"></a> [`$ analog update`](https://getanalog.io/docs/cli-reference/#analog-update) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-update-flags)

Update this copy of Analog through the channel that installed it.
Homebrew, uv tool, and pipx installations run their own upgrade command.
For a pip-managed environment, Analog prints the command for you or your
environment manager to run deliberately.

Use `--print` to inspect the proposed command without running it, whichever
channel installed Analog.

### <a id="analog-update-flags"></a> Flags

`--print`, `--help`.



### Inspect the upgrade command

```bash wrap=true example=illustrative fragment=true
analog update --print
```

### Update this installation

```bash wrap=true example=illustrative fragment=true
analog update
```

An upgrade can change the installed SDK version. For a project-managed
environment, update its declared dependency through the project's normal
workflow. See [Install](https://getanalog.io/docs/install/) for supported installation routes.





## <a id="analog-history"></a> [`$ analog history`](https://getanalog.io/docs/cli-reference/#analog-history) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-history-flags)

List saved results, newest first. Each row shows its handle, friendly name
when one is assigned, record count, age, and source URL. Use the handle or
name with [`analog view`](https://getanalog.io/docs/cli-reference/#analog-view) to return to that result.

The summary shows the local store's disk footprint and size cap. Results
saved during an interrupted or unfinished fetch are marked `[partial]`.

This command reads the local store without fetching any pages. If the
store is empty, it tells you how to save your first result.



### Find a saved handle

```bash wrap=true example=illustrative fragment=true
analog history
```

Look for the source URL of the page you want to reopen. The
[results guide](https://getanalog.io/docs/results/#start-with-the-page-map) shows how to save
the quotes page as `quotes-before`, the name used in the inspection
examples below.

### Inspect storage and fetch settings

```bash wrap=true example=illustrative fragment=true
analog history --usage --verbose
```

### Read history in a script

```bash wrap=true example=illustrative fragment=true
analog history --json
```



### <a id="analog-history-flags"></a> Flags

#### `--usage`

Add each result's size on disk to its row.

#### `--verbose`

Show the fetch settings and raw root `<html lang>` observations recorded
with each result. Each observation names its capture URL, in retained page
or batch order. These declarations are not inferred or verified languages
and do not change browsing or extraction. `unrecorded` means there was no
observation; `absent` means the browser observed no attribute; `""` means
an observed empty attribute. Other values are quoted without normalization.
Older saves remain unrecorded and can also report unknown settings.

#### `--json`

Print an array of entries with `handle`, `url`, `saved_at`, `name`,
`sections`, `records`, and `partial`, newest first. An empty store returns
`[]`. This flag cannot be combined with `--usage` or `--verbose`.

**All options:** `--usage`, `-v` / `--verbose`, `--json`, `--help`.

For naming, storage limits, and cleanup, see
[Manage saved results](https://getanalog.io/docs/results/#manage-saved-results).





## <a id="analog-describe"></a> [`$ analog describe` `<handle|name|latest>`](https://getanalog.io/docs/cli-reference/#analog-describe) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-describe-flags)

Inspect each record section's fields, coverage, distinct-value counts, and
samples. Use the reported field names when writing a search or export.

The examples use the [saved quotes page](https://getanalog.io/docs/results/#start-with-the-page-map),
named `quotes-before`. Its quotes are in `section[0]`: `text` holds the
quote, `text_2` holds the author, and `tags` holds its topics. Check your
result's field names if the page has changed.

**REF** is a saved handle, a friendly name, or `latest`. The command reads
the saved result locally; it does not fetch the page again.



### Inspect the page's fields

```bash wrap=true example=illustrative fragment=true
analog describe quotes-before
```

### Focus on the quotes section

```bash wrap=true example=illustrative fragment=true
analog describe quotes-before --section 0
```

### Read field statistics as JSON

```bash wrap=true example=illustrative fragment=true
analog describe quotes-before --section 0 --format json
```

This returns field statistics and section metadata. To read the records
themselves, use [`analog export`](https://getanalog.io/docs/cli-reference/#analog-export).

### Keep context with the statistics

```bash wrap=true example=illustrative fragment=true
analog describe quotes-before --section 0 --format json --context compact
```

This wraps the statistics in one object with `source`, `selection`,
`qualifications`, and `data`, using the same context format as
[`analog export --context compact`](https://getanalog.io/docs/cli-reference/#analog-export). The ordinary JSON array
is under `data`; an empty array still carries the available source and
qualifications. No page Markdown is included. Use `--context full` to keep
this object and add the original saved artifact under `context`, including
records, section relationships, schemas, and Markdown. The selected statistics
stay identical; the original source can include unselected sections.



### Read the statistics

**Coverage** is the fraction of records with a non-null value in the
field. **Cardinality** counts distinct non-null values. For a list field,
cardinality compares complete lists; [`analog distinct`](https://getanalog.io/docs/cli-reference/#analog-distinct)
counts their individual items.

The table also reports each field's type, source, traits, and a sample.
Samples marked `…*` were shortened for display; the saved values remain
available in full.

Statistics describe captured records, not necessarily the whole site.
Applicable capture limitations accompany ordinary output on stderr; with
compact or full context, they are included in the JSON instead. A successful local
inspection returns success even if acquisition of the saved page was partial.

### <a id="analog-describe-flags"></a> Flags

#### `--format`

one of `rich`, `markdown`, `plain`, `json`; default `"rich"`.

Choose a terminal table, a Markdown table, plain text, or JSON.
JSON returns an array of selected sections with their field statistics;
a result with no record sections returns `[]`.

#### `--section`

Select a heading label, a zero-based section number, a printed ID such as
`section[0]`, or `all`. A repeated heading label selects every matching
section. By default, all record sections are described.

#### `--kind`

Limit the selection to a kind, such as `navigation`. Use this instead
of `--section`; the two flags cannot be combined.

#### `--context`

one of `none`, `compact`, `full`; default `"none"`.

- **`none`** (default): the statistics array.
- **`compact`**: the same statistics under `data`, with `source`, `selection`,
  and `qualifications`.
- **`full`**: the compact object plus the original saved artifact under
  `context`.

The `compact` and `full` levels require `--format json`. Full context describes
what was saved; it does not certify that the capture was complete. `none`
leaves other formats unchanged.

**All options:** `--format` / `-f`, `--section`, `--kind`, `--context`, `--help`.

See [Inspect and find](https://getanalog.io/docs/results/#inspect-and-find) for the workflow
from field inspection to a targeted query.





## <a id="analog-distinct"></a> [`$ analog distinct` `<handle|name|latest>` `<field>`](https://getanalog.io/docs/cli-reference/#analog-distinct) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-distinct-flags)

List a field's distinct values with their occurrence counts, most frequent
first. For a list field such as `tags`, each item is counted separately.
Null values are skipped.

The examples use the [saved quotes page](https://getanalog.io/docs/results/#start-with-the-page-map),
named `quotes-before`. They select its quotes in `section[0]`, where
`tags` contains topics and `text_2` contains author names.

**REF** is a saved handle, a friendly name, or `latest`. **FIELD** is a
field name reported by [`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe). This command
reads the saved records locally.



### Count occurrences of each topic

```bash wrap=true example=illustrative fragment=true
analog distinct quotes-before tags --section 0
```

### Count different authors

```bash wrap=true example=illustrative fragment=true
analog distinct quotes-before text_2 --section 0 --count
```

An author appearing in several quotes contributes one distinct value.

### Read topic counts as JSON

```bash wrap=true example=illustrative fragment=true
analog distinct quotes-before tags --section 0 --json
```



### <a id="analog-distinct-flags"></a> Flags

#### `--section`

Select a heading label, a zero-based section number, a printed ID such as
`section[0]`, or `all`. A repeated heading label selects every matching
section. By default, the command checks all sections containing the field.

#### `--kind`

Limit the selection to a kind, such as `navigation`. Use this instead
of `--section`; the two flags cannot be combined.

#### `--count`

Return the number of distinct values instead of their frequency list.
This counts unique values, not records or total occurrences.

If the same field spans sections with different record shapes, the value
list requires a narrower selection. `--count` can combine those sections,
but prints a warning to stderr: using one field as an identity across
unlike records can conflate different things. Choose `--section` or
`--kind` when those values should be counted separately.

#### `--json`

Print an array of objects with `value` and `count`, most frequent first.
With `--count`, print the distinct count as a JSON number instead.
If the field has no values, these return `[]` and `0`, respectively.
An unknown field is an error.

**All options:** `--section`, `--kind`, `--json`, `--count` / `-c`, `--help`.

For inspecting fields before choosing a query, see
[Inspect and find](https://getanalog.io/docs/results/#inspect-and-find).





## <a id="analog-diff"></a> [`$ analog diff` `<handle|name|latest>` `<handle|name|latest>`](https://getanalog.io/docs/cli-reference/#analog-diff) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-diff-flags)

Compare two saved results section by section. The report shows record
turnover, added or removed sections and fields, record counts, and
changes in field statistics. The comparison reads both saves locally;
it does not fetch either page again or modify the saved results.

**REF_A** is the earlier result and **REF_B** is the later one. Each
accepts a saved handle, a friendly name, or `latest`. You can also compare
two different pages; the command does not require matching URLs.

The examples begin with the [saved quotes page](https://getanalog.io/docs/results/#start-with-the-page-map),
named `quotes-before`. Keep that name before fetching again so the
new save does not change which earlier result you are comparing.

Your saved handles and page content may differ.



### Save a second view of the page

```bash wrap=true example=illustrative fragment=true
analog browse https://quotes.toscrape.com/js/
analog rename latest quotes-after
```

Use a different name if `quotes-after` is already taken. This fetch
creates the second save; the commands below only read the two saves.

### Compare the saved pages

```bash wrap=true example=runnable scenario=cli-reference-diff-saves
analog diff quotes-before quotes-after
```

```text wrap=true example=output scenario=cli-reference-diff-saves
diff 20260911-u5rbhk -> 20260911-dlmnwx

sections:  3 -> 3
records:   14 -> 14

No differences in sections, schema, counts, or field stats.
```

These saves contain the same ten quotes and four navigation links, so
the report shows no differences. A successful comparison exits with code
`0` whether differences exist or not.

### Compare only the quotes

```bash wrap=true example=runnable scenario=cli-reference-diff-section
analog diff quotes-before quotes-after --section 0
```

```text wrap=true example=output scenario=cli-reference-diff-section
diff 20260911-u5rbhk -> 20260911-dlmnwx

records:  10 -> 10
fields:   3 -> 3  (+0 -0)

No differences in record content, schema, counts, or field stats.
```

The quotes are in `section[0]` in both example saves. Check both results
with [`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe) before using a numbered section
if the page's layout has changed.



### Read the comparison

**Arrived** records occur only in the later save; **departed** records
occur only in the earlier one. Records are compared by their complete
values. A record with any changed value counts as one departure and one
arrival, rather than a field-by-field edit to a matched record. Duplicate
occurrences count separately; changing only the order of records does
not count as turnover.

Sections are matched by heading label, then by kind in page order.
The report includes added or removed fields and changes in their types,
sources, traits, coverage, and distinct-value counts. See
[`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe) for the field statistics.

This is a comparison of record sections. It does not compare page prose,
images, or visual layout. Read notes about different fetch settings, SDK
schema versions, or saved field renames before treating a difference as
a change on the website.

### <a id="analog-diff-flags"></a> Flags

#### `--section`

Apply the same selector to each save: a heading label, a zero-based section
number, a printed ID such as `section[0]`, or `all`. A repeated heading
label selects every matching section. A number selects that position
independently in each result, so inspect both saves when sections move.

If the selector matches only one save, those sections appear as added
or removed. No matching section on either side is a command error.

#### `--kind`

Compare only sections of a kind, such as `navigation`. Use this instead
of `--section`; the two flags cannot be combined. Without either option,
the comparison includes all record sections.

**All options:** `--section`, `--kind`, `--help`.

For saving and comparing a page over time, see
[Compare two saves](https://getanalog.io/docs/results/#compare-two-saves).





## <a id="analog-export"></a> [`$ analog export` `<handle|name|latest>`](https://getanalog.io/docs/cli-reference/#analog-export) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-export-flags)

Read a saved result as JSON, CSV, YAML, or Markdown. Select the records,
fields, and rows you need without fetching the page again or changing the
saved data.

The examples use the [saved quotes page](https://getanalog.io/docs/results/#start-with-the-page-map),
named `quotes-before`. Its quotes are in `section[0]`: `text` holds the
quote, `text_2` holds the author, and `tags` holds its topics. Check
[`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe) for your result's names and sections.

**REF** is a saved handle, a friendly name, or `latest`. Output goes to
stdout unless you supply `--output`.



### Write the quotes to a CSV file

```bash wrap=true example=runnable scenario=cli-reference-export-csv
analog export quotes-before -f csv --section 0 \
  --output quotes.csv
```

```text wrap=true example=output scenario=cli-reference-export-csv
Wrote csv to quotes.csv
```

<details>
<summary>View quotes.csv</summary>

```bash wrap=true example=runnable scenario=cli-reference-export-csv-contents
cat quotes.csv
```

```text wrap=true example=output scenario=cli-reference-export-csv-contents
tags,text,text_2
change; deep-thoughts; thinking; world,“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”,by Albert Einstein
abilities; choices,"“It is our choices, Harry, that show what we truly are, far more than our abilities.”",by J.K. Rowling
inspirational; life; live; miracle; miracles,“There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.”,by Albert Einstein
aliteracy; books; classic; humor,"“The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.”",by Jane Austen
be-yourself; inspirational,"“Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.”",by Marilyn Monroe
adulthood; success; value,“Try not to become a man of success. Rather become a man of value.”,by Albert Einstein
life; love,“It is better to be hated for what you are than to be loved for what you are not.”,by André Gide
edison; failure; inspirational; paraphrased,"“I have not failed. I've just found 10,000 ways that won't work.”",by Thomas A. Edison
misattributed-eleanor-roosevelt,“A woman is like a tea bag; you never know how strong it is until it's in hot water.”,by Eleanor Roosevelt
humor; obvious; simile,"“A day without sunshine is like, you know, night.”",by Steve Martin
```

</details>

The file contains the quotes section's records, without navigation links.

### Select two quotes by Einstein

```bash wrap=true example=runnable scenario=cli-reference-export-filtered
analog export quotes-before --section 0 \
  --fields text_2,text --where "text_2~Einstein" \
  --sort text --limit 2
```

<details>
<summary>View output</summary>

```json wrap=true example=output scenario=cli-reference-export-filtered
[
  {
    "text_2": "by Albert Einstein",
    "text": "“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”"
  },
  {
    "text_2": "by Albert Einstein",
    "text": "“There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.”"
  }
]
```

</details>

This prints a JSON array of records with author and quote fields, sorted
by quote text. Filtering and sorting can use fields you do not export.

### Find authors of inspirational quotes

```bash wrap=true example=runnable scenario=cli-reference-export-authors
analog export quotes-before --section 0 \
  --fields text_2 --where "tags=inspirational" \
  --sort text_2 --desc
```

```json wrap=true example=output scenario=cli-reference-export-authors
[
  {
    "text_2": "by Thomas A. Edison"
  },
  {
    "text_2": "by Marilyn Monroe"
  },
  {
    "text_2": "by Albert Einstein"
  }
]
```

For the list-valued `tags` field, `=` matches an exact item. This returns
one author value per matching quote; use [`distinct`](https://getanalog.io/docs/cli-reference/#analog-distinct)
when you want unique values and their counts.

### Keep full context with selected records

```bash wrap=true example=runnable scenario=cli-reference-export-json-file
analog export quotes-before --section 0 --context full --output quotes.json
```

```text wrap=true example=output scenario=cli-reference-export-json-file
Wrote json to quotes.json
```

The selected records are under `data`. Full context includes everything in
compact context, then adds the original saved result under `context`: all
saved sections, their relationships, field metadata, and page Markdown.
That source material may include records and fields excluded from `data`.
To inspect the original saved artifact on its own, use `analog view quotes-before --json`.

### Hand selected records onward with context

```bash wrap=true example=illustrative fragment=true
analog export quotes-before --section 0 --fields text_2,text \
  --context compact --output selected-quotes.json
```

This writes one JSON object with `source`, `selection`, `qualifications`, and
`data`. It carries the selected records and the facts needed to interpret
them without including page Markdown. Use it when another agent or a later
session will read the file without the current transcript. The same option
works on stdout; `--output` only changes the destination.

`source` identifies the saved page's URL, local handle, and save time when
known. Save time is not a freshness guarantee, and a handle is local to the
result store. `selection` records the original section indices, any selected
Collection, and applied fields, filters, sort order, and limit. Limits apply
per section, or once to a selected Collection's canonical records.

`qualifications` preserves relevant capture and interpretation facts,
including caveats about fields used for filtering or sorting. Source counts
and indices refer to the original selection, before row shaping. `data`
contains the selected records; even an empty selection retains its context.
The file can be read or processed directly; it is not a browser capture file
for `analog view` or a result-store import.

`--context full` keeps this same object and adds the original source artifact
under `context`. Choose it when the recipient also needs the surrounding page
and field metadata. Both levels require JSON; neither changes the selected
`data`. Full context means all saved source material, not a guarantee that the
capture covers the entire page or site.

### Read the quotes section as Markdown

```bash wrap=true example=runnable scenario=cli-reference-export-markdown
analog export quotes-before -f md --section 0
```

<details>
<summary>View output</summary>

```text wrap=true example=output scenario=cli-reference-export-markdown
# [Quotes to Scrape](https://quotes.toscrape.com/)

[Login](https://quotes.toscrape.com/login)

“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”by Albert Einstein

Tags: change deep-thoughts thinking world

“It is our choices, Harry, that show what we truly are, far more than our abilities.”by J.K. Rowling

Tags: abilities choices

“There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.”by Albert Einstein

Tags: inspirational life live miracle miracles

“The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.”by Jane Austen

Tags: aliteracy books classic humor

“Imperfection is beauty, madness is genius and it's better to be absolutely ridiculous than absolutely boring.”by Marilyn Monroe

Tags: be-yourself inspirational

“Try not to become a man of success. Rather become a man of value.”by Albert Einstein

Tags: adulthood success value

“It is better to be hated for what you are than to be loved for what you are not.”by André Gide

Tags: life love

“I have not failed. I've just found 10,000 ways that won't work.”by Thomas A. Edison

Tags: edison failure inspirational paraphrased

“A woman is like a tea bag; you never know how strong it is until it's in hot water.”by Eleanor Roosevelt

Tags: misattributed-eleanor-roosevelt

“A day without sunshine is like, you know, night.”by Steve Martin

Tags: humor obvious simile

- [Next →](https://quotes.toscrape.com/js/page/2/)
```

</details>

This reads the section's Markdown. Omit `--section` to read the whole page.



### <a id="analog-export-flags"></a> Flags

#### `--format` / `-f`

one of `json`, `csv`, `yaml`, `md`, `markdown`; default `"json"`.

`markdown` is an alias for `md`. CSV and YAML contain records. JSON defaults
to a flat array of selected records (`--context none`), with or without
selection flags. Use `--context compact` or `--context full` to add context.

Markdown supports section, kind, and collection selection. It does not
accept `--fields`, `--where`, `--sort`, or `--limit`. If selected sections
have no stored Markdown, the command reports the omission on stderr; if
none can be shown, it falls back to the whole page and says so.

#### `--section`, `--kind`, and `--collection`

Choose one way to select records:

- **`--section`** accepts a heading label, a zero-based section number,
  a printed ID such as `section[0]`, or `all`. A repeated heading label
  selects every matching section.
- **`--kind`** selects all sections of a kind, such as `navigation`.
- **`--collection`** selects a collection by its displayed zero-based
  index. When your result reports `Collection 0`, `--collection 0`
  exports its records with repeated identities represented once. For
  Markdown retains the collection's member sections. All JSON context levels
  return the same canonical records; full context separately retains
  the original source and collection membership. The quotes example has no
  collections; use its section number.

These selectors cannot be combined. Without one, all record sections
are in scope. CSV, YAML, and every JSON context level require sections whose
record shapes can be combined. Select one section or collection when
the page contains different kinds of records.

#### `--fields`

Keep comma-separated field names in the order given. Filtering and
sorting happen before this selection. Choosing shared fields can allow
sections with different shapes to be exported together; read the stderr
warning, since the same field name can describe different things across
sections. An unknown field is an error.

#### `--where`

repeatable.

Keep rows satisfying every supplied condition. Quote each condition so
the shell preserves its operators:

- `=` and `!=` compare exact, case-sensitive values. For list fields,
  they test whether the list contains that exact item.
- `~` tests a case-insensitive substring, including within list items.
- `<`, `<=`, `>`, and `>=` compare numbers. Values that cannot be read
  as numbers do not match.

Numeric comparisons use the underlying number where available; exports
retain the page's display value, such as `"from $5.41"`.

#### `--sort` and `--desc`

Sort each selected section by one field, numerically for numeric fields
and lexically otherwise. Missing values sort last in ascending order.
`--desc` reverses that order and only has an effect with `--sort`.

#### `--limit`

integer; at least 0.

Keep at most this many records per selected section, after filtering
and sorting. For a collection, the limit applies to its combined records.

#### `--context`

one of `none`, `compact`, `full`; default `"none"`.

- **`none`** (default): the selected records as a JSON array.
- **`compact`**: an object with `source`, `selection`, `qualifications`, and
  `data`, without page Markdown.
- **`full`**: the same compact object plus the original saved artifact under
  `context`, including schemas, section relationships, and Markdown.

The selected data stays identical across all three levels. Full context may
include unselected page content; field and row filters apply only to `data`.
The `compact` and `full` levels require JSON. `none` leaves other formats
unchanged.

#### `--output` / `-o`

file path.

Write UTF-8 to this file, replacing its contents if it exists. The
confirmation goes to stderr. Without this option, the data goes to stdout.

Applicable capture and selection qualifications go to stderr for ordinary
exports. With compact or full context, they travel inside the JSON; file output also
reports them on stderr for the current caller. CSV remains data-only, without
comment rows or companion files. Use contextual JSON when the recipient needs
the qualifications as part of the file.

Successful local export returns `0` even when the saved capture is partial.
That status confirms the export worked, not that it covers the whole site.
Invalid selections, unreadable saves, and failed writes still fail.

**All options:** `--format` / `-f`, `--fields`, `--where`, `--sort`, `--desc`, `--limit`, `--section`, `--kind`, `--collection`, `--context`, `--output` / `-o`, `--help`.

For the longer inspection and export sequence, see
[Export the records you need](https://getanalog.io/docs/results/#export-the-records-you-need).





## <a id="analog-rm"></a> [`$ analog rm` `[<handle|name|latest>]`](https://getanalog.io/docs/cli-reference/#analog-rm) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-rm-flags)

Delete saved results from the local store. Choose a single result, every
result, or a set selected by age and source URL.

> **Caution: Deletion has no confirmation prompt**
>
> Deletion removes the saved files without asking you to confirm. Use
> `--dry-run` to inspect the selection before deleting it.

**REF** is a handle, a friendly name, or `latest`. Choose exactly one
selection route: **REF**, `--all`, or filters. The age and URL filters
can be combined; a result must match both when both are supplied.



### Preview removal of the sample result

These examples use `saved-quotes` from
[`analog rename`](https://getanalog.io/docs/cli-reference/#analog-rename). The capture uses handle
`20260912-pvtqdw`; match the reported handle to your own result before
deleting it.

```bash wrap=true example=runnable scenario=cli-management-rm-dry-run
analog rm saved-quotes --dry-run
```

```text wrap=true example=output scenario=cli-management-rm-dry-run
Would delete 20260912-pvtqdw.
```

The saved result still exists after this command.

### Preview a cleanup by source URL

```bash wrap=true example=runnable scenario=cli-management-rm-filter-preview
analog rm --url-contains quotes.toscrape.com --dry-run
```

```text wrap=true example=output scenario=cli-management-rm-filter-preview
Would delete 20260912-pvtqdw (saved-quotes)  https://quotes.toscrape.com/js/
1 saved result(s) would be deleted (dry run — nothing removed).
```

This capture's store contains just the sample result. Your preview may
list more: the filter selects every saved result whose URL contains this
text. Nothing is removed by the preview.

### Remove that one saved result

Run this after you have finished the field-editing examples and no longer
need the save:

```bash wrap=true example=runnable scenario=cli-management-rm
analog rm saved-quotes
```

```text wrap=true example=output scenario=cli-management-rm
Deleted 20260912-pvtqdw.
```

Only `saved-quotes` is selected here, regardless of how many results the
URL filter matched above. Its handle and friendly name no longer open a
saved result.



### <a id="analog-rm-flags"></a> Flags

#### `--all`

Select every saved result. This cannot be combined with a reference or
filters. Add `--dry-run` to inspect the selection without deleting it.

#### `--older-than`

Select results saved more than the given duration ago, such as `30d` or
`12h`. Use a whole number followed by `m` (minutes), `h` (hours), `d`
(days), or `w` (weeks). This uses the save time, not the last time you
opened the result.

#### `--url-contains`

Select results whose source URL contains the supplied text, ignoring
case. Combine it with `--older-than` to restrict the selection by age too.

#### `--dry-run`

List what would be deleted and leave the saved files in place. This works
with every selection route. When no results match a filter, the command
reports that nothing matched.

**All options:** `--all`, `--older-than`, `--url-contains`, `--dry-run`, `--help`.

For the broader workflow, see
[Manage saved results](https://getanalog.io/docs/results/#manage-saved-results).





## <a id="analog-rename"></a> [`$ analog rename` `<handle|name|latest>` `<name>`](https://getanalog.io/docs/cli-reference/#analog-rename) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-rename-flags)

Give a saved result a friendly name. The name works anywhere a handle does,
including `view`, `export`, and `rm`. Changing it replaces the previous
name; the handle and saved content stay the same.

**REF** is a handle, an existing friendly name, or `latest`. **NAME** must
be unique in the local store, start with a letter or digit, and contain
only letters, digits, `-`, or `_`, up to 64 characters. It cannot be
`latest` or look like a handle.

### <a id="analog-rename-flags"></a> Flags

`--help`



### Name the saved quotes page

This uses the [quotes result](https://getanalog.io/docs/results/#start-with-the-page-map)
named `quotes-before`. Choose another name if `saved-quotes` is already
in use:

```bash wrap=true example=runnable scenario=cli-management-rename
analog rename quotes-before saved-quotes
```

```text wrap=true example=output scenario=cli-management-rename
Renamed 20260912-pvtqdw → saved-quotes.
```

The captured result's handle is `20260912-pvtqdw`; yours will differ.
Afterward, use `saved-quotes` in place of `quotes-before`. The field-editing
and deletion examples refer to this same save. Delete it only when
you have finished working with it.





## <a id="analog-rename-fields"></a> [`$ analog rename-fields` `<handle|name|latest>` `<old=new>...`](https://getanalog.io/docs/cli-reference/#analog-rename-fields) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-rename-fields-flags)

Rename fields in a saved result's structured records. Values stay the
same. The change applies across all sections containing those field
names; it does not rename the saved result itself.

> **Note: Names are remembered**
>
> By default, Analog also remembers the names for future fetches of the
> same URL. Use `--once` to change this save only.

Remembered renames are applied conservatively: if the page's fields have
changed too much, Analog skips the rename rather than guessing.

**REF** is a handle, a friendly name, or `latest`. Supply one or more
**OLD=NEW** pairs, separated by spaces. Inspect the page with
[`analog describe`](https://getanalog.io/docs/cli-reference/#analog-describe) before choosing names.

- `RENAMES` — repeatable.



### Name the author and topic fields

This uses `saved-quotes` from [`analog rename`](https://getanalog.io/docs/cli-reference/#analog-rename), before
any field edits. In its quotes section, `text_2` contains authors and
`tags` contains topics. Rename those fields only on this save:

```bash wrap=true example=runnable scenario=cli-management-rename-fields
analog rename-fields saved-quotes text_2=author tags=topics --once
```

```text wrap=true example=output scenario=cli-management-rename-fields
Renamed 2 field(s) on 20260912-pvtqdw. Fields now: topics, text, author, url, group, depth
```

The response lists fields across the saved page, including its navigation
fields. The quote text remains under `text`.

### Read one record with the new names

```bash wrap=true example=runnable scenario=cli-management-renamed-record
analog export saved-quotes -f json --section 0 --limit 1
```

<details>
<summary>View output</summary>

```json wrap=true example=output scenario=cli-management-renamed-record
[
  {
    "topics": [
      "change",
      "deep-thoughts",
      "thinking",
      "world"
    ],
    "text": "“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”",
    "author": "by Albert Einstein"
  }
]
```

</details>

The author and topics have the same values as before, under the names you
chose. `--section 0` selects the quotes; `--limit 1` shows one record.



### <a id="analog-rename-fields-flags"></a> Flags

#### `--once`

Change only the selected saved result. Omit this flag to also remember
the names for future fetches of its URL. It does not remove previously
remembered choices for that URL.

**All options:** `--once`, `--help`.

### Invalid or unknown fields

Unknown old names produce a warning and are skipped; known fields in the
same command are still renamed. Each pair needs a nonempty old and new
name. New names cannot contain `,` or `=`. Repeating an old name or
creating a collision with another field is an error.





## <a id="analog-reorder-fields"></a> [`$ analog reorder-fields` `<handle|name|latest>` `<field>...`](https://getanalog.io/docs/cli-reference/#analog-reorder-fields) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-reorder-fields-flags)

Put the fields you choose first in each section that contains them, in
the order you give. Fields you omit keep their relative order after
those fields. Values and record order stay the same.

The change is saved in place and, by default, remembered for future
fetches of the same URL. Use `--once` to change this save only. Remembered
orders skip fields that no longer appear on the page.

**REF** is a handle, a friendly name, or `latest`. Supply one or more
**FIELD** names, separated by spaces. You can name just one to move it
to the front.

- `FIELDS` — repeatable.



### Put the author before the quote

This follows the [`rename-fields` example](https://getanalog.io/docs/cli-reference/#analog-rename-fields):
`saved-quotes` now has `author`, `text`, and `topics` in its quotes
section. Put the author and quote first on this save:

```bash wrap=true example=runnable scenario=cli-management-reorder-fields
analog reorder-fields saved-quotes author text --once
```

```text wrap=true example=output scenario=cli-management-reorder-fields
Reordered 20260912-pvtqdw. Fields now: author, text, topics, url, group, depth
```

`topics` follows the two named fields. Navigation sections keep their
own fields.

### Export one quote in the new column order

```bash wrap=true example=runnable scenario=cli-management-ordered-record
analog export saved-quotes -f csv --section 0 --limit 1
```

<details>
<summary>View output</summary>

```text wrap=true example=output scenario=cli-management-ordered-record
author,text,topics
by Albert Einstein,“The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.”,change; deep-thoughts; thinking; world
```

</details>

The CSV header follows the saved field order: `author,text,topics`.
The export prints one quote without changing the saved records.



### <a id="analog-reorder-fields-flags"></a> Flags

#### `--once`

Change only the selected saved result. Omit this flag to also remember
the order for future fetches of its URL. It does not remove previously
remembered choices for that URL.

**All options:** `--once`, `--help`.

### Invalid or unknown fields

Unknown names produce a warning and are skipped; known fields in the same
command are still reordered. Naming a field more than once is an error.





## <a id="analog-help"></a> [`$ analog help` `[<command>...]`](https://getanalog.io/docs/cli-reference/#analog-help) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-help-flags)

Print help for the CLI or a command path. With no **COMMAND**, this lists
the top-level commands. Subcommand paths work too; the response is the same
help shown by that command's `--help` flag.

Requesting help does not run the named command.

### <a id="analog-help-flags"></a> Flags

`--help`

- `COMMAND_PATH` — repeatable.



### Read help for a subcommand

```bash wrap=true example=runnable scenario=cli-help-keys-revoke
analog help keys revoke
```

<details>
<summary>View output</summary>

```text wrap=true example=output scenario=cli-help-keys-revoke
Usage: analog keys revoke [OPTIONS] PREFIX

  Revoke the key with this prefix (see 'analog keys list').

Options:
  -h, --help  Show this message and exit.

  Exit codes (uniform across commands):
    0  success
    1  command error
    2  usage error — bad flags or arguments
    3  not signed in, or credential rejected
    4  couldn't reach the backend
    5  couldn't fetch the page — robots refusal, site block, or network
    6  the page was fetched but extraction failed
    130  interrupted — output identifies any saved partial capture
```

</details>

This shows the required prefix and exit-code guide without revoking a key.





## <a id="analog-quickstart"></a> [`$ analog quickstart`](https://getanalog.io/docs/cli-reference/#analog-quickstart) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-quickstart-flags)

Print a short guide to connecting an account, then fetching and searching
the About page in one terminal command. A page overview is optional;
Python is an alternative path. The command only displays instructions; it
does not install software, start sign-in, or fetch a page.

### <a id="analog-quickstart-flags"></a> Flags

`--help`



### Read the guide in your terminal

```bash wrap=true example=illustrative fragment=true
analog quickstart
```

For the guided website version, start with [Quickstart](https://getanalog.io/docs/quickstart/).





## <a id="analog-docs"></a> [`$ analog docs`](https://getanalog.io/docs/cli-reference/#analog-docs) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-docs-flags)

Print the documentation URL. This does not open a browser or make a
network request.

### <a id="analog-docs-flags"></a> Flags

`--help`



### Find the documentation

```bash wrap=true example=runnable scenario=cli-docs-url
analog docs
```

```text wrap=true example=output scenario=cli-docs-url
https://getanalog.io/docs
```





## <a id="analog-contact"></a> [`$ analog contact`](https://getanalog.io/docs/cli-reference/#analog-contact) [`[flags]`](https://getanalog.io/docs/cli-reference/#analog-contact-flags)

Print how to reach the Analog team and point to the CLI feedback route.
This does not send a message, submit feedback, or open an email client.

### <a id="analog-contact-flags"></a> Flags

`--help`



### Find the team’s contact details

```bash wrap=true example=runnable scenario=cli-contact
analog contact
```

```text wrap=true example=output scenario=cli-contact
team@getanalog.io
For a page that extracted poorly or a feature request, `analog feedback` is the fastest route — it goes straight into triage.
```

See [Feedback](https://getanalog.io/docs/feedback/) for choosing a reporting route.



<!-- END GENERATED: cli-reference -->