The Watcher - An agentic system troubleshooting tool powered by Claude
Project description
Uatu
AI-powered system troubleshooting agent using Claude.
What it does:
- Chat with your system to diagnose issues
- Pipe logs directly for instant analysis
- Approve commands before execution with granular controls
- Connects symptoms across CPU, memory, network, and processes
Platforms:
- macOS
- Linux
Installation
Using pipx (recommended)
# Install with pipx for isolated environment
pipx install uatu
# Configure API key
echo "ANTHROPIC_API_KEY=your_key" > .env
Using pip
# Install globally or in a virtual environment
pip install uatu
# Configure API key
echo "ANTHROPIC_API_KEY=your_key" > .env
From source with uv
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/fractalops/uatu.git
cd uatu
uv sync
# Configure API key
echo "ANTHROPIC_API_KEY=your_key" > .env
Quick Start
Interactive Chat
Start a troubleshooting session:
# Read-only mode (default) - uses MCP tools, no bash
uatu
# Allow bash commands with approval prompts
UATU_READ_ONLY=false uatu
Example questions:
- "What's causing high CPU usage?"
- "Why is my server running slowly?"
- "Investigate recent memory issues"
- "What's listening on port 8080?"
Commands require approval unless allowlisted.
Stdin Mode
Pipe data for analysis:
# Read-only (default) - MCP tools only
cat /var/log/app.log | uatu "find errors"
# Enable bash commands (requires UATU_READ_ONLY=false)
UATU_READ_ONLY=false journalctl -u myservice | uatu "why did this crash?"
# Safe bash commands (ps, df, top, etc.) auto-approve from allowlist
UATU_READ_ONLY=false ps aux | uatu "diagnose memory issues"
Allowlisted commands auto-approve in stdin mode. TTY required for interactive approval prompts.
Configuration
Create .env:
# Required
ANTHROPIC_API_KEY=your_key
# Security (defaults shown)
UATU_READ_ONLY=true # true: MCP tools only, false: allow bash
UATU_REQUIRE_APPROVAL=true # Require approval before bash execution
UATU_ALLOW_NETWORK=false # Allow network access (WebFetch, WebSearch)
# Optional
UATU_MODEL=claude-sonnet-4-5-20250929 # Claude model
UATU_CONSOLE_WIDTH=80 # Terminal width (80, 0=full, None=auto)
UATU_ENABLE_SUBAGENTS=true # Specialized diagnostic agents
UATU_SHOW_TOOL_PREVIEWS=true # Show tool result previews
UATU_SHOW_STATS=true # Show session token/cost stats
Security
Command Approval
Bash commands require approval unless allowlisted:
⚠ Bash command approval required
Risk: Credential Access
⚠ Warning: This command may access SSH keys, certificates, or other credentials
ls -la ~/.ssh/
○ Allow once
○ Always allow (exact)
→ Deny
Audit Log
Security decisions are logged to ~/.config/uatu/audit.jsonl:
# View audit log (last 100 events)
uatu audit
# View recent events
uatu audit --last 20
# View specific event types
uatu audit --type bash_command_approval
# View summary statistics
uatu audit --summary
Allowlist
Manage approved commands in ~/.config/uatu/allowlist.json:
# View directly
cat ~/.config/uatu/allowlist.json
# In interactive chat (with tab completion)
/allowlist # Show approved commands
/allowlist add <command> # Add to allowlist
/allowlist remove <pattern> # Remove from allowlist
/allowlist clear # Clear all
Development
# Run tests
uv run pytest
# Lint
uv run ruff check .
# Format
uv run ruff format .
License
This project is licensed under the MIT License - see the LICENSE file for details.
Built With
- Claude Agent SDK for Python
- Rich - Terminal formatting
- Typer - CLI framework
- prompt_toolkit - Interactive input
Project details
Release history Release notifications | RSS feed
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 uatu-0.1.13.tar.gz.
File metadata
- Download URL: uatu-0.1.13.tar.gz
- Upload date:
- Size: 9.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d8808aa6357efb1b326f18264da30526f076772a458a68e07171c9da7e71eda
|
|
| MD5 |
827dcd933a9792d2461a6fedfdc66dd0
|
|
| BLAKE2b-256 |
152480e55c6ac00f387ec1542cd2141da8db68baacf76a7dbfdfb322bea98bfe
|
Provenance
The following attestation bundles were made for uatu-0.1.13.tar.gz:
Publisher:
publish.yml on fractalops/uatu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uatu-0.1.13.tar.gz -
Subject digest:
1d8808aa6357efb1b326f18264da30526f076772a458a68e07171c9da7e71eda - Sigstore transparency entry: 760549413
- Sigstore integration time:
-
Permalink:
fractalops/uatu@9b03fe975f47e63ac07c5823d8637044f584bea0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fractalops
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b03fe975f47e63ac07c5823d8637044f584bea0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file uatu-0.1.13-py3-none-any.whl.
File metadata
- Download URL: uatu-0.1.13-py3-none-any.whl
- Upload date:
- Size: 76.1 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 |
3611196efcbdf369fa5ddba74a055981c2c8127237f4d1127316439e7121d582
|
|
| MD5 |
c04fca97bf43160125d5812fd3a15363
|
|
| BLAKE2b-256 |
a9a9cedf4819237616f2a95cef31ca7a5af1b8e570f135f234cce5a539251503
|
Provenance
The following attestation bundles were made for uatu-0.1.13-py3-none-any.whl:
Publisher:
publish.yml on fractalops/uatu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uatu-0.1.13-py3-none-any.whl -
Subject digest:
3611196efcbdf369fa5ddba74a055981c2c8127237f4d1127316439e7121d582 - Sigstore transparency entry: 760549417
- Sigstore integration time:
-
Permalink:
fractalops/uatu@9b03fe975f47e63ac07c5823d8637044f584bea0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/fractalops
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b03fe975f47e63ac07c5823d8637044f584bea0 -
Trigger Event:
workflow_dispatch
-
Statement type: