Skip to content

TheChyeahhh/devexplain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devexplain

Explain any regex, SQL, .env, cron expression, JSON, or YAML instantly with AI.

One tool. Every format. No Googling scattered explainer sites again.


What it does

Pass in any developer syntax and get a plain English explanation — broken down piece by piece, with examples, use cases, and gotchas.

Auto-detects the type. No flags needed.


Supported types

Type Example input
Regular Expression /^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i
SQL Query SELECT name, COUNT(*) FROM users GROUP BY name
.env variable DATABASE_URL=postgresql://user:pass@localhost/db
Cron expression 0 */6 * * *
JSON {"status": 200, "data": [], "meta": {"page": 1}}
YAML env: production\ndebug: false\nport: 8080
Code snippet Any other code

Demo

$ devexplain "0 */6 * * *"
──────────────────────────── devexplain ─────────────────────────────
  Detected type: Cron Expression
  Backend:       claude

╭──────────────────── Cron Expression Explained ─────────────────────╮
│                                                                     │
│  What it is                                                         │
│  A cron schedule that runs a job every 6 hours.                     │
│                                                                     │
│  Plain English Explanation                                          │
│  This job fires at midnight, 6am, noon, and 6pm every day.         │
│                                                                     │
│  Breakdown                                                          │
│  • 0        — minute 0 (on the hour)                                │
│  • */6      — every 6 hours (0, 6, 12, 18)                         │
│  • *        — every day of the month                                │
│  • *        — every month                                           │
│  • *        — every day of the week                                 │
│                                                                     │
│  Next 3 run times                                                   │
│  00:00, 06:00, 12:00 (today), then repeats daily                    │
│                                                                     │
│  Watch Out For                                                      │
│  Cron uses server local time — if your server is UTC, midnight      │
│  UTC may not be midnight in your timezone.                          │
│                                                                     │
╰─────────────────────────────────────────────────────────────────────╯

Installation

Mac / Linux:

git clone https://github.com/TheChyeahhh/devexplain.git
cd devexplain
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Windows:

git clone https://github.com/TheChyeahhh/devexplain.git
cd devexplain
python -m venv .venv
.venv\Scripts\activate
pip install -e .

Setup

cp .env.example .env

Open .env and add your key:

ANTHROPIC_API_KEY=sk-ant-your-key-here
OPENAI_API_KEY=sk-your-key-here
AI_BACKEND=claude

Usage

# Regex
devexplain '/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/i'

# SQL
devexplain "SELECT u.name, COUNT(o.id) FROM users u LEFT JOIN orders o ON u.id = o.user_id GROUP BY u.id"

# .env variable
devexplain "DATABASE_URL=postgresql://user:pass@localhost:5432/mydb"

# Cron expression
devexplain "*/15 9-17 * * 1-5"

# JSON
devexplain '{"token": "abc123", "expires_in": 3600, "scope": "read write"}'

# Pipe from a file
cat query.sql | devexplain
cat .env | devexplain

# Force a type if auto-detect gets it wrong
devexplain "my input" --type sql

# Use OpenAI instead of Claude
devexplain "0 * * * *" --backend openai

Requirements


Future Ideas

  • --json output for piping into other tools
  • Browser extension version
  • VS Code extension
  • Support for GraphQL queries, CSS selectors, and Docker Compose files

License

MIT

About

Explain any regex, SQL, .env, cron, JSON, or YAML instantly with AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages