npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

code_dweller

v1.0.2

Published

An agent that lives in codebase and catches errors with reasons and gives solutions based on the codebase architecture

Readme

code_dweller

code_dweller is an agentic AI SDK designed to identify and resolve production runtime errors in real-time. Think of it as a virtual SRE (Site Reliability Engineer) that monitors your application, triages bugs, and suggests fixes so you can keep your focus on building features.


🚀 Getting Started

Prerequisites

  • Node.js: version 20.0.0 or higher.
  • API Key: Required for initializing the Dweller agent.

Installation

npm install code_dweller

🛠️ Configuration

The agent requires specific context files to understand your codebase. You must create a .dweller/ directory in your project root with the following files:

Required Project Structure

| File Path | Purpose | Content Requirement | | :-------------------------- | :----------------- | :------------------------------------------------------ | | ./dweller/architecture.md | System Design | High-level architectural patterns used in the codebase. | | ./dweller/map.md | File Index | Full directory tree and file paths relative to root. | | ./dweller/errors.md | Knowledge Base | Documentation of known edge cases or historical bugs. |

[!CAUTION] > Important: Without these three files, the agent will lack the context necessary to navigate your codebase and may enter an infinite loop.


💻 Usage

1. Initialize the Client

import { Dweller } from "code_dweller";

const client = new Dweller("YOUR_API_KEY");

2. Identify Errors

Wrap your critical logic in try-catch blocks and pass the telemetry to the agent.

try {
  // Your application logic
} catch (error) {
  const files = [
    {
      filename: "./dweller/architecture.md",
      description: "Architectural patterns and system flow.",
    },
    {
      filename: "./dweller/map.md",
      description: "Project file structure and relative paths.",
    },
    {
      filename: "./dweller/errors.md",
      description: "Common causes of bugs in this codebase.",
    },
  ];

  await client.IdentifyError(
    "Error at payments.service.ts: High Severity", // error_message
    error, // error_value
    files, // files array
    { allowCodeRead: true } // options
  );
}

📋 Parameter Reference

IdentifyError Arguments

| Parameter | Type | Description | | :-------------- | :------- | :--------------------------------------------------------------------------- | | error_message | string | A llm friendly error information (e.g., "Failed to process Stripe webhook"). | | error_value | any | The raw error object captured in the catch block. | | files | array | An array of objects pointing to your .dweller configuration files. | | options | object | Additional configuration for agent code access behaviour. |

Mapping your codebase

In your map.md, ensure you provide clear paths relative to the root. For example:

my-project/
├── controllers/
│   ├── main_controller.js
│   └── auth_controller.js
└── services/
    └── payments.service.js

LLM-Optimized Setup

To get the best results, your .dweller/ files should be optimized for LLM tokenization.

Quick Scaffold

Run this in your terminal to create the folder and empty files:

mkdir .dweller && touch .dweller/architecture.md .dweller/map.md .dweller/errors.md


---



## 📄 License

MIT

---