Configure the converter¶
The converter accepts configuration from three sources, in order of precedence:
- CLI flags — highest priority, override everything else
- Environment variables —
CONVERTER_prefix, loaded from.envor the shell - Defaults — sensible defaults defined in
ConverterConfig
CLI flags¶
Pass flags directly on the command line:
See the CLI reference for the full flag list.
Environment variables¶
Set any ConverterConfig field via an environment variable with the CONVERTER_ prefix:
export CONVERTER_REDACT_PII=false
export CONVERTER_INCLUDE_THINKING=true
uv run chatgpt-to-markdown ./export ./archive
Or create a .env file in the project root (never commit secrets):
CONVERTER_REDACT_PII=false
CONVERTER_INCLUDE_THINKING=false
CONVERTER_DEDUPLICATE_BY_HASH=true
CONVERTER_MAX_FILENAME_LENGTH=200
The converter loads .env automatically on startup.
Configuration reference¶
| Field | Env var | CLI flag | Default | Description |
|---|---|---|---|---|
input_dir |
CONVERTER_INPUT_DIR |
positional | ./export |
Path to export directory or ZIP |
output_dir |
CONVERTER_OUTPUT_DIR |
positional | ./archive |
Path to output directory |
redact_pii |
CONVERTER_REDACT_PII |
--redact-pii / --no-redact-pii |
true |
Redact email, phone, birth year |
include_thinking |
CONVERTER_INCLUDE_THINKING |
--include-thinking |
false |
Include thinking/reasoning blocks |
deduplicate_by_hash |
CONVERTER_DEDUPLICATE_BY_HASH |
--deduplicate / --no-deduplicate |
true |
SHA-256 dedup for media |
max_filename_length |
CONVERTER_MAX_FILENAME_LENGTH |
— | 200 |
Maximum output filename length |
Common configurations¶
Archive with full metadata (no redaction)¶
Include o-series thinking blocks¶
Disable deduplication¶
Keep all files as separate copies:
Next steps¶
- Environment variables reference — complete variable listing
- CLI reference — all flags and exit codes
- Troubleshooting — common issues and fixes