AI-powered incident diagnosis for engineering teams. Pull logs and deploys, get a structured root cause in 30 seconds.
Project description
Autopsy CLI
AI-powered incident diagnosis for engineering teams. Pull production error logs and recent deploys, send them to an LLM, and get a structured root cause analysis in the terminal in under a minute. Zero-trust: your data never leaves your environment.
Install
pip install autopsy-cli # core CLI (no TUI)
pip install "autopsy-cli[tui]" # + interactive terminal UI (requires textual)
Or from source:
git clone https://github.com/zaappy/autopsy.git && cd autopsy
pip install -e ".[dev]"
Quick Start
autopsy # Launch interactive TUI (menu, then run Diagnose or Setup)
autopsy init # Or: interactive config wizard (~/.autopsy/config.yaml)
autopsy diagnose # Or: run diagnosis directly (CloudWatch + GitHub → AI → panels)
Interactive TUI — Run autopsy with no arguments to open the interactive terminal UI:
- AUTOPSY logo and tagline (AI-powered incident diagnosis • zero-trust)
- Arrow-key menu: Diagnose, Setup configuration, Validate connections, Show config, Diagnosis history (cloud, disabled)
- Shortcuts:
dDiagnose,iInit,vValidate,cConfig,qQuit,EscBack - Choosing Diagnose runs the full pipeline inside the TUI (progress steps, then 4-panel result). Errors are shown inline; press
Escto return to the menu. - Choosing Setup / Validate / Show config exits the TUI and runs the corresponding CLI command in your terminal.
Three steps: install → init → diagnose (via TUI or direct commands).
Configuration
After autopsy init, edit ~/.autopsy/config.yaml or re-run the wizard. The init wizard stores credentials in ~/.autopsy/.env — no manual env var exports needed.
| Section | Purpose |
|---|---|
| aws | CloudWatch region, log groups, time window (minutes). Uses your AWS CLI credentials. |
| github | Repo (owner/repo), branch, number of recent commits to analyze. Uses GITHUB_TOKEN. |
| ai | Provider (anthropic or openai), model, API keys. |
Credentials are loaded from ~/.autopsy/.env automatically. If you prefer env vars, export them in your shell — they take precedence over the .env file.
Security: Add ~/.autopsy/.env to .gitignore if you ever copy the config directory. Never commit credentials. If your home directory is backed up or synced (e.g. OneDrive, Time Machine, Google Drive), the .env file may be included — consider excluding ~/.autopsy/ from sync or use env vars instead.
autopsy config show # Print config (secrets masked)
autopsy config validate # Check env vars and connectivity
How It Works
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐ ┌──────────────┐
│ Config │────▶│ Data Collectors │────▶│ AI Engine │────▶│ Renderers │
│ ~/.autopsy │ │ CloudWatch │ │ (Claude / │ │ Terminal or │
│ config.yaml │ │ GitHub │ │ OpenAI) │ │ JSON │
└─────────────┘ └──────────────────┘ └─────────────┘ └──────────────┘
│ │
▼ ▼
Logs + recent commits Structured diagnosis:
(deduped, truncated) root cause, deploy, fix, timeline
- Collect — CloudWatch Logs Insights (error-level) and GitHub (last N commits + diffs).
- Reduce — Log dedup and token budget; diff filters (code files only, cap per file).
- Diagnose — Single prompt with logs + deploys; LLM returns JSON (root cause, correlated deploy, suggested fix, timeline).
- Render — Rich panels in the terminal or
--jsonfor piping.
CLI Reference
| Command | Description |
|---|---|
autopsy |
Interactive TUI — menu with Diagnose, Setup, Validate, Config (requires textual) |
autopsy init |
Interactive config wizard |
autopsy diagnose |
Run full diagnosis pipeline (same as TUI “Diagnose”) |
autopsy diagnose --json |
Output raw JSON |
autopsy diagnose --time-window 15 |
Override log window (minutes) |
autopsy diagnose --log-group /aws/lambda/foo |
Override log groups (repeatable) |
autopsy diagnose --provider openai |
Use OpenAI instead of Anthropic |
autopsy config show |
Print config (secrets masked) |
autopsy config validate |
Check credentials and connectivity |
autopsy version / autopsy --version |
CLI version, prompt version, Python version |
If textual is not installed, autopsy with no arguments prints help instead of starting the TUI.
Contributing
- Fork the repo and create a branch.
- Install dev deps:
pip install -e ".[dev]". - Run lint and tests:
ruff check . && pytest. - Open a PR against
main.
We follow the layout and conventions in the repo (collectors, AI engine, renderers, no business logic in cli.py).
License
MIT. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autopsy_cli-0.2.0.tar.gz.
File metadata
- Download URL: autopsy_cli-0.2.0.tar.gz
- Upload date:
- Size: 44.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
634464c1d01bcd08303f32623a8a12465e4ec89de98078264b8869d058a804a9
|
|
| MD5 |
df6b682e9e6e2ab5ad2cf9a3401219f8
|
|
| BLAKE2b-256 |
3485912cde815adfd8bdc2d6ad3910f0b497431c61b3ffd43ab46a8abb00592a
|
Provenance
The following attestation bundles were made for autopsy_cli-0.2.0.tar.gz:
Publisher:
ci.yml on zaappy/autopsy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autopsy_cli-0.2.0.tar.gz -
Subject digest:
634464c1d01bcd08303f32623a8a12465e4ec89de98078264b8869d058a804a9 - Sigstore transparency entry: 1061832083
- Sigstore integration time:
-
Permalink:
zaappy/autopsy@05739fcecbeff046c07df131390bcee97f86ecfa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zaappy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@05739fcecbeff046c07df131390bcee97f86ecfa -
Trigger Event:
release
-
Statement type:
File details
Details for the file autopsy_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: autopsy_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2c1aa7711e7e514574486b68782f73725307c96a1ef179209b6521f795bbf8a
|
|
| MD5 |
6bbe6d886834c20115dcf5cac24a925f
|
|
| BLAKE2b-256 |
e2d8b56dc94371ee4206e08049776f752f126f23bd1aef1ba69b77874b937702
|
Provenance
The following attestation bundles were made for autopsy_cli-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on zaappy/autopsy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
autopsy_cli-0.2.0-py3-none-any.whl -
Subject digest:
c2c1aa7711e7e514574486b68782f73725307c96a1ef179209b6521f795bbf8a - Sigstore transparency entry: 1061832094
- Sigstore integration time:
-
Permalink:
zaappy/autopsy@05739fcecbeff046c07df131390bcee97f86ecfa -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zaappy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@05739fcecbeff046c07df131390bcee97f86ecfa -
Trigger Event:
release
-
Statement type: