Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dai

Debug AI - A simple CLI tool that can be invoked in front of any of your normal terminal commands. When your program encounters an error, debugai will automatically prompt an AI (Claude, GPT) with the error details and provide useful debugging information. Otherwise it will just run the command as normal.

Installation

First clone the repo:

# e.g. using https
git clone https://github.com/Jjschwartz/dai.git
cd dai

Install as CLI tool

To install dai as a global CLI tool using uv:

uv tool install .
# or to reinstall
uv tool install --force .

This will install dai as a tool globally for the current user. You may need to create a new terminal session for the tool to be available.

Development setup

This project uses uv for managing installation and dependencies.

uv sync
# for development (installs additionaldev dependencies)
uv sync --dev

Usage

Simply prefix any command with dai to get AI-powered error analysis:

dai your normal command here

For example:

dai git status
dai python my_program.py
# you can even do the following (but things get weird)
dai dai python my_program.py

Normal shell syntax is supported, including pipes, redirects, and complex commands by using quotes.

dai "git status | grep 'modified'"
dai "python -c 'print(1/0)'"
# without quotes things work as normal, with each command separate
# e.g. dai will only run for the first and third command
dai which python && python --version && dai python main.py

When the command fails, dai will capture the error and provide intelligent debugging suggestions using Claude.

Setup

You'll need to set your Anthropic API key as an environment variable:

export ANTHROPIC_API_KEY='your-api-key-here'

About

Debug AI - A CLI tool that provides AI-powered error analysis for terminal commands

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages