debug Python with claude.ai
Project description
claude-here
debug Python with claude.ai
usage
Just
pip install claude-here
then
import claude_here
and any uncaught exceptions will automatically launch a new conversation in claude.ai pre-filled with information for Claude to help you debug the error.
To debug something that isn't causing an exception, just add
breakpoint()
where you want to debug and it will automatically launch Claude with info about the current locals to help you debug.
nice things
Some extra features to note:
- If a
breakpoint
is hit multiple times, or an uncaught exception is raised after hitting abreakpoint
, the information sent to Claude will be cumulative. - If
claude_here
detects thatwebbrowser
will use a text-based browser by default, it will instead print an OSC-8-compliant hyperlink to the terminal for you to open using a graphical browser. This is especially useful if you are debugging a remote machine.
breakpoint
breakpoint
additionally supports some optional arguments:
msg
can be set to a string that will be included in the information sent to Claude.just_gather_info=True
will gather information to send to Claude later (on an uncaught exception orbreakpoint
withoutjust_gather_info=True
) without actually launching Claude or thebase_debugger
.base_debugger
determines the debugger to call in addition to launching Claude. Defaults to the previousbreakpoint
handler, which by default ispdb.set_trace
.
environment variables
claude_here
supports some additional configuration via environment variables:
CLAUDE_HERE_PROJECT_ID
can be set to a Claude Projects UUID (https://claude.ai/project/<this-part-here-is-the-uuid>
) to launch your debugging conversations in.CLAUDE_HERE_VERBOSITY
can be set to a positive integer that will determine how much information to send to Claude; the larger the value the more info is sent to Claude. Defaults to10
.
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
File details
Details for the file claude_here-0.2.2.tar.gz
.
File metadata
- Download URL: claude_here-0.2.2.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3357f46eab71a96ccb25f303705ef9705a6428c0b288cf1dbd4f63975835eba7 |
|
MD5 | 4a0b509e370cf05faf7927d00e717dc9 |
|
BLAKE2b-256 | 93a471d5e532860bd6de8d1799b5fcbbc0128ad778f60d36a521e84eaa841aca |
File details
Details for the file claude_here-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: claude_here-0.2.2-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56824f9c85f6c69ed7faff2b90723dd8e184192466e0950fb0d530d18f417be4 |
|
MD5 | d94ed671b67c656e864ace48aa32dfae |
|
BLAKE2b-256 | 7e1d444b83b7f83b17b3523b595cb1212fcdd52358083bad170dfc7fe9b627db |