Two modes of operation:
.ged files for local exploration, narratives, and statisticsStore credentials:
Option A — Environment variable (all platforms):
export FAMILYSEARCH_TOKEN="<TOKEN>"
Option B — macOS Keychain:
security add-generic-password -a "familysearch-app-key" -s "openclaw-familysearch" -w "<APP_KEY>"
security add-generic-password -a "familysearch-token" -s "openclaw-familysearch-token" -w "<TOKEN>"
The script checks FAMILYSEARCH_TOKEN env var first, then falls back to macOS Keychain.
OAuth 2.0 Authorization Code flow:
https://ident.familysearch.org/cis-web/oauth2/v3/authorization?response_type=code&client_id={APP_KEY}&redirect_uri={REDIRECT_URI}curl -X POST "https://ident.familysearch.org/cis-web/oauth2/v3/token" \
-d "grant_type=authorization_code&code={AUTH_CODE}&client_id={APP_KEY}"
access_token in KeychainSandbox for testing: https://integration.familysearch.org / https://api-integ.familysearch.org
python scripts/familysearch.py <command> [args]
| Command | Description |
|---|---|
| --------- | ------------- |
search --given John --surname Lewis --birth-place Oregon | Search persons in Family Tree |
person | Get person details |
ancestry | Ascending pedigree (1-8 generations) |
descendants | Descending tree |
parents | Get parents |
spouses | Get spouses |
children | Get children |
Search parameters: --given, --surname, --birth-date, --birth-place, --death-date, --death-place, --sex
Results use GEDCOM X format (JSON). Key fields: persons[].id, persons[].display.name, .birthDate, .birthPlace, .deathDate, .deathPlace.
Ahnentafel numbering in ancestry: 1=subject, 2=father, 3=mother, 4=paternal grandfather, etc.
For exported .ged files from FamilySearch, Ancestry, MyHeritage, etc. No API key needed — pure offline.
FamilySearch: familysearch.org → Family Tree → Tools → Export GEDCOM
python scripts/gedcom_query.py <gedcom_file> <command> [args...]
| Command | Description |
|---|---|
| --------- | ------------- |
search | Fuzzy name search — returns matches with IDs |
person | Full profile: birth, death, parents, spouses, children |
ancestors | Pedigree chart up (default: 4 generations) |
descendants | Pedigree chart down (default: 3 generations) |
story | Narrative biography paragraph |
timeline | Chronological life events |
stats | Tree summary: counts, surnames, birth decades, completeness |
find-date | Find people born/died in a given year |
common-ancestor | Find closest common ancestor |
id_or_name: GEDCOM ID (e.g., I001) or partial name (fuzzy, case-insensitive).
Beyond data retrieval, this skill supports narrative genealogy — connecting facts to stories:
story command (GEDCOM mode) for auto-generated biographical narratives共 1 个版本