leed know Commands

leed know reads Know views and saved views, and records Search & gaps decisions, from the command line. Like leed contacts, it needs no site checkout: --company <companyId|domain> and -e, --env <name> pick the company. Every command takes the global --json and then answers with the usual JSON envelope.

views, show, run and gap show only read. gap link, gap dismiss and gap reopen record a decision, and take --dry-run.

Examples

leed know views                                        # every view (its filters, sections, plan feature) and your saved views
leed know show overview                                # one view, last 30 days
leed know show overview --readers agents --agent-identity signed-in --start 2026-10-01 --end 2026-11-01
leed know show people --out ./people.json              # sections naming people go to a 0600 file
leed know show person --filter contactId=42 --out ./person.json   # a view's own parameters go through --filter
leed know show emailSocial --filter source=email --filter releaseId=12
leed know run 7                                        # a saved view, by id
leed know run "Last 30 days, everyone"                 # or by its exact name
leed know gap show unanswered "how do i rotate keys"   # one What to write next item, with its evidence
leed know gap link unanswered "how do i rotate keys" --page pg_123   # an existing page addresses it: in progress
leed know gap dismiss unanswered "how do i rotate keys" --count 12 --reason "covered by Rotating API keys"
leed know gap reopen unanswered "how do i rotate keys"

leed know views

Lists every view with the filters it takes, the sections it returns, the sections that name people and the plan feature it needs, then your saved views. It is the authority on which filters a view takes.

leed know show <view>

Reads one view. Its filters:

FlagValues
--start, --endISO 8601. The default is the last 30 days, except on campaigns, where it is the selected campaign’s dates, first to last deliverable day, as on the screen.
--compare, --no-compareCompare with the prior period of equal length
--page-type <id>One page type
--readers <everyone|people|agents>Who read
--agent-identity <any|signed-in|anonymous>Which agents. There is no breakdown by AI client.
--country <cc>A two-letter country code. Sessions and site searches match their session’s location; agent calls and questions match the request’s location or the signed-in contact’s country.
--referrer <host>, --channel <channel>Where sessions came from
--account <any|customers|id>Any account, accounts marked as customers, or one account
--journey-stage <journeyId|none>A journey stage id from Settings › Journey Stages, or none. A contact is at the furthest stage among the pages it read.
--signed-in-agentsContacts who also read through a signed-in agent
--filter key=valueRepeatable: a view’s own filters and parameters that have no flag, such as the person view’s required contactId, Email & social’s source, campaignId and releaseId, or Campaigns’ campaignId

Each view takes only some of these, as leed know views lists. A filter the view does not take is refused with invalid_arguments, never silently ignored. --filter takes only a key the view declares and no flag above sets.

leed know run <savedView>

Runs a saved view by id (all digits) or by its exact name, matched with case first and then without. Two saved views with the same name are refused, with their ids, so run it by id. A saved view whose view no longer exists answers not_found.

Plans

On a plan without a view’s feature, the read still succeeds: gated: true, the view’s totals, and sections: null. It is not a failure, so there is nothing to retry.

Files for rows that name people

A view lists the sections that name people in personSections. When a read returns any, pass --out <file>: they are written there as JSON with mode 0600, and the result carries { written: <rows> } in their place plus a personFile block. Without --out, the command refuses with invalid_arguments before printing anything. A destination inside a git repository that does not ignore it is refused before any request is made, as for leed contacts export. --dry-run reports the file it would write and writes nothing.

leed know gap

The items in Search & gaps’ What to write next come from leed know show searchGaps, under sections.writeNext.items by tab. Each has a kind (unanswered, rising_falling or shipped_unread) and a gapKey: the normalized question for unanswered, quoted, and otherwise the page id.

  1. leed know show searchGaps and pick an open item.
  2. leed know gap show <kind> <gapKey>, over the same window and filters, returns the item and its evidence: for a question, every spelling with its asks by source, the site search terms, what readers reworded it as, the pages they read after asking, and the readers, people and accounts (counted only inside your plan’s contact limit, never named); for a page item, the page with the item’s numbers; the linked draft; and nearestPages. An item the window does not list is not_found.
  3. Decide whether a new page or a revision of an existing one answers it best.
  4. For a new page, leed page create ... --gap <kind>:<gapKey> creates the draft and links it, so the item moves to In progress with that page (data.gap.linked). For an existing page, put a PUBLISHED page IN_REVISION first, write the change as tracked suggestions stamped with the source id (leed page update <pageId> --block <dataId> --suggest --source-id <sha>), then leed know gap link <kind> <gapKey> --page <pageId>. Linking the page an item is already linked to succeeds again, so the link is safe to retry.
  5. Never publish from an agent. A person reviews the draft; the item closes on its own once its linked page is published, and docs pages publish with the release that carries their source id.

If leed page create --gap creates the page but cannot link it, data.gap.linked is false, warnings carries the leed know gap link command that finishes the job, and the exit code is the link error’s. Do not run the create again.

leed know gap dismiss <kind> <gapKey> --count <n> [--reason <text>] takes the item’s current count and hides the item until that count doubles. --reason says in a few words why the item needs no content (“covered by <page>”, “not our product”), trimmed and at most 280 characters. It shows under the item on Know’s Dismissed tab, and comes back as dismissedReason from leed know show searchGaps and leed know gap show. leed know gap reopen undoes a dismissal or a link, leaves the page as it is, and clears the reason.

Exit codes

leed know uses the CLI’s usual exit codes; see CLI troubleshooting and exit codes. For the same reads over the Operator MCP, see Reading Know from MCP and the CLI and Search & gaps.

ESC