Skip to main content

Watch for errors streaming from ghosttrap.io

Project description

ghosttrap-cli

The developer-side listener for ghosttrap. Connects errors from remote servers to Claude Code in real time.

Works with any Python app. Django and Celery get deep integration (middleware, app config, task failure hooks). Flask and other frameworks work via Python's logging and excepthook.

Setup

Requires the GitHub CLI (gh) and Claude Code.

pip install ghosttrap-cli
cd ~/your-project
ghosttrap setup

Then in Claude Code:

/ghosttrap

That's it. setup authenticates via gh, claims the repo, and installs a Claude Code skill. The /ghosttrap skill handles everything else — it installs the SDK into your app, wires in the error hooks, and starts monitoring.

What happens next

The skill file tells Claude Code to run ghosttrap peek in the background. Peek opens a WebSocket to ghosttrap.io and waits. When a production error arrives, Claude sees the full traceback — exception type, message, file, line, function — and starts fixing.

After fixing, Claude restarts peek and waits for the next one. Errors become a real-time stream that your AI agent dispatches automatically.

The SDK

Your app needs ghosttrap-sdk to report errors. The Claude Code skill handles the integration automatically — it installs the SDK, wires it into your app, and adds Django/Celery hooks if applicable. You shouldn't need to touch the SDK manually.

Commands

Command What it does
ghosttrap setup Claim a repo, install the Claude Code skill
ghosttrap peek Wait for the next error, print it, exit
ghosttrap peek --clear Skip outstanding errors, then wait for the next one
ghosttrap watch Stream all errors continuously
ghosttrap clear Skip all outstanding errors

How it works

  • Setup authenticates with GitHub to prove you own the repo, then saves a token locally
  • Peek and watch connect to ghosttrap.io using that token — no GitHub auth needed after setup
  • Errors that arrive while you're offline are replayed on next connect (cursor-based, no duplicates)
  • Local state is stored in ~/.ghosttrap/config.json

Requirements

  • Python 3.10+
  • GitHub CLI (gh) — used for authentication during setup
  • Claude Code — the AI agent that fixes your errors
  • macOS or Linux (Windows is untested)

Privacy

Error data (tracebacks, exception messages, file paths) is routed through ghosttrap.io. The server is not open source yet — if there's demand for self-hosting, we'll open it up. Your GitHub token is used only during setup to verify repo ownership; it's never stored on the server. After setup, all communication uses a repo-specific token that grants access only to that repo's error stream — it cannot access your GitHub account.

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

ghosttrap_cli-0.3.7.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

ghosttrap_cli-0.3.7-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file ghosttrap_cli-0.3.7.tar.gz.

File metadata

  • Download URL: ghosttrap_cli-0.3.7.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ghosttrap_cli-0.3.7.tar.gz
Algorithm Hash digest
SHA256 27bc45f999083ee98ba10a931a5794a9840f1a70fbee5d0075fa909031ab0432
MD5 dcf95af37d45ebeb1da383391b26d480
BLAKE2b-256 c895a7aed3bf870aac8c33e07584d10ca167a57f75e25f32ea7a0d4a8bb54f69

See more details on using hashes here.

File details

Details for the file ghosttrap_cli-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: ghosttrap_cli-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ghosttrap_cli-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bf04361fcc2562bd9e1fea5eac690a9e4fabff30478f2915843c46d77bde5302
MD5 c80351571c438d86f6651559db86bd4a
BLAKE2b-256 f82d7f154e1820ada8f0c8aeb391583edf5eaf30f19b17111e4a3f566e6d5f40

See more details on using hashes here.

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