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 🙏

© 2024 – Pkg Stats / Ryan Hefner

webalizer

v0.2.6

Published

Web interface for running server commands and scripts

Downloads

8

Readme

Webalizer

Intro

Webalizer is a web interface for running local programs and scripts remotely.

It is implemented as a command line application that reads command definition configurations and exposes those commands with a simple, easy to use UI. I use it for running tasks and scripts in my home server.

Despite it has authentication and I do my best to make it as secure as possible, it is intended to be used in a trusted environment, such as your home network and not directly exposed to the internet. Be careful. This is just a side project.

Here is a screenshot:

Screenshot

Installation

Ensure you have a recent version of node and npm, then:

npm i -g webalizer

Configuration

By default, webalizer will look for command definition files at ~/.webalizer/*.json where each .json file represents the configuration for a single command in the web interface. Here is an example configuration file which you can create for example at ~/.webalizer/start_vm.json:

{
  "command": "VBoxManage startvm Windows --type headless",
  "name": "Start windows VM",
  "description": "Starts the windows VM",
  "button": "Start",
  "shell": true,
  "confirm": "Are you sure you want to start this VM?",
  "timeout": 5000
}

The following configuration options are available:

command: Required. Actual program or shell script to run. Note that if your command depends on any shell feature, you will need to set also shell: true for it to work correctly.

name: Required. Name of this script to be shown in the UI

description: Optional. An explanatory description of what this command does.

button: Optional, defaults to "Run". Label the button for running this command will have in the UI

shell: Optional, defaults to false. If set to true, the command will be run inside a shell. warning This might be more insecure than running just a program. Use with caution.

confirm: Optional, defaults to false. If set to true, it will prompt for confirmation with a default message when the user clicks the button to run the command. If set to a non empty message, it will show this message to the user instead of the default one

timeout: Optional, defaults to 1 minute. Maximum time for the script to run. After this time is reached, the script will be killed.

Running

ADDRESS=0.0.0.0 PORT=8088 USERNAME=someuser PASSWORD=somepass NEXTAUTH_URL=http://yourPublicServerAddressOrIP:8088 webalizer

The following environment variables are available:

ADDRESS: Optional, defaults to 127.0.0.1. IP address where the web application will listen for connections

PORT: Optional, defaults to 3000. Port where the web application will listen for connections

USERNAME: Optional. if this and the PASSWORD options are set to non empty values, the application will ask for logging in.

PASSWORD: Optional. if this and the USERNAME options are set to non empty values, the application will ask for logging in.

NEXTATUH_URL: Optional, only required if USERNAME and PASSWORD are set. Public URL you will use to reach your application.

SCRIPTS_ROOT: Optional, defaults to ~/.webalizer. Directory where to look for command definition files.

Development

Clone this repository, and then:

npm install
npm run dev

You can optionally customize development time env vars by doing

cp .env.example .env

and customizing the values in .env

To run tests:

npm test