OTO
reference · oto query --help at v0.6.1

oto query

ask the knowledge base a question

oto query [-h] [--project PROJECT] [--backend {sqlite,neo4j}] ...

query entity | neighbors | search | by-type | count | group | stale | resolve | docs | overview | explain | policy | help

Options

OptionWhat it does
--project PROJECTproject root (default: current directory)
--backend {sqlite,neo4j}serve from the local SQLite build or the configured Neo4j (default: the project's `serve.backend`, else sqlite)

Where to use it

Everything about one thing.

oto query --project claims entity "Total loss settlement"

its card, relationships, sources and evidence; superseded ids show the current fact

What was true then?

oto query --project claims entity Collision --as-of 2026-03-01
oto query --project claims entity coverage.collision --history

the fact current on that date; every version with its validity window

Find it by words.

oto query --project claims search "salvage" 5

passages from cards and documents, ranked; no model needed

How many, and by what?

oto query --project claims count --type Procedure
oto query --project claims group type

a count; a breakdown by type, tag or attribute

Against the production store.

oto query --project claims --backend neo4j entity "Total loss settlement"

the same answer from Neo4j

As the terminal prints it
usage: oto query [-h] [--project PROJECT] [--backend {sqlite,neo4j}] ...

positional arguments:
  query                 entity | neighbors | search | by-type | count | group | stale | resolve |
                        docs | overview | explain | policy | help

options:
  -h, --help            show this help message and exit
  --project PROJECT     project root (default: current directory)
  --backend {sqlite,neo4j}
                        serve from the local SQLite build or the configured Neo4j (default: the
                        project's `serve.backend`, else sqlite)