Skip to main content

Scan your LLM chat exports for personal information

Project description

looselips

Loose Lips Might Sink Ships

Scan your ChatGPT and Claude chat exports for personal information you might not want sitting in the cloud.

Install

pip install looselips

Basic usage

  1. Export your data (both services email you a download link):
    • ChatGPT: Settings -> Data controls -> Export.
    • Claude: Settings -> Privacy -> Export Data.
  2. Create a looselips.toml config defining what to look for (see below).
  3. Run:
looselips --config looselips.toml export.zip

The format (ChatGPT vs Claude) is auto-detected. Accepts .zip exports or raw conversations.json files from either service.

Config file

Define your matchers in a looselips.toml. See examples/example_config.toml for a full example with regex and LLM matchers.

[[matcher]]
type = "regex"
category = "My Phone"
pattern = '212.?867.?5309'

[[matcher]]
type = "regex"
category = "Home Address"
pattern = '(?i)742\s+Evergreen\s+Terrace'

Patterns use the Python re module. Inline flags like (?i) for case-insensitive, (?s) for dotall, and (?x) for verbose mode (comments and ignored whitespace) work in the pattern string itself.

LLM matchers

For things regex can't catch, add LLM matchers to your config. Each one runs a separate inference pass per conversation chunk, so prefer a few focused matchers over many broad ones.

model = "ollama/qwen3:32b"

[[matcher]]
type = "llm"
name = "Employment & Financial"
prompt = "Find employment and financial information: company names, job titles, salary figures, stock grants."

[[matcher]]
type = "llm"
name = "Medical & Health"
prompt = "Find medical and health information: conditions, medications, doctor names."

You can override the model per-matcher with the model key.

Choosing a model

The model field in your config is a LiteLLM model string in the format provider/model-name. For cloud providers, set the standard API key environment variable. For Ollama, no key is needed.

Provider Example model string Environment variable
Ollama ollama/qwen3:32b OLLAMA_API_BASE (optional)
OpenAI openai/gpt-5.2 OPENAI_API_KEY
Anthropic anthropic/claude-sonnet-4-5-20250929 ANTHROPIC_API_KEY

--model on the command line overrides the config file. These are just a few examples; LiteLLM supports many more providers, each with its own environment variable for authentication.

For local/private scanning, Ollama keeps everything on your machine. Install and start it separately (ollama serve), then pull a model (ollama pull qwen3:32b). We've seen good results with ollama/qwen3:32b, which runs on consumer GPUs (needs ~20GB VRAM).

Benchmarking models

The looselips-bench command runs your matchers against built-in labeled test conversations and produces an HTML report comparing models. Use it to evaluate whether a model is accurate enough before running a full scan.

# Benchmark a model
looselips-bench --backend local --model ollama/qwen3:32b -c looselips.toml

# Compare two models (results accumulate in a SQLite DB between runs)
looselips-bench --backend local --model ollama/qwen3:32b -c looselips.toml
looselips-bench --backend local --model ollama/qwen3:8b -c looselips.toml

# Re-render the report from cached results without re-running inference
looselips-bench --report-only --db bench_report.db -o bench_report.html

Results are saved incrementally, so you can interrupt and resume. The report shows accuracy, recall, and per-testcase breakdowns for each model.

Scan output

The scan produces a self-contained HTML report. Default path is <input>_report.html; override with --output:

looselips --config looselips.toml --output=report.html export.zip

Each flagged conversation links directly to chatgpt.com or claude.ai so you can review or delete it in one click. Click a conversation to expand it and see each match highlighted in context.

Everything runs locally. No conversation data leaves your machine unless you use a cloud LLM model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

looselips-0.2.0.tar.gz (223.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

looselips-0.2.0-py3-none-any.whl (250.0 kB view details)

Uploaded Python 3

File details

Details for the file looselips-0.2.0.tar.gz.

File metadata

  • Download URL: looselips-0.2.0.tar.gz
  • Upload date:
  • Size: 223.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for looselips-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2ab31b5fcd22528dd9b557274d0f424d954cdae044ceb59a6194117df5107d79
MD5 67e71acda8cfece367b89cb69e4d6f4b
BLAKE2b-256 6ee0c89a741fbba5efb540a26dda70b4e07b9cf916cb2684c35b2afe94bbc5f4

See more details on using hashes here.

File details

Details for the file looselips-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: looselips-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 250.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for looselips-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 464af9cc26b9b7451acc89d52f01cc75cd5d2ca63fd0ad1cde852729514be3ac
MD5 1adbda48b1a0a5b2b1faba02de9471c7
BLAKE2b-256 5c76adb478a69c001ffb1a0d7d609f29d464ab95391522ebe70cb6141c565415

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page