Metadata-Version: 2.5
Name: agentsnitch
Version: 0.1.0
Summary: What did your AI coding agents actually do? Every command Claude Code, Codex and Gemini CLI ran on your machine, with force-pushes, curl | sh, secret reads and files outside the project flagged.
Project-URL: Homepage, https://github.com/ArkaKhorchidian/agentsnitch
Project-URL: Issues, https://github.com/ArkaKhorchidian/agentsnitch/issues
Author: Arka Khorchidian
License-Expression: MIT
License-File: LICENSE
Keywords: ai-agents,audit,claude-code,cli,codex,coding-agents,devsecops,gemini-cli,llm,security
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: rich>=13
Provides-Extra: test
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# agentsnitch

**What did your AI coding agents actually do?** agentsnitch reads the session logs that Claude Code, Codex and Gemini CLI keep on your machine and shows every command they ran and every file they touched. The ones worth a second look are flagged: force-pushes, `curl | sh`, reads of your SSH keys and `.env` files, and writes outside the project.

```bash
uvx agentsnitch
```

<p align="center"><img src="https://raw.githubusercontent.com/ArkaKhorchidian/agentsnitch/main/docs/demo.gif" alt="agentsnitch demo" width="760"></p>

<sub>Demo on a month of made-up agent logs generated by <a href="docs/demo.py">docs/demo.py</a>. Run it to see what your own agents did.</sub>

You approve commands one at a time, or you turned on auto-approve weeks ago. Either way, nobody reads the transcript afterwards. agentsnitch does.

## What it flags

| | Examples |
|---|---|
| **Remote code** | `curl … \| sh`, `wget … \| bash`, `iwr … \| iex`, `eval $(curl …)` |
| **Destruction** | `rm -rf ~/`, `git push --force`, `git reset --hard`, `DROP TABLE`, `terraform destroy`, `kubectl delete`, `aws s3 rm` |
| **Secrets** | private SSH keys, `~/.aws/credentials` and other cloud credentials, `.env` files, the macOS keychain / `pass` / 1Password CLI, `gh auth token`, dumping the whole environment |
| **Data leaving** | `curl -X POST -d @file`, `scp`/`rsync` to other machines, `nc` |
| **Shipping** | `npm publish`, `twine upload`, `docker push`, `gh release create`, `gh pr merge`, deploys |
| **Your system** | `sudo`, edits to `.zshrc`/`.bashrc`, cron jobs and launch agents, files written outside the project folder |

Text that's only *inside* a script (a heredoc, `python -c "…"`) isn't counted as run. `bash -c "…"` is, because that is shell.

## Where it reads

| Agent | Logs |
|---|---|
| Claude Code | `~/.claude/projects/*/*.jsonl` (or `$CLAUDE_CONFIG_DIR`) |
| Codex CLI | `~/.codex/sessions/**/rollout-*.jsonl` (or `$CODEX_HOME`) |
| Gemini CLI | `~/.gemini/tmp/*/chats/session-*` |

Cursor keeps its history in a SQLite database, which isn't supported yet.

## Options

```
agentsnitch                     # last 30 days
agentsnitch --since 7d          # or 12h, 2026-10-01, all
agentsnitch --project storefront
agentsnitch --agent codex
agentsnitch --low               # also show low-severity things (git push, rm -rf in the project, installs)
agentsnitch --log               # every command and file action, oldest first
agentsnitch --json              # for scripts
```

## Privacy

agentsnitch only reads files on your machine and sends nothing anywhere.

## Install

```bash
uvx agentsnitch           # run without installing
pipx install agentsnitch  # or install it
```

Requires Python 3.9+. The only dependency is `rich`.

## License

MIT
