/* technical reference */

Peeking under the Hood

How GenQuery works, what powers the plain English interface, and how to get more out of it if you want to go deeper.

← Back to GenQuery

How GenQuery works

Your RootsMagic database is an SQLite file — a structured database that stores every person, event, source, citation, and relationship you've entered. RootsMagic reads this file to display your tree and generate its built-in reports, but it only exposes a subset of what's there.

GenQuery connects directly to that same file (read-only — it never modifies it) and gives you a way to ask questions across the entire database. The results come back as structured tables that you can read on screen or export.

Under the covers, GenQuery is built on Nushell — a modern shell designed around structured, tabular data. It provides the query engine and pipeline system that GenQuery builds on. You don't need to know anything about Nushell to use GenQuery, but if you want to write your own queries, its documentation is a good place to start.

In plain terms: GenQuery is a bridge between your RootsMagic database and plain English (or direct queries). It reads your data, processes your question, and returns an answer — without touching anything.

The plain English interface

The plain English interface is GenQuery's most accessible feature. Instead of writing a query in a formal language, you describe what you want in ordinary words:

examples
"Show me everyone in my tree born in Virginia before 1850 with no birth date"

"Find all events with no source citation"

"List my direct ancestors who have pension records"

"How many people in my database have no parents recorded?"

GenQuery parses your question, identifies what you're asking for — the data type, any filters, and what to do with the results — and translates it into a structured query against your database.

How it understands you

The plain English interface uses a language model specifically fine-tuned for genealogical research. It has been trained to understand the vocabulary, data structures, and research practices used in serious genealogy work — including the terminology from Evidence Explained and the Genealogy Proof Standard (see below).

This means it understands terms like “pension record,” “probate filing,” “census year,” “indirect evidence,” and “conflicting information” as genealogical concepts, not just words.

What it runs on

The language model runs locally on your computer — your data and your questions never leave your machine. There is no cloud service, no account required, and no subscription fee for this feature. It is part of the free Community version.

The model is bundled with GenQuery and runs entirely offline. A modern laptop or desktop (made in the last 5–7 years) handles it comfortably. The first time you use it, GenQuery may take a moment to load the model into memory.

Genealogy Proof Standard & Evidence Explained

The two most widely respected frameworks for genealogical research quality are the Genealogy Proof Standard (GPS) and Evidence Explained by Elizabeth Shown Mills.

Genealogy Proof Standard

The GPS defines five elements of a reasonably exhaustive research process: a reasonably exhaustive search, complete and accurate source citations, analysis and correlation of evidence, resolution of conflicting evidence, and a soundly reasoned written conclusion.

GenQuery's data quality reports are informed by these standards. When it surfaces “events with no citations” or “conflicting birth dates,” it is pointing you toward gaps that the GPS would flag as incomplete.

Evidence Explained

Elizabeth Shown Mills's Evidence Explained is the definitive guide to citation formats for genealogical sources. It covers everything from vital records and census images to land deeds, pension files, and DNA evidence.

GenQuery's plain English interface is trained on the citation categories and source terminology from Evidence Explained, so when you ask about “pension records” or “probate filings,” it maps those terms to the correct data structures in your RootsMagic database.

If you're not yet familiar with these frameworks, the Board for Certification of Genealogists publishes a concise overview of the GPS at bcgcertification.org. Elizabeth Shown Mills's work is at evidenceexplained.com.

Direct queries for advanced users

If you prefer to write queries directly — or want more precise control — GenQuery exposes a full query interface built on Nushell. You can think of it as a structured language where you describe what to get and how to filter it, similar to SQL but written in plain pipeline steps.

Basic structure

query syntax
# Get a list of records
genq list people

# Filter with "where"
genq list people | where BirthYear < 1800

# Sort the results
genq list people | where Surname == "Smith" | sort-by BirthYear

# Count results
genq list events | where Citations == 0 | length

Available data sets

available sets
genq list people        # All individuals in your database
genq list families      # All family units
genq list events        # All events (birth, death, marriage, etc.)
genq list sources       # All sources
genq list citations     # All citations linking events to sources
genq list media         # All attached media files
genq list webtags       # All web links attached to records
genq census year 1880   # Census-specific queries by year
genq tabulate trees     # Analyze connected family components

Export from direct queries

export examples
# Export to CSV
genq list people | where BirthState == "Virginia" | to csv | save virginia.csv

# Export to JSON
genq list sources | to json | save sources.json

# Generate Obsidian notes
genq export obsidian --output ./vault/ancestors/

Full documentation for all commands and query options is at genquery.netlify.app/docs.

Installation details

macOS

GenQuery installs via Homebrew, the standard macOS package manager. If you don't have Homebrew, install it first from brew.sh — it's a one-line command.

macOS — Terminal
# Install Homebrew first if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Then install GenQuery
brew install nushell
brew tap miams/genq && brew install genq

# Connect to your RootsMagic database
genq init

Windows

GenQuery installs via Chocolatey. Open a Command Prompt or PowerShell window as Administrator before running these commands.

Windows — Command Prompt (Administrator)
# Install Chocolatey first if you don't have it
# See https://chocolatey.org/install for the one-line install command

# Then install GenQuery
choco install nushell
choco install genq

# Connect to your RootsMagic database
genq init

Linux

Linux — Terminal
# Install Nushell
curl -fsSL https://get.nushell.sh | sh

# Install GenQuery from source (requires Rust/Cargo)
cargo install genq

# Connect to your RootsMagic database
genq init

Your data is safe

GenQuery never modifies your RootsMagic database. Here is exactly what it does:

  1. 1When you run "genq init", GenQuery records the path to your RootsMagic .rmgc or .rmtree file.
  2. 2Each time you run a query, GenQuery opens a read-only connection to that file. It reads data; it never writes, modifies, or deletes anything.
  3. 3Your database file never leaves your computer. No data is sent to any server.
  4. 4The plain English interface runs locally. No queries are processed in the cloud.
Recommended: Keep regular backups of your RootsMagic database independently of GenQuery. RootsMagic has a built-in backup function — use it before any major data entry session.