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

padavan

v2.2.0

Published

The core library for interacting with routers running Padavan firmware. Provides a programmatic API for local control via HTTP.

Downloads

64

Readme

padavan

[RU] | [EN]

A Node.js library for managing routers running Padavan firmware.

It interacts with the router via its Web Interface (HTTP), providing programmatic access to configuration, diagnostics, and firmware management functions.

Migration

Upgrading from v1? Check the Migration Guide for details on breaking changes (move from SSH to HTTP, new constructor) and removed features.

Installation

npm install padavan

Usage

import Padavan from 'padavan';

const client = new Padavan({
    credentials: {
        host: '192.168.1.1',
        username: 'admin',
        password: 'password'
    },
    logLevel: 'error'
});

// Get system status
const status = await client.getStatus();
console.log(`Uptime: ${status.uptime}`);

Configuration

The constructor accepts a config object with the following properties:

| Property | Description | | --- | --- | | credentials | Object containing connection details. | | logLevel | Logging level: 'none', 'error', 'info', 'debug'. |

Credentials Object

| Property | Description | | --- | --- | | host | Router IP address or hostname. | | username | Web interface username. | | password | Web interface password. | | repo | GitHub owner/repo for firmware updates. | | branch | GitHub branch (e.g., main). | | token | GitHub PAT for accessing Actions/Artifacts. |

API

System & Diagnostics

  • getStatus() Returns CPU load, RAM usage, uptime, and basic Wi-Fi status.
  • getLog() Fetches the complete system log.
  • exec(command) Executes a system command via the web console emulator (SystemCmd). Returns: Command output (stdout + stderr).
  • sendAction(action, payload?) Sends a low-level action to apply.cgi. Arguments: action (string, e.g., ' Reboot '), payload (data object). Returns: Server response (command output or status).
  • startReboot() Reboots the router via HTTP command.

Network & Clients

  • getDevices() Returns a list of connected clients from the ARP table and Wi-Fi driver. Properties: mac, ip, hostname, type (eth, wifi, 2.4GHz, 5GHz), rssi.
  • getHistory() Returns traffic statistics. Structure: { daily: [...], monthly: [...] }.

Wi-Fi Tools

  • startScan(band) Performs a Site Survey (scan). Band: '2.4' or '5'.
  • getBestChannel(band) Wi-Fi Doctor: Scans the environment, calculates interference scores, and recommends the optimal channel for your router.

NVRAM & Settings

  • getParams(keys?, page?) Returns NVRAM variables. Arguments:
    • keys: Specific key string or array of keys. If omitted, returns all.
    • page: If provided, parses input fields from a specific ASP page HTML instead of using nvram show.
  • setParams(params, options?) Sets NVRAM variables. Options: action_mode (e.g., ' Apply '), sid_list (Service IDs to restart), group_id, current_page.

Firmware Management

Requires GitHub credentials (repo, branch, token).

  • findFirmware(model?) Searches for firmware artifacts in the configured repository network (looks into forks).
  • getChangelog() Compares the current router version with the latest artifact and returns a list of commits.
  • startBuild() Triggers a GitHub Actions workflow to build new firmware.
  • startUpgrade() Downloads the latest artifact, uploads it to the router, and flashes it.

CLI

This package includes a CLI tool. See CLI Documentation.