{"id":46231594,"url":"https://github.com/beyteflow/errlens","last_synced_at":"2026-03-03T18:00:58.815Z","repository":{"id":340805020,"uuid":"1166818164","full_name":"BeyteFlow/errlens","owner":"BeyteFlow","description":"A lightweight CLI that explains JavaScript/Node.js errors in plain English and suggests fixes.","archived":false,"fork":false,"pushed_at":"2026-02-26T18:12:03.000Z","size":1308,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-26T21:46:13.706Z","etag":null,"topics":["cli","javascript","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BeyteFlow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T16:34:57.000Z","updated_at":"2026-02-26T18:12:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/BeyteFlow/errlens","commit_stats":null,"previous_names":["beyteflow/errlens"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/BeyteFlow/errlens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyteFlow%2Ferrlens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyteFlow%2Ferrlens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyteFlow%2Ferrlens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyteFlow%2Ferrlens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeyteFlow","download_url":"https://codeload.github.com/BeyteFlow/errlens/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeyteFlow%2Ferrlens/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30053980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T17:46:22.538Z","status":"ssl_error","status_checked_at":"2026-03-03T17:46:22.036Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","javascript","nodejs"],"created_at":"2026-03-03T18:00:54.221Z","updated_at":"2026-03-03T18:00:58.809Z","avatar_url":"https://github.com/BeyteFlow.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ErrLens 🔍  \n\u003e **Translate cryptic JavaScript errors into human-readable solutions instantly.**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/errlens.png\" width=\"500\"\u003e\n\u003c/p\u003e\n\u003c/br\u003e\n\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003c!-- GitHub Badges --\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/BeyteFlow/errlens?style=for-the-badge\" alt=\"GitHub stars\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/BeyteFlow/errlens?style=for-the-badge\" alt=\"GitHub forks\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/BeyteFlow/errlens?style=for-the-badge\" alt=\"GitHub issues\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/BeyteFlow/errlens?style=for-the-badge\" alt=\"GitHub license\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues-pr/BeyteFlow/errlens?style=for-the-badge\" alt=\"Open PRs\"\u003e\n  \n  \u003c!-- npm Badges --\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/errlens?style=for-the-badge\" alt=\"npm version\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/errlens?style=for-the-badge\" alt=\"npm downloads\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/tag/BeyteFlow/errlens?style=for-the-badge\" alt=\"Git tag version\"\u003e\n  \u003cimg src=\"https://img.shields.io/node/v/errlens?style=for-the-badge\" alt=\"Node.js version\"\u003e\n\u003c/p\u003e\n**ErrLens** is a professional-grade CLI utility designed to eliminate developer frustration. It intercepts Node.js crashes, analyzes stack traces, and delivers plain-English explanations with actionable fixes—directly in your terminal.\n\n---\n\u003c/br\u003e\n\u003c/br\u003e\n\u003c/br\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/terminal.png\" width=\"800\"\u003e\n\u003c/p\u003e\n\u003c/br\u003e\n\u003c/br\u003e\n\n## 🌟 Key Features\n\n- 🚀 **Instant Diagnostics** – No more context-switching to Google or StackOverflow.  \n- 🔄 **Live Monitoring** – Catch errors in real-time using the `errlens run` command.  \n- 🧠 **Fuzzy Logic Engine** – Matches messy stack traces and typos using `Fuse.js`.  \n- 🎨 **Beautiful UI** – High-visibility terminal output powered by `boxen` and `chalk`.  \n- 🤖 **CI/CD Ready** – Export raw data via `--json` for automated error reporting.  \n\n---\n\n## 📦 Installation\n\nInstall globally via npm to use the `errlens` command anywhere in your terminal:\n\n```bash\nnpm install -g errlens\n```\n\n---\n\n## 🛠 Usage\n\n### 1️⃣ Automatic Monitoring (The \"Pro\" Way)\n\nRun your script through ErrLens. If it crashes, ErrLens intercepts the error and explains the fix before the process exits.\n\n```bash\nerrlens run your-app.js\n```\n\n---\n\n### 2️⃣ Manual Analysis\n\nFound a weird error in your logs? Just paste the message:\n\n```bash\nerrlens \"TypeError: Cannot read properties of undefined\"\n```\n\n---\n\n### 3️⃣ Pipeline Integration\n\nGet machine-readable results for your own tooling or automated reports:\n\n```bash\nerrlens \"is not a function\" --json\n```\n\nRun a script and write the JSON report directly to a file in CI:\n\n```bash\nerrlens run test.js --json \u003e ci-report.json\n```\n\nIn `--json` mode, ErrLens prints only JSON (no spinner, colors, or terminal boxes).\n\nExample response from `run`:\n\n```json\n{\n  \"code\": 0,\n  \"count\": 0,\n  \"matches\": []\n}\n```\n\nExample response from `analyze \u003cerrorString\u003e` (match found):\n\n```json\n{\n  \"code\": 1,\n  \"count\": 1,\n  \"matches\": [\n    {\n      \"name\": \"TypeError: Cannot read properties of undefined\",\n      \"match\": \"Cannot read properties of undefined\",\n      \"explanation\": \"You are trying to access a property on a variable that is currently empty.\",\n      \"why\": \"The variable wasn't initialized, or an API call hasn't finished yet.\",\n      \"fixes\": [\n        \"Use optional chaining: user?.name\",\n        \"Set a default value: data || []\"\n      ],\n      \"example\": \"const name = user?.name || 'Guest';\"\n    }\n  ]\n}\n```\n\nExit codes (useful for CI):\n\n- `run \u003cfile\u003e` exits with the child process exit code.\n- `analyze \u003cerrorString\u003e` exits with `1` when matches are found (intentional, so CI can fail when known errors are detected), otherwise `0`.\n\nThis follows Unix conventions where `0` means success and non-zero means failure. If you prefer success-on-detection in CI, invert the check in your pipeline logic (for example, treat exit code `1` from `analyze \u003cerrorString\u003e` as a pass condition).\n\n---\n\n## 🧠 System Architecture\n\nErrLens operates on a three-stage intelligent pipeline to turn confusion into clarity:\n\n| Phase          | Component       | Description |\n|---------------|----------------|-------------|\n| Interception  | `auto.js`      | Hooks into the `uncaughtException` event via a preload script. |\n| Matching      | `matcher.js`   | Uses fuzzy search against `database.json` to find the root cause. |\n| Formatting    | `formatter.js` | Wraps the diagnosis in a clean, color-coded terminal interface. |\n\n---\n\n## 📁 Project Structure\n\n```\nerrlens/\n├── bin/index.js       # CLI Entry point \u0026 Command routing\n├── lib/\n│   ├── matcher.js     # Fuzzy search \u0026 Logic engine\n│   ├── formatter.js   # UI \u0026 Terminal styling\n│   ├── auto.js        # Automation \u0026 Error interception\n│   └── database.json  # The \"Knowledge Base\" (Dictionary)\n├── package.json       # Dependencies \u0026 Metadata\n└── README.md          # Documentation\n```\n\n---\n\n## 🤝 Contributing\n\nWe are building the world's most comprehensive dictionary of JavaScript errors, and we need your help!\n\n1. Fork the repository.  \n2. Add a new error entry to `lib/database.json`.  \n3. Submit a Pull Request.  \n\n💡 **Tip:** Every error you add helps another developer save valuable time. Join the mission!\n\n---\n\n## 📝 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built with ❤️ by \u003cb\u003eBeyteFlow\u003c/b\u003e\u003cbr\u003e\n  \u003ci\u003eMaking the terminal a friendlier place, one error at a time.\u003c/i\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyteflow%2Ferrlens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyteflow%2Ferrlens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyteflow%2Ferrlens/lists"}