# Reddit query: can Gramps do headless Filtered export?

**URL:** <https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708>\
**Category:** Help\
**Created:** [July 13, 2026, 10:49pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708 "2026-07-13T22:49:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 13, 2026, 10:49pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/1 "2026-07-13T22:49:09Z")

</div>

On [Reddit.com/r/gramps](https://www.reddit.com/r/gramps/comments/1uuqa6i/cli_export_with_person_filter/), a user was unable discover any documentation about whether there is a CLI method to a export a CSV file of a filtered Tree?

I described the GUI options but didn’t have an answer of whether it was possible from the [Command Line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line) Interface.

---

<div class="post-metadata">

**Author:** ![codefarmer](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@codefarmer](https://gramps.discourse.group/u/codefarmer)\
**Post date:** [July 14, 2026, 7:00pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/2 "2026-07-14T19:00:09Z")

</div>

The wiki page for the Gramps [command line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line) doesn’t show any option to apply a filter.

If the user’s intent is to export databases in a loop for many people, and if there is no CLI option, they may consider using Windows Power Automate if they are a Windows user. It has a bit of a learning curve, but with a little experimentation I was able to get it to run \>1000 repeated operations in an application (not Gramps). Once I had it working, I let it run overnight and it did the job saving me hours of picking and clicking monotony.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 14, 2026, 7:34pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/3 "2026-07-14T19:34:03Z")

</div>

Burned some free GitHub Claude time with the following prompt:  
  
 _please examine the Gramps CLI modules at [https://github.com/gramps-project/gramps/tree/master/gramps/cli](https://github.com/gramps-project/gramps/tree/master/gramps/cli) and the [attached user documentation](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line). Determine if there are major features that should be added to the user documentation. Is there any Export capabilities that is missing? In particular, applying filters to the export and selecting CSV as an exporting format._

> Let me fetch the actual Gramps source files directly:Now let me look at the actual export plugin source to understand what export options are available via CLI:Now I have enough to give a thorough analysis. Let me compile my findings.
> 
> Here is a detailed gap analysis comparing the Gramps 6.0 CLI documentation (the uploaded PDF) against what the source code actually supports:

## Gap Analysis: Gramps 6.0 CLI Documentation vs. Source Capabilities

### 1. Export Filter/Privacy Proxy System — Major Missing Section

This is the most significant omission. The documentation’s Export options section describes only the `-e` flag and file format codes. It says nothing about the **Export Proxy system** , which is the primary mechanism for controlling _what data_ gets exported.

The source (`gramps/gui/plug/export/WriterOptionBox`) and the `export.proxy-order` config key (which _does_ appear in the `-s` / `--show` output reproduced in the same document) expose five proxies that can be configured for any CLI export:

| Proxy | Config key | What it does |
| --- | --- | --- |
| **Privacy** | `export.proxy-order` `'privacy'` | Strips records marked private |
| **Living** | `export.proxy-order` `'living'` | Restricts or removes living-person data |
| **Person** | `export.proxy-order` `'person'` | Applies a named custom person filter |
| **Note** | `export.proxy-order` `'note'` | Applies a named custom note filter |
| **Reference** | `export.proxy-order` `'reference'` | Excludes records not linked to selected persons |

The documentation shows `export.proxy-order=[['privacy', 0], ['living', 0], ['person', 0], ['note', 0], ['reference', 0]]` appearing in the `gramps --show` example output but never explains what these values mean, what the integer values (enabled/disabled flags) represent, or how to change them via `--config` before an export. A CLI user who wants to produce a privacy-filtered GEDCOM has no documented path to do so.

**What should be added:**

A new subsection under “Export options” explaining:

- Each proxy’s purpose and the 0/1 enable flag
- How to set them via `--config` immediately before exporting, e.g.:

```bash
# Export a GEDCOM excluding all private records and all living people
gramps -O "Family Tree 1" \
  -c export.proxy-order:"[['privacy',1],['living',1],['person',0],['note',0],['reference',0]]" \
  -e public_export.ged -f ged

```

- The living-person mode values (the `LivingProxyDb` modes: `MODE_INCLUDE_ALL`, `MODE_EXCLUDE_ALL`, `MODE_INCLUDE_LAST_NAME_ONLY`, `MODE_INCLUDE_FULL_NAME_ONLY`) and which config key controls that mode
- The person-filter proxy and how to specify a named custom filter by name via the relevant config key (e.g. `export.person-filter`)

* * *

### 2. CSV Export — Underdocumented

The document lists `csv` as a valid format code under “Subset of your data” with only one sentence: _“Be careful however, import must be as values created by the export function. Only a part of your data is contained in the output.”_

There is no mention of:

- **What the four CSV sections are** : Place, Person, Marriage, Children — each with their specific column layout
- **The column schema** (e.g. `Person, Lastname, Firstname, Callname, Suffix, Prefix, Title, Gender, Birthdate, Birthplace, Birthsource, Baptismdate …`). The 5.1 manual has a full dedicated page for this (`Gramps_5.1_Wiki_Manual_-_Manage_Family_Trees:_CSV_Import_and_Export`) but the 6.0 CLI page does not link to it, nor does it clarify CSV’s limitations (notes are never exported, sources are never exported, etc.).
- A working CLI example: `gramps -O "Family Tree 1" -e export.csv -f csv`

* * *

### 3. The `-r` / `--remove` Option — Completely Missing from the Body Text

The help output listed in the document includes `-r, --remove=FAMILY_TREE_PATTERN Remove matching Family Tree(s) (use regular expressions)`, but there is no body-text section explaining it, no caveats about it being destructive, no example, and no mention of whether `-y / --yes` is required to suppress the confirmation prompt. This is a data-loss risk if misused.

* * *

### 4. The `-C` / `--create` Option — Underdocumented

`-C, --create=FAMILY_TREE Create on open if new Family Tree` appears in the help listing but is never explained in the body text. Its use pattern (creating a new tree as part of an import pipeline) is not illustrated with an example.

* * *

### 5. Database Credentials (`-U` / `-P`) — No Documentation at All

`-U, --username=USERNAME` and `-P, --password=PASSWORD` appear in the help listing (they are used for PostgreSQL/network backends) but are never explained anywhere in the document. There is no mention of which backend they apply to, security considerations about password on the [command line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line), or whether they interact with `--create`.

* * *

### 6. `-Z` Subcommand for `--default` — Missing

The Defaults section documents subcommands `A`, `F`, `P`, `X`, and `E` but omits `Z` (delete old `.zip` upgrade files), which is listed in the 5.1 and 5.2 manuals.

* * *

### 7. `--load-modules` — Completely Undocumented

`--load-modules=MODULE1,MODULE2,...` appears in the usage header but is never explained anywhere in the document. There is no description of what dynamic modules are, where they live, or a use case.

* * *

### 8. Export of Multiple Files in One Invocation — No Example

The text correctly states “more than one file can be exported in one command” but provides no concrete example. A useful addition would be:

```bash
# Export simultaneously to both GEDCOM and Gramps XML
gramps -O "Family Tree 1" \
  -e backup.gramps -f gramps \
  -e share.ged -f ged

```

* * *

### 9. The `Plugins_Command_Line` Wiki Page — Needs Cross-Link

The wiki has a stub page at `Gramps:Plugins_Command_Line` covering per-plugin CLI options. The CLI manual should link to it, especially given the complexity of `report` and `tool` action options.

* * *

### Summary Priority Table

| Gap | Severity | Notes |
| --- | --- | --- |
| Export proxy/filter system not documented | **High** | Core privacy and filtering capability invisible to CLI users |
| CSV export format not described in CLI doc | **Medium** | Users don’t know what they’ll get |
| `-r / --remove` undocumented | **High** | Destructive operation with no explanation |
| `-C / --create` undocumented | **Medium** | Common pipeline pattern |
| `-U / -P` credentials undocumented | **Medium** | PostgreSQL backend users have no guidance |
| `-Z` default subcommand missing | **Low** | Minor omission |
| `--load-modules` undocumented | **Low** | Niche but present in the help text |
| Multi-file export example missing | **Low** | Helpful but implied |

The **export proxy/filter system** is by far the most impactful gap. A CLI user automating nightly backups or publishing a filtered public GEDCOM has no documented way to discover that privacy and living-person filtering are available, let alone how to configure them without opening the GUI first. The fact that `export.proxy-order` appears in the `--show` sample output in the same document without any explanation makes the omission particularly jarring.

---

<div class="post-metadata">

**Author:** ![GeorgeWilmes](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@GeorgeWilmes](https://gramps.discourse.group/u/GeorgeWilmes)\
**Post date:** [July 14, 2026, 7:49pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/4 "2026-07-14T19:49:27Z")

</div>

There’s a long-standing feature request for using filters from the [command line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line):

> **[0004627: Use of custom filters from command line - Gramps - Bugtracker – Free...](https://gramps-project.org/bugs/view.php?id=4627)**

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 14, 2026, 8:08pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/5 "2026-07-14T20:08:59Z")

</div>

> [@GeorgeWilmes](#):
>
> There’s a long-standing feature request for using filters from the [command line](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Command_Line):

Claude claims that it existed but was not documented.

I am not inclined to do CLI experimentation. But had Claude integrate the missing documentation in MediaWiki markdown and pasted that content into the ‘discussion’ tab for the wiki page. If someone wants to validate that there’s no hallucinating and update the main page, that’d would be great.

As for using the CLI to apply filters during export, see:

> **[Export filters and privacy proxies - Talk:Gramps 6.0 Wiki Manual - Command Line...](https://gramps-project.org/wiki/index.php/Talk:Gramps_6.0_Wiki_Manual_-_Command_Line#Export_filters_and_privacy_proxies)**
>
> When exporting, Gramps applies a layered proxy system to control exactly which records and which details are included in the output. These proxies are available for all export formats that support them (Gramps XML, GEDCOM, GeneWeb, Web Family Tree,...

---

<div class="post-metadata">

**Author:** ![kku](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kku](https://gramps.discourse.group/u/kku)\
**Post date:** [July 15, 2026, 7:02pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/6 "2026-07-15T19:02:45Z")

</div>

See also [gramps/addons/ExportTool at master · kkujansuu/gramps · GitHub](https://github.com/kkujansuu/gramps/tree/master/addons/ExportTool)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 24, 2026, 11:23am UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/7 "2026-07-24T11:23:10Z")

</div>

The **ExportTool** online docs says that is supports only `.ged`, `.gramps` or `.gpkg` formats. But the OP is seeking filtered `.csv` output via CLI commands.

@kku Are the docs wrong? Or could you upgrade it to support CSV too?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 24, 2026, 11:27am UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/8 "2026-07-24T11:27:37Z")

</div>

The OP junuxx says that Claude’s method failed to produce:

> Junuxx OP • [21 Jul 2026](https://www.reddit.com/r/gramps/comments/1uuqa6i/comment/oysu51w/)  
> Finally managed to give this a go.
> 
> Unfortunately it looks like Claude was wrong about `proxy-order`. You can only set binary flags here, not named filters. I also couldn’t find a way to specify uncompressed gramps XML.
> 
> Well… the time may have finally come for me to make a contribution to Gramps

---

<div class="post-metadata">

**Author:** ![kku](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@kku](https://gramps.discourse.group/u/kku)\
**Post date:** [July 24, 2026, 1:55pm UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/9 "2026-07-24T13:55:29Z")

</div>

I probably could enhance ExportTool to support CSV if needed. But I don’t see the Reddit OP to talk about CSV export (the only example was about .gramps output).

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 26, 2026, 6:49am UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/10 "2026-07-26T06:49:56Z")

</div>

I am probaby misconnecting 2 different threads. Sorry

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [August 25, 2026, 6:50am UTC](https://gramps.discourse.group/t/reddit-query-can-gramps-do-headless-filtered-export/9708/11 "2026-08-25T06:50:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
