Skip to main content

The Watcher - An agentic system troubleshooting tool powered by Claude

Project description

Uatu

Your AI partner for system operations and troubleshooting.

autu-demo

Core capabilities:

  • Interactive chat: Conversational troubleshooting with your system
  • Stdin mode: Pipe logs and data for instant AI analysis
  • Security-first: Granular command approval and allowlist system
  • Intelligent analysis: Connect CPU spikes, memory leaks, and process behavior

Tested on 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 Mode (Default)

Start a conversational troubleshooting session:

# Default mode
uatu

# Allow bash commands with approval prompts
UATU_READ_ONLY=false uatu

Ask questions naturally and get AI-powered system analysis:

  • "What's causing high CPU usage?"
  • "Why is my server running slowly?"
  • "Investigate recent memory issues"
  • "What's listening on port 8080?"

Security: Bash commands require user approval. Use UATU_READ_ONLY=true for read-only mode (MCP tools only).

Stdin Mode (One-Shot Analysis)

Pipe system data directly for instant troubleshooting:

# Analyze application logs
cat /var/log/app.log | uatu "find errors and suggest fixes"

# Investigate crashed process (Linux)
journalctl -u myservice --since "1 hour ago" | uatu "why did this crash?"

# Debug high memory usage
ps aux | head -20 | uatu "diagnose memory issues"

# Network troubleshooting
lsof -i -P -n | uatu "find port conflicts"

For automated monitoring/scripts:

# Read-only mode (safest for automation)
UATU_READ_ONLY=true tail -100 /var/log/syslog | uatu "check for issues"

# Trust allowlist (requires pre-approved commands)
UATU_REQUIRE_APPROVAL=false dmesg | uatu "check hardware errors"

Workflow for scripts:

  1. Run uatu interactively first
  2. Approve diagnostic commands with "Always allow"
  3. Use UATU_REQUIRE_APPROVAL=false in scripts to trust allowlist

Configuration

Create .env with options:

# Required
ANTHROPIC_API_KEY=your_key

# Optional
UATU_MODEL=claude-sonnet-4-5-20250929  # Claude model to use
UATU_READ_ONLY=true                     # Agent can only read, not modify system
UATU_REQUIRE_APPROVAL=true              # Require approval for risky actions
UATU_ALLOW_NETWORK=false                # Block network commands (curl, wget, etc.)

Security Features

Command Approval System

All 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 Logging

All security decisions are logged:

# 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 Management

View and manage approved commands:

# View allowlist
cat ~/.config/uatu/allowlist.json

# Interactive chat commands (with tab completion)
/allowlist                              # Show approved commands
/allowlist add <command>                # Add command to allowlist
/allowlist remove <pattern>             # Remove pattern from allowlist
/allowlist clear                        # Clear all entries

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.

Acknowledgments

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

uatu-0.1.8.tar.gz (7.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uatu-0.1.8-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file uatu-0.1.8.tar.gz.

File metadata

  • Download URL: uatu-0.1.8.tar.gz
  • Upload date:
  • Size: 7.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uatu-0.1.8.tar.gz
Algorithm Hash digest
SHA256 963de94f2bbd10f578499f7b539e111b65b4f4c8308659869c744f694c4c1623
MD5 c022cbc7a23d1cf1c068903596179be7
BLAKE2b-256 8359ad39280665f66de01acf82b5dae0ec102a1302269e361d3a4c804544de97

See more details on using hashes here.

Provenance

The following attestation bundles were made for uatu-0.1.8.tar.gz:

Publisher: publish.yml on fractalops/uatu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uatu-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: uatu-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uatu-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3b880b317fe45461f4c5b705bc4ee335458667a2678fa42e3d7408a57752f8f2
MD5 7051d177321e678c42b4176aefa88d60
BLAKE2b-256 3a14b5a18e60da9aaab3f51f80a483fc9dbfd4e0ea03c9fce8adb95d668ab260

See more details on using hashes here.

Provenance

The following attestation bundles were made for uatu-0.1.8-py3-none-any.whl:

Publisher: publish.yml on fractalops/uatu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page