errlocal
v0.3.2
Published
A CLI tool to fix runtime errors in seconds with AI & Localization.
Maintainers
Readme
Features • Quick Start • Documentation • Cloud Sync
⚡ Features
| Feature | Description | | :--- | :--- | | 🎮 Interactive UI | NEW! A beautiful terminal menu to Explain, Fix, Translate, or Sync errors without typing more commands. | | 🔧 Auto-Fix | NEW! Instantly applies AI-suggested code fixes to your files with a single click. | | 🤖 AI Analysis | Instantly detects Error Type, Confidence, coverage, and likely causes using Groq (Llama 3). | | 📄 Code Context | NEW! Reads your actual code to understand the bug's origin (file & line context). | | 🌍 Localization | Translates technical error hints into your native language (Hindi, Spanish, French, etc.) via Lingo.dev. | | ☁️ Cloud Sync | Back up your error logs to Urbackend for long-term history and analytics. | | 🧠 Progressive Hints | Reveals hints one by one to help you learn, instead of spoiling the solution immediately. |
🏗️ Architecture & Flow
🚀 Quick Start
1. Install
From your terminal, install errlocal globally:
npm install -g errlocal2. Initialize the Configuration
No need to manually mess with files! Just run the interactive setup:
errlocal initThis prompts you for your GROQ_API_KEY, LINGO_API_KEY (optional), and URBACKEND_API_KEY (optional).
3. Run
Wrap any command that's giving you trouble:
errlocal run node app.js💥 Boom! If an error occurs, errlocal pauses and shows an interactive menu:
? What would you like to do? (Use arrow keys)
❯ 💡 Explain Error
🔧 Auto-Fix
🌍 Translate
☁️ Sync to Cloud
🚪 Exit📚 Documentation
Interactive Menu
- Explain Error: Shows detailed AI analysis with progressive hints (Hint 1 -> Hint 2 -> Solution).
- Auto-Fix: If the AI is confident, it suggests a code change. Press
Enterto apply it to your file instantly! - Translate: Switch the explanation language on the fly.
- Sync: Upload the error log to your UrBackend dashboard.
CLI Commands (Legacy & Automation)
| Command | Usage | Description |
| :--- | :--- | :--- |
| Run | errlocal run <cmd> | Executes a command and enters Interactive Mode on error. |
| History | errlocal history | Fetches the last 5 errors from the cloud. |
| Solved | errlocal solved <note> | Marks the last synced error as "SOLVED". |
Flags
--lang=<code >: Target language ISO code (e.g.,hi,es,fr,de)Available in v0.1 and v0.2, but menu based in v0.3.
☁️ Cloud Sync (Urbackend)
To enable Sync, History, and Solved features, configure your Urbackend project.
- Create Project: Log in to Urbackend Dashboard.
- Get Key: Copy your Public API Key and paste it during
errlocal init. - Zero-Config Schema: That's it! The first time you sync an error log,
errlocalautomatically provisions theerror_logstable and schema inside your UrBackend project. You no longer need to configure the schema manually!
| Column | Type | Description |
| :--- | :--- | :--- |
| command | String | Executed command |
| error | String | Raw stderr output |
| hints | String | JSON array of hints |
| finalExplanation | String | Full solution JSON |
| timestamp | String | ISO Date string |
| status | String | "OPEN" or "SOLVED" |
| solution | String | User's fix note |
🤝 Contributing
We welcome contributions! Please fork the repo and submit a PR. This project is licensed under the MIT License.
