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.1.tar.gz (223.3 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.1-py3-none-any.whl (250.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: looselips-0.2.1.tar.gz
  • Upload date:
  • Size: 223.3 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.1.tar.gz
Algorithm Hash digest
SHA256 8a75666413280583d7c84e1d023b0639ae9c6753ca073a5fac1513d46ac69287
MD5 897438eaccf94f1d2c2f784354f7d90d
BLAKE2b-256 3613be9230139ce42b010d13072ebfbabae312373feb497a11470fffe76895fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: looselips-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4de6c017cd86050d1935a814836d68392c49ac961c5e7e358dc93bf58d77e097
MD5 1c4a55ecbb25c6cbfa0586058f8d8a0b
BLAKE2b-256 b10692c8ee48a8a634c9253b6df667903bd75946947a9409394a125802501687

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