Skip to main content

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_chat/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.

LLM calls run one at a time unless you pass --jobs N. Set it at or a little above the server's own parallelism; for Ollama that means starting it with OLLAMA_NUM_PARALLEL=N, otherwise the extra calls just queue.

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_chat/qwen3:32b OLLAMA_API_BASE (optional)
OpenAI openai/gpt-5.2 OPENAI_API_KEY
Anthropic anthropic/claude-sonnet-4-5-20250929 ANTHROPIC_API_KEY

For Ollama, prefer the ollama_chat/ prefix to ollama/. It uses Ollama's chat endpoint, which passes the scanner instructions to the model as a system message; ollama/ uses the generate endpoint, where they arrive flattened into a single prompt with the conversation.

--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_chat/qwen3:32b, which runs on consumer GPUs (needs ~20GB VRAM).

looselips asks Ollama for a 16k-token context window on every request, so budget VRAM for that. Ollama's own default depends on available VRAM and is 4096 tokens without a GPU, which silently truncates long conversations.

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_chat/qwen3:32b -c looselips.toml

# Compare two models (results accumulate in a SQLite DB between runs)
looselips-bench --backend local --model ollama_chat/qwen3:32b -c looselips.toml
looselips-bench --backend local --model ollama_chat/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.

Metadata

Release files for looselips 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for looselips 0.3.0
File Size Uploaded Provenance Actions
looselips-0.3.0.tar.gz 229.0 kB Without provenance Details for looselips-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for looselips 0.3.0
File Interpreter ABI Platform Actions
looselips-0.3.0-py3-none-any.whl Python 3 none any Details for looselips-0.3.0-py3-none-any.whl

Total release size: 482.7 kB

Release files / looselips-0.3.0.tar.gz

Download URL looselips-0.3.0.tar.gz
Size 229.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2cd6846e781066213736f8aa83e6e1b88768d2d5cdcabdcd8b7873f43f73e1bc
BLAKE2b-256 checksum
How to use checksums
1cc8bc98d94756943e9e721e0641f1e851ffbb9f2e8d9b627e0f12d55f255155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / looselips-0.3.0-py3-none-any.whl

Download URL looselips-0.3.0-py3-none-any.whl
Size 253.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa896c53ba49954428d8f0802de610da0bc8074d97cb5c29a4231f87cebd6c65
BLAKE2b-256 checksum
How to use checksums
85b591cf234c600d8202c5238d8f5e23ac623a78f17207fafb417cbc4e7d16d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for looselips 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page