Skip to main content
Tweet Audit Tool Hero Light

Clean up your Twitter history with AI

Tweet Audit Tool is a Python-based CLI that uses Google’s Gemini AI to analyze your X (Twitter) archive and identify tweets that no longer align with your professional image or personal values. Perfect for professionals who want to audit old tweets that might contain:
  • Unprofessional language or outdated opinions
  • Keywords you no longer want associated with you
  • Content that doesn’t match your current values
  • Posts that could harm your professional reputation

Installation

Get started with prerequisites and setup instructions

Quick start

Run your first tweet analysis in minutes

Configuration

Customize your deletion criteria and settings

CLI reference

Complete command-line interface documentation

How it works

The tool follows a simple three-step process:
1

Extract tweets from archive

The tool reads your X archive export and converts tweets to a structured CSV format for processing.
python src/main.py extract-tweets
2

Analyze with Gemini AI

Each tweet is evaluated against your custom criteria using Google’s Gemini AI. The AI checks for forbidden words, topics to exclude, tone requirements, and additional instructions you define.
python src/main.py analyze-tweets
3

Review and delete manually

The tool generates a CSV file with URLs of flagged tweets. You review each one and manually delete what you agree with—the tool never deletes automatically.
Safe by design: The tool only flags tweets for review. You maintain complete control and manually delete what you choose.

Key features

AI-powered analysis

Uses Google Gemini AI to intelligently evaluate tweet content against your criteria

Customizable criteria

Define forbidden words, topics to exclude, tone requirements, and custom instructions

Safe and manual

Only generates suggestions—you review and delete manually for complete control

Resume capability

Automatic checkpointing allows you to resume analysis after interruptions

Rate limiting

Built-in rate limiting respects API quotas and prevents hitting limits

Batch processing

Processes tweets in configurable batches for efficient analysis

What you need

X archive

Download your complete X (Twitter) archive (takes 24-48 hours)

Gemini API key

Free API key from Google AI Studio for AI analysis

Python 3.12+

Modern Python installation on your system
The Gemini 2.5 Flash model offers 15 requests per minute and 1,500 per day for free—enough to analyze 1,000+ tweets daily.

Output format

After analysis, you’ll receive a CSV file with flagged tweets:
tweet_url,deleted
https://x.com/username/status/1234567890,false
https://x.com/username/status/9876543210,false
Use this file to:
  1. Review each flagged tweet by visiting the URL
  2. Delete manually if you agree with the AI’s assessment
  3. Track progress by updating the deleted column to true

Security and privacy

All output files use 0o600 permissions (owner-only read/write)
API keys loaded from .env file (never committed to git)
data/ directory is gitignored to protect your personal tweets
Don’t commit your config.json if it contains sensitive criteria

Next steps

Install the tool

Set up prerequisites and install dependencies

Start analyzing

Run your first tweet analysis

Build docs developers (and LLMs) love