@kinloom/cli 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/cached-ocr.py +786 -0
- package/dist/assets/ocr.md +76 -0
- package/dist/assets/prep-scan.md +97 -0
- package/dist/assets/prep-scan.py +1313 -0
- package/dist/bundled-skills/acpl-persi/SKILL.md +103 -0
- package/dist/bundled-skills/acpl-persi/scripts/persi +539 -0
- package/dist/bundled-skills/archive-org/SKILL.md +162 -0
- package/dist/bundled-skills/archive-org/scripts/archive-org +1576 -0
- package/dist/bundled-skills/blm-glo/SKILL.md +54 -0
- package/dist/bundled-skills/california-archives/SKILL.md +130 -0
- package/dist/bundled-skills/california-archives/scripts/ca-archives +614 -0
- package/dist/bundled-skills/chronicling-america/SKILL.md +120 -0
- package/dist/bundled-skills/chronicling-america/scripts/chronam +553 -0
- package/dist/bundled-skills/cyndis-list/SKILL.md +53 -0
- package/dist/bundled-skills/findagrave/SKILL.md +129 -0
- package/dist/bundled-skills/findagrave/scripts/findagrave +965 -0
- package/dist/bundled-skills/hathitrust/SKILL.md +117 -0
- package/dist/bundled-skills/hathitrust/scripts/hathi +379 -0
- package/dist/bundled-skills/kentucky-archives/SKILL.md +124 -0
- package/dist/bundled-skills/kentucky-archives/scripts/ky-archives +646 -0
- package/dist/bundled-skills/library-of-michigan/SKILL.md +118 -0
- package/dist/bundled-skills/library-of-michigan/scripts/michiganology +515 -0
- package/dist/bundled-skills/missouri-archives/SKILL.md +109 -0
- package/dist/bundled-skills/missouri-archives/scripts/mo-archives +751 -0
- package/dist/bundled-skills/nara-catalog-search/SKILL.md +130 -0
- package/dist/bundled-skills/nara-catalog-search/scripts/nara +1387 -0
- package/dist/bundled-skills/narrative-audio/SKILL.md +103 -0
- package/dist/bundled-skills/narrative-audio/references/script-rules.md +109 -0
- package/dist/bundled-skills/narrative-audio/scripts/narrative-audio +290 -0
- package/dist/bundled-skills/new-jersey-archives/SKILL.md +135 -0
- package/dist/bundled-skills/new-jersey-archives/scripts/nj-archives +869 -0
- package/dist/bundled-skills/openarchieven/SKILL.md +97 -0
- package/dist/bundled-skills/openarchieven/scripts/openarchieven +624 -0
- package/dist/bundled-skills/texas-archives/SKILL.md +102 -0
- package/dist/bundled-skills/texas-archives/scripts/texas-archives +666 -0
- package/dist/bundled-skills/uk-archives/SKILL.md +110 -0
- package/dist/bundled-skills/uk-archives/scripts/uk-archives +631 -0
- package/dist/bundled-skills/usgs-gnis/SKILL.md +99 -0
- package/dist/bundled-skills/usgs-gnis/scripts/gnis +418 -0
- package/dist/bundled-skills/virginia-archives/SKILL.md +144 -0
- package/dist/bundled-skills/virginia-archives/scripts/va-archives +1039 -0
- package/dist/bundled-skills/wikitree/SKILL.md +154 -0
- package/dist/bundled-skills/wikitree/scripts/wikitree +455 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +488 -26
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +30 -5
- package/dist/client.js.map +1 -1
- package/dist/commands/ops/audit.d.ts +138 -0
- package/dist/commands/ops/audit.d.ts.map +1 -0
- package/dist/commands/ops/audit.js +872 -0
- package/dist/commands/ops/audit.js.map +1 -0
- package/dist/commands/ops/context.d.ts +100 -0
- package/dist/commands/ops/context.d.ts.map +1 -0
- package/dist/commands/ops/context.js +917 -0
- package/dist/commands/ops/context.js.map +1 -0
- package/dist/commands/ops/dates.d.ts +87 -0
- package/dist/commands/ops/dates.d.ts.map +1 -0
- package/dist/commands/ops/dates.js +228 -0
- package/dist/commands/ops/dates.js.map +1 -0
- package/dist/commands/ops/help.d.ts +8 -0
- package/dist/commands/ops/help.d.ts.map +1 -0
- package/dist/commands/ops/help.js +107 -0
- package/dist/commands/ops/help.js.map +1 -0
- package/dist/commands/ops/index.d.ts +8 -0
- package/dist/commands/ops/index.d.ts.map +1 -0
- package/dist/commands/ops/index.js +8 -0
- package/dist/commands/ops/index.js.map +1 -0
- package/dist/commands/ops/integrate.d.ts +61 -0
- package/dist/commands/ops/integrate.d.ts.map +1 -0
- package/dist/commands/ops/integrate.js +1063 -0
- package/dist/commands/ops/integrate.js.map +1 -0
- package/dist/commands/ops/sync.d.ts +194 -0
- package/dist/commands/ops/sync.d.ts.map +1 -0
- package/dist/commands/ops/sync.js +1251 -0
- package/dist/commands/ops/sync.js.map +1 -0
- package/dist/commands/ops/telemetry.d.ts +79 -0
- package/dist/commands/ops/telemetry.d.ts.map +1 -0
- package/dist/commands/ops/telemetry.js +249 -0
- package/dist/commands/ops/telemetry.js.map +1 -0
- package/dist/commands/ops/verify.d.ts +76 -0
- package/dist/commands/ops/verify.d.ts.map +1 -0
- package/dist/commands/ops/verify.js +325 -0
- package/dist/commands/ops/verify.js.map +1 -0
- package/dist/commands/records/help.d.ts +18 -0
- package/dist/commands/records/help.d.ts.map +1 -0
- package/dist/commands/records/help.js +174 -0
- package/dist/commands/records/help.js.map +1 -0
- package/dist/commands/records/index.d.ts +5 -0
- package/dist/commands/records/index.d.ts.map +1 -0
- package/dist/commands/records/index.js +5 -0
- package/dist/commands/records/index.js.map +1 -0
- package/dist/commands/records/registry.d.ts +32 -0
- package/dist/commands/records/registry.d.ts.map +1 -0
- package/dist/commands/records/registry.js +227 -0
- package/dist/commands/records/registry.js.map +1 -0
- package/dist/commands/records/resolve.d.ts +14 -0
- package/dist/commands/records/resolve.d.ts.map +1 -0
- package/dist/commands/records/resolve.js +61 -0
- package/dist/commands/records/resolve.js.map +1 -0
- package/dist/commands/records/runner.d.ts +27 -0
- package/dist/commands/records/runner.d.ts.map +1 -0
- package/dist/commands/records/runner.js +255 -0
- package/dist/commands/records/runner.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: findagrave
|
|
3
|
+
description: Search and read Find a Grave memorials, cemeteries, and places via the bundled uv-based `findagrave` CLI, the website search, or the site's own GraphQL API. Covers CLI usage, memorial and cemetery URL patterns, search filters, photo downloads, and what works vs what does not. Use when finding burial records, birth/death dates and places, cemetery details, linked family, or gravestone photos for genealogy research.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Find a Grave
|
|
7
|
+
|
|
8
|
+
This skill includes a standalone executable Python CLI at `skills/findagrave/scripts/findagrave` using a PEP 723 `#!/usr/bin/env -S uv run --script` shebang with inline dependencies (`click`, `httpx`). No virtualenv setup or API key is required.
|
|
9
|
+
|
|
10
|
+
## Bundled CLI (`scripts/findagrave`)
|
|
11
|
+
|
|
12
|
+
Path: `skills/findagrave/scripts/findagrave`
|
|
13
|
+
|
|
14
|
+
### Persistent local disk cache
|
|
15
|
+
|
|
16
|
+
`get`/`memorial`, `cemetery`, `photo`, `search`, and `place` cache responses atomically under `~/.cache/kinloom-findagrave/` (overrideable via `KINLOOM_FINDAGRAVE_CACHE_DIR`) using advisory file locks (`fcntl.flock` on POSIX, safe fallback elsewhere) so concurrent research threads never re-download shared memorials, cemeteries, or gravestone photos. Pass `--refresh` on any command to bypass the local cache and fetch fresh data.
|
|
17
|
+
|
|
18
|
+
Cache layout:
|
|
19
|
+
|
|
20
|
+
- `memorials/<id>.json`: parsed memorial JSON shared by `get`/`memorial` and `photo` (168-hour default TTL via `--cache-ttl-hours` or `KINLOOM_FINDAGRAVE_CACHE_TTL_HOURS`).
|
|
21
|
+
- `cemeteries/<id>.json`: parsed cemetery JSON for `cemetery <id>` (168-hour default TTL).
|
|
22
|
+
- `photos/<memorial_id>/<photo_id><ext>`: downloaded gravestone and portrait image files reused across `--out` directories and `--prefix` flags with zero HTTP requests.
|
|
23
|
+
- `_queries/<search|cemetery_search|place>/<sha256>.json`: cached search and typeahead JSON responses (168-hour default TTL).
|
|
24
|
+
|
|
25
|
+
### Search memorials
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Search memorials by first and last name
|
|
29
|
+
skills/findagrave/scripts/findagrave search --first Abraham --last Lincoln
|
|
30
|
+
|
|
31
|
+
# Narrow by years and place
|
|
32
|
+
skills/findagrave/scripts/findagrave search --first Clara --last Barton --birth-year 1821 --year-range 2
|
|
33
|
+
skills/findagrave/scripts/findagrave search --last Douglass --death-year 1895 --death-year-filter exact
|
|
34
|
+
|
|
35
|
+
# In one cemetery, or in one place (place id from the place command)
|
|
36
|
+
skills/findagrave/scripts/findagrave search --last Lincoln --cemetery-id <cemetery-id>
|
|
37
|
+
skills/findagrave/scripts/findagrave search --last Lincoln --location-id <location-id>
|
|
38
|
+
|
|
39
|
+
# Biography text, any-text, or a linked relative; full JSON output
|
|
40
|
+
skills/findagrave/scripts/findagrave search --last Lincoln --bio president --limit 5
|
|
41
|
+
skills/findagrave/scripts/findagrave search --first Harriet --last Tubman --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Names match the site's default matching unless `--exact` is passed. Married women are also found under their maiden name by default (`--no-include-maiden` turns that off). A search returns at most 50 rows per call; use `--limit` and `--offset` to page. The site only reaches the first 10,000 results of a search, so narrow by place, years, or cemetery when totals are large.
|
|
45
|
+
|
|
46
|
+
### Read one or more memorials in full
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Read one memorial by id from search output (alias: memorial)
|
|
50
|
+
skills/findagrave/scripts/findagrave get <memorial-id>
|
|
51
|
+
|
|
52
|
+
# Full bio/inscription text, photo list, and JSON output (includes cemetery_lat / cemetery_lng and coordinates)
|
|
53
|
+
skills/findagrave/scripts/findagrave get <memorial-id> --full --photos
|
|
54
|
+
skills/findagrave/scripts/findagrave get <memorial-id-1> <memorial-id-2> --json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A `get` (or `memorial`) returns name (with maiden name separate), birth/death dates and places, memorial GPS `coordinates`, cemetery (with `coordinates`, `lat`/`lng`, `physicalAddress`, and top-level `cemetery_lat`/`cemetery_lng` in JSON), plot, inscription, bio, veteran flag, grave-photo flag, photo count, linked relationships (each with its own memorial id to read next), and created/modified dates. `familyRelations` is usually null in search-shaped responses; use `relationships` for linked family. In `--json` output, `bio` and `inscription` are returned as `{"value": "..."}` objects or `null` (matching the GraphQL schema).
|
|
58
|
+
|
|
59
|
+
### Cemeteries and places
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Cemeteries by name
|
|
63
|
+
skills/findagrave/scripts/findagrave cemetery --name "Oak Ridge"
|
|
64
|
+
skills/findagrave/scripts/findagrave cemetery --name "Oak Ridge" --place "Sangamon County, Illinois"
|
|
65
|
+
|
|
66
|
+
# One cemetery by id (positional id or --id both work; JSON includes coordinates, lat, lng, physicalAddress)
|
|
67
|
+
skills/findagrave/scripts/findagrave cemetery <cemetery-id> --json
|
|
68
|
+
skills/findagrave/scripts/findagrave cemetery --id <cemetery-id>
|
|
69
|
+
|
|
70
|
+
# Resolve a place name to ids (for use with search --location-id)
|
|
71
|
+
skills/findagrave/scripts/findagrave place --name Springfield
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Place ids look like `city_<id>`, `county_<id>`, or a plain cemetery id. Resolve the name first and check it before using an id: the typeahead ranks by its own relevance, and a name can fit several places.
|
|
75
|
+
|
|
76
|
+
### Download photos
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Downloads a memorial's photos into ./photos
|
|
80
|
+
skills/findagrave/scripts/findagrave photo <memorial-id> --out ./photos
|
|
81
|
+
skills/findagrave/scripts/findagrave photo <memorial-id> --type Grave --out ./photos
|
|
82
|
+
|
|
83
|
+
# Add a self-describing filename prefix and a provenance sidecar JSON file
|
|
84
|
+
skills/findagrave/scripts/findagrave photo <memorial-id> --type Grave --prefix lincoln-abraham --metadata --out ./photos
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Files are saved as `<photo-id>.jpg` by default, or `<prefix>_<photo-id>.jpg` when `--prefix` is set (`--metadata` writes `<prefix>_<memorial-id>.metadata.json`). Read a gravestone photo before trusting a memorial's transcribed dates: the stone is the better source.
|
|
88
|
+
|
|
89
|
+
### Build a website search URL offline
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
skills/findagrave/scripts/findagrave url --first Abraham --last Lincoln --birth-year 1809
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Website search & URL patterns (verified live 2026-11-24)
|
|
96
|
+
|
|
97
|
+
- Memorial page: `https://www.findagrave.com/memorial/<memorial-id>` (name slug optional after the id, e.g. `https://www.findagrave.com/memorial/<memorial-id>/abraham-lincoln`)
|
|
98
|
+
- Cemetery page: `https://www.findagrave.com/cemetery/<cemetery-id>`
|
|
99
|
+
- Website search: `https://www.findagrave.com/memorial/search?firstname=Abraham&lastname=Lincoln&birthyear=1809&deathyear=1865`
|
|
100
|
+
- No sign-in is needed to search or read public memorials. Signed-in-only features (virtual cemeteries, flower leaving, edit requests, photo requests) are out of scope for this skill.
|
|
101
|
+
|
|
102
|
+
## GraphQL API rules (verified live 2026-11-24)
|
|
103
|
+
|
|
104
|
+
There is no public Find a Grave API. The CLI uses the site's own undocumented internal GraphQL API, which answers anonymously with no key, login, or cookies:
|
|
105
|
+
|
|
106
|
+
- Endpoint: `POST https://www.findagrave.com/orc/graphql`
|
|
107
|
+
- Headers: `Content-Type: application/json` plus a browser `User-Agent`. No auth headers.
|
|
108
|
+
- Top-level queries used by the CLI: `memorialSearch(search: MemorialSearchInput)`, `memorialsById(ids: [ID!]!)`, `cemeteries(ids:, search: CemeterySearchInput)`, `locationsByTypeahead(search: LocationSearchInput)`.
|
|
109
|
+
- `memorialSearch` returns `{ total, memorials }`. `MemorialSearchInput` fields verified live include `firstName`, `lastName`, `birthYear`, `deathYear`, `birthYearFilter`, `deathYearFilter`, `birthYearRange`, `deathYearRange`, `locationId`, `cemeteryIds`, `bio`, `fullText`, `linkedToName`, `exactName`, `includeMaidenName`, `from`, `size`. Year filters use the `MemorialSearchYearFilter` enum (`before`, `after`, `exact`, `unknown`).
|
|
110
|
+
- `Memorial` fields verified live include `id`, `name { first last maiden }`, `birth { date { year month day circa } place { names { name } } }`, `death` (same shape), `cemetery { id names { name } memorialCount }`, `plot`, `inscription { value }`, `bio { value }`, `isVeteran`, `hasGravePhoto`, `dateCreated`, `dateModified`, `relationships { type yearMarried memorial { id name { first last } } }`, `photos { total photos { id path caption type } }`.
|
|
111
|
+
- `Place` is a union of `Location` and `Cemetery`; use inline fragments (`... on Location`, `... on Cemetery`) when querying it.
|
|
112
|
+
- Full schema introspection is disabled, but `{ __type(name: "Memorial") { fields { name } } }` lists a type's fields, and `{ __type(name: "Query") { fields { name } } }` lists top-level queries. That is how the field lists above were verified.
|
|
113
|
+
- Because the API is undocumented, it can change without notice. If a query starts failing with `GRAPHQL_VALIDATION_FAILED`, re-probe the type with `__type` before assuming the data is gone.
|
|
114
|
+
|
|
115
|
+
## What works vs what does not
|
|
116
|
+
|
|
117
|
+
- Works: anonymous GraphQL `search`/`get`/`cemetery`/`place`/`photo` reads, and plain `curl` fetches of the website search HTML (verified live 2026-11-24).
|
|
118
|
+
- IP sensitivity: automated fetches can occasionally receive HTTP 403 depending on originating IP reputation; when that happens, fall back to a live browser.
|
|
119
|
+
- Cloudflare challenges bursts: space requests at least 250 ms apart (the CLI waits 0.3 s per request). If a 403 appears, wait a few minutes and retry once; if it persists, fall back to the website in a real browser.
|
|
120
|
+
- No bulk export: there is no dump or bulk-download endpoint. Work memorial by memorial and cite each one.
|
|
121
|
+
|
|
122
|
+
## Data quality: treat memorials as leads
|
|
123
|
+
|
|
124
|
+
Find a Grave is contributor-written. Dates, family links, and biographies are claims, often unsourced and sometimes copied from online trees. Prefer what a stone in a photo shows, cross-check dates against vital records and census data, and cite the memorial (id and URL) for every fact taken from it. A recently deceased person's memorial can show limited details.
|
|
125
|
+
|
|
126
|
+
## Environment variables
|
|
127
|
+
|
|
128
|
+
- `KINLOOM_FINDAGRAVE_CACHE_DIR`: optional override for the local disk cache directory (default `~/.cache/kinloom-findagrave`).
|
|
129
|
+
- `KINLOOM_FINDAGRAVE_CACHE_TTL_HOURS`: optional override for memorial, cemetery, and query cache TTL in hours (default `168`). No API key, login, or account is needed for anything in this skill.
|