# AgentSweep

> A fully-offline CLI that finds and redacts leaked secrets in your AI coding agent's local chat history — 31 agents supported, 193 detection rules, every destructive step backed up and reversible.

Canonical page: https://www.ishannaik.com/projects/agentsweep

_Offline secret scanner for AI coding agents_

- Category: System Administration / Setups
- Client: Open-source project
- Role: Creator / Maintainer
- Year: 2025
- Live: https://pypi.org/project/agentsweep
- Source: https://github.com/Ishannaik/agent-sweep

## Overview

Every AI coding CLI stores its full conversation history as plain-text JSONL on disk — under `~/.claude/projects/` for Claude Code, `~/.codex/sessions/` for Codex, and so on. Anything you paste (an AWS key, a `.env` file, a database URL) sits there in clear text indefinitely. AgentSweep finds and redacts those secrets before a compromised package or supply-chain attack can scrape them.

It scans across 31 supported agents with 193 detection rules covering AWS, GitHub, Stripe, OpenAI, Anthropic, Google, Slack, Discord, JWTs, PEM keys, database URLs, BIP-39 seed phrases and more. Detection runs entirely on your machine — nothing is ever sent anywhere.

Redaction is designed to be safe: every destructive step is gated, backed up, and reversible with a single command. AgentSweep is written in Python, published on PyPI, and installs in one command.

## Features

- **Runs Fully Offline**: All scanning happens locally — your files and secrets never leave your machine
- **31 Agents Supported**: Claude Code, Codex, Cursor, Windsurf, Aider, Gemini CLI, Copilot and more
- **193 Detection Rules**: AWS, GitHub, Stripe, OpenAI, Anthropic, JWTs, PEM keys, DB URLs, seed phrases
- **Reversible By Design**: Every destructive step is gated, backed up, and undoable with one command
- **One-Command Install**: Published on PyPI and ready to run in seconds

## Technologies

Python 3.11+, PyPI, Regex Detection Engine, CLI / TUI

## Process

- **Requirements Analysis** (1 week): Assessed system requirements and planned the architecture
- **Installation & Configuration** (2 weeks): Set up and configured all necessary software and systems
- **Security Implementation** (1 week): Applied security best practices and hardening measures
- **Testing & Documentation** (1 week): Thoroughly tested the setup and documented all configurations

## Related projects

- [CloakBin](https://www.ishannaik.com/projects/cloakbin.md)
