Dataclaw: Taking Back Your Data from AI Models

The Problem

So, you’ve been chatting with AI models like Claude Code or Codex, getting them to write your scripts, debug your code, and maybe even naming your variables. But here’s the kicker: while you’re feeding them your data and ideas, they’re walking away with it. Anthropic, OpenAI, you name it—they’re happy to hoard your input for their training sets, but make it painfully hard for you to extract your own data. Enter dataclaw, a Python tool that lets you take control of your AI session logs, clean them up, and publish them as structured datasets to Hugging Face with a single command. It’s part data pipeline, part middle finger to the closed-data playbook.

What This Does

dataclaw is a CLI-based tool designed to turn your AI session logs into datasets you own. The main entry point is dataclaw/cli.py, which powers commands for setup, configuration, data processing, and publishing. It’s smart enough to parse logs, redact sensitive info (using dataclaw/anonymizer.py), and even handle custom user configs (dataclaw/config.py). The pyproject.toml handles dependencies, and CI/CD is baked in via GitHub Actions (.github/workflows/).

The process is deliberately step-by-step to ensure you don’t accidentally leak your secrets. First, you run dataclaw prep to set up the environment. Then, you configure your scope (dataclaw config --source) and pick which folders to exclude (dataclaw config --exclude). Once that’s done, you export the data locally for review (dataclaw export --no-push), confirm any redactions, and only then publish to Hugging Face (dataclaw export --publish-attestation). The guardrails are strict—this thing is built to err on the side of caution.

Real-World Use

Let’s say you’ve been using Claude Code to prototype a new app. Over weeks, you’ve racked up a ton of conversations with useful snippets, but now you want to make a public dataset documenting AI-human collaboration. dataclaw lets you: Install it: pip install dataclaw (or clone it if you’re old-school). Configure it to pull Claude logs: dataclaw config --source claude. Exclude anything sensitive: dataclaw config --exclude "private-projects,scratch". Review the export locally: dataclaw export --no-push. Confirm redactions and publish: dataclaw confirm followed by dataclaw export --publish-attestation.

All without exposing your personal or client data, thanks to the built-in anonymization and review workflows.

The Bottom Line

dataclaw is a niche tool for a niche problem, but it’s damn good at what it does. The CLI is clear, the steps are well-documented, and the safety features are robust (in the good way). That said, it’s overkill if all you want is a quick-and-dirty log dump. But if you care about controlling your data and want to contribute to an open, distributed dataset, dataclaw is worth a look. Just be ready to jump through a lot of “did you really mean to do that?” hoops along the way.