redshift
Redshift is a Python debugger with an LLM inside. When a breakpoint is hit, you can ask questions like:
- "Why is this function returning null?"
- "How many items in
arrayare strings?" - "Which condition made the loop break?"
An agent will navigate the call stack, inspect variables, and look at your code to figure out an answer. Think of this as vibe debugging. You can diagnose issues just by talking.
Features
Redshift is an extension of Python's native debugger, pdb. It can do everything pdb does, plus a few new commands:
ask PROMPT
Ask a question about the state of your program. An agent will operate the debugger to investigate and figure out an answer. Save yourself the busywork of digging into the stack trace.
fix [PROMPT]
(Coming soon) When an exception is thrown, run this to find the root cause of the issue and get a fix. The output will be a patch that you can apply to your codebase. You can provide an optional prompt describing the issue.
run PROMPT
(Coming soon) Generates and executes code in the context of the current scope. It'll run in an interpreter whose namespace is a direct copy of the program state at the current line of code. Generated code will not be executed without your approval.
Installation
> pip install redshift-cli
After installing, you need connect to Anthropic. Get an API key here, then add it to your environment:
> export ANTHROPIC_API_KEY="..."
You can also use OpenAI or other providers, including local ones like ollama. Redshift wraps LiteLLM, which supports over 100 models.
Note: This is still experimental and likely to be buggy. Stable release coming very soon.
Usage
You can set a breakpoint the same way you would in pdb:
import redshift
def foo():
# ...
redshift.set_trace()
# ...
Alternatively, you can avoid the import by overriding the built-in breakpoint function:
export PYTHONBREAKPOINT=redshift.set_trace
->
def foo():
# ...
breakpoint()
# ...
Configuration
You can customize Redshift using some environment variables:
REDSHIFT_AGENT_MODEL
LLM that's used by the agent for tool-calling. Default is "anthropic/claude-sonnet-4-20250514". Use LiteLLM names to identify the model (e.g. "openai/gpt-4o").
REDSHIFT_RESPONSE_MODEL
LLM that's used to generate the final response. This is used after the agent has collected context. Default is "anthropic/claude-sonnet-4-20250514".
REDSHIFT_MAX_ITERS
Number of tool calls the agent is allowed to make before generating a response. Default is 25.
REDSHIFT_HIDE_EXTERNAL_FRAMES
Toggles whether or not stack frames from external libraries are ignored by Redshift. Default is True, which means Redshift only cares about the frames in your codebase.
Metadata
Release files for redshift-cli 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| redshift_cli-1.0.1.tar.gz | 25.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redshift_cli-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.6 kB
Release files / redshift_cli-1.0.1.tar.gz
| Download URL | redshift_cli-1.0.1.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cc0d73fd807490c1c2fc3d84731a6f1f1f461729dae710f1e03b532d794a962
|
|
BLAKE2b-256 checksum How to use checksums |
c2f3f32c00405a0ba36e98ed34eb26fffea79f419669866241b549f8d6e5e753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|
Release files / redshift_cli-1.0.1-py3-none-any.whl
| Download URL | redshift_cli-1.0.1-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7e238353a1d3ad2c64baaf099834700d77ee9857d33505643fd02b2bd5e78b6
|
|
BLAKE2b-256 checksum How to use checksums |
611d4fc240e224cfc9e4eeb383357a9d8a4ce79cdbbc865c4480ab67031929e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.18
|