Files
AIChatExporter/.env.example
T

83 lines
3.7 KiB
Bash

# ============================================================
# AI Chat Exporter — Configuration
# ============================================================
# Copy this file to .env and fill in your values.
# NEVER commit .env to git. It contains secrets.
# --- ChatGPT ---
# How to get: open chatgpt.com in Chrome → F12 → Application tab
# → Cookies → https://chatgpt.com → find the two cookie chunks:
# __Secure-next-auth.session-token.0 (starts with "eyJ") → CHATGPT_SESSION_TOKEN
# __Secure-next-auth.session-token.1 (the remainder) → CHATGPT_SESSION_TOKEN_1
# Token type: JWE. Typically valid for ~7 days.
CHATGPT_SESSION_TOKEN=
CHATGPT_SESSION_TOKEN_1=
# ChatGPT Projects (optional): comma-separated list of project gizmo IDs.
# Project conversations are NOT included in the default /conversations listing.
# How to find: open chatgpt.com → click a Project → look at the browser URL:
# https://chatgpt.com/g/g-p-<ID>-<slug>/project → copy "g-p-<ID>"
# Example: CHATGPT_PROJECT_IDS=g-p-68c2b2b3037c8191890036fb4ae3ed9f,g-p-anotherproject
CHATGPT_PROJECT_IDS=
# --- Claude ---
# How to get: open claude.ai in Chrome → F12 → Application tab
# → Cookies → https://claude.ai → find "sessionKey" → copy Value
# Token type: opaque string. Typically valid for ~30 days.
CLAUDE_SESSION_KEY=
# --- Output ---
# Where exported Markdown files are written (default: ./exports)
EXPORT_DIR=./exports
# Output folder structure. Options:
# provider/project/year (default) → exports/claude/my-project/2024/file.md
# provider/project → exports/claude/my-project/file.md
# provider/year → exports/claude/2024/file.md (ignores projects)
OUTPUT_STRUCTURE=provider/project/year
# What to do with content that was invisible in the provider's web UI
# (file-retrieval tool dumps, hidden context like Custom Instructions).
# These dumps can be 90% of a conversation's bytes. Options:
# placeholder (default) → one-line placeholder with tool name and size
# full → keep everything (pre-v0.6.0 behavior)
# omit → drop entirely (still counted in the run summary)
EXPORTER_HIDDEN_CONTENT=placeholder
# Download conversation assets (images, audio) next to the Markdown, into a
# media/ folder, and inline them. Options:
# images (default) → images only
# all → also audio/voice clips and other files
# off → keep text placeholders, download nothing
# Downloaded media is uploaded to Joplin as resources on the next `joplin` run.
EXPORTER_DOWNLOAD_MEDIA=images
# Cap how many conversations are downloaded per export run (per provider).
# Runs are resumable — a capped run continues where it stopped next time.
# Keeps big backfills from looking like scraper traffic. Unset = unlimited.
#MAX_CONVERSATIONS_PER_RUN=25
# Seconds between consecutive API requests (small random jitter is added).
# Default 1.0; set 0 to disable pacing.
#REQUEST_DELAY=1.0
# --- Joplin ---
# Automate importing exported conversations into Joplin as notes.
# Requires Joplin desktop running with the Web Clipper service enabled.
# How to get the token:
# Joplin → Tools → Options → Web Clipper → copy "Authorization token"
JOPLIN_API_TOKEN=
# API URL (default port is 41184; change only if you've customised it)
JOPLIN_API_URL=http://localhost:41184
# Request timeout in seconds (default: 30). Increase if Joplin times out on
# large conversations. Example: JOPLIN_REQUEST_TIMEOUT=60
# JOPLIN_REQUEST_TIMEOUT=30
# --- Cache ---
# Where the sync manifest is stored (default: ./cache, inside the install directory)
CACHE_DIR=./cache
# --- Logging ---
# Log file path. Set to "none" to disable file logging.
LOG_FILE=./cache/logs/exporter.log