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

@sidx1scr-apps/meshterm

v0.1.14

Published

A control-terminal CLI for organizing and running SSH commands across multiple computers.

Readme

meshterm

A cross-platform Node.js CLI for controlling multiple machines from a single terminal. Designed for solo developers, small teams, homelabs, and personal projects.

Overview

meshterm provides one unified terminal interface for executing commands on multiple machines without requiring agents or special software on remote machines. It uses SSH as the default transport and leverages your existing SSH configuration and keys.

meshterm run server "docker ps"
meshterm run all "uptime"
meshterm run @prod "systemctl status nginx"

Installation

Install from npm:

sudo npm i -g @sidx1scr-apps/meshterm

[!TIP] since you are installing globally (so that you can run it from any directory instead of always going into the install directory ) you have to use sudo, if you are on windows run cmd or powershell as administrator

Or install from GitHub Packages:

npm config set @sidx1-scratch:registry https://npm.pkg.github.com
npm install -g @sidx1-scratch/meshterm

If using a personal access token with GitHub Packages, authenticate first:

npm login --scope=@sidx1-scratch --registry=https://npm.pkg.github.com

Use your GitHub username and a personal access token with read:packages access.

Requirements

  • Node.js 18.17.0 or higher, or Node.js 20.5.0 or higher
  • SSH client available on your system
  • SSH access to remote machines with key-based authentication

Quick Start

Initialize meshterm and add a machine:

meshterm init
meshterm add devpc --host 192.168.1.20 --user yourname
meshterm list
meshterm run devpc "uptime"

Configuration

Configuration is stored in ~/.meshterm/config.json:

{
  "version": 1,
  "machines": {
    "devpc": {
      "host": "192.168.1.5",
      "user": "sid",
      "port": 22,
      "identity": "~/.ssh/id_ed25519",
      "tags": ["dev"],
      "cockpit": { "scheme": "https", "port": 9090, "path": "/" }
    },
    "server": {
      "host": "192.168.1.10",
      "user": "root",
      "port": 22,
      "tags": ["prod", "web"]
    },
    "pi": {
      "host": "raspberrypi.local",
      "user": "pi",
      "tags": ["lab"]
    }
  },
  "groups": {
    "web": ["server"],
    "lab": ["pi"],
    "dev": ["devpc", "pi"]
  }
}

Usage

Basic Commands

Execute a command on a single machine:

meshterm run devpc "uptime"
meshterm run server "docker ps"

Start an interactive shell on a machine:

meshterm shell devpc

Targeting

You can target:

  • A specific machine by name: devpc
  • All machines: all
  • Machines with a tag: @tag_name

Examples:

meshterm run devpc "uptime"
meshterm run all "hostname"
meshterm run @dev "df -h"

Output Format

All output is displayed in a single terminal with source prefixes:

[devpc]  14:21:03 up 6 days,  load average: 0.22, 0.19, 0.15
[server] 14:21:03 up 41 days, load average: 0.08, 0.06, 0.02
[pi]     14:21:04 up 2 days,  load average: 0.35, 0.28, 0.20

Each line is prefixed with the machine alias, and stderr is visually distinguished from stdout for clarity.

Interactive Prompt

Start an interactive session:

meshterm prompt

Then enter commands using the format <target>_run:<command>::

mesh> devpc_run:pwd:
mesh> server_run:docker ps:
mesh> all_run:uptime:

Supported prompt commands:

:help      Show available commands
:machines  List configured machines
:groups    List configured groups
:reload    Reload configuration
:clear     Clear screen
:exit      Exit the prompt

Compact Command Syntax

Use the compact format for scripting:

meshterm execute server_lsblk
meshterm execute devpc_uptime
meshterm execute "server_ls -la"

Machine Management

Add a Machine

meshterm add <name> --host <host> [--user <user>] [--port <port>] [--tag <tag>] [--identity <path>]

Examples:

meshterm add devpc --host 192.168.1.5 --user sid --identity ~/.ssh/id_ed25519
meshterm add server --host example.com --user root --port 2222
meshterm add pi --host raspberrypi.local --user pi --tag lab

List Machines

meshterm list

Remove a Machine

meshterm remove <name>

Cockpit Integration

meshterm can integrate with Cockpit web consoles on your machines. Cockpit provides a browser-based system dashboard and administration interface.

Check Cockpit Status

meshterm cockpit server --check

Setup Cockpit

Attempt to install, enable, and configure Cockpit on a remote machine:

meshterm cockpit server --setup

Open Cockpit in Browser

meshterm cockpit server --open

View Cockpit URL

meshterm cockpit server

Configure Cockpit

When adding a machine, specify Cockpit settings:

meshterm add server --host 192.168.0.87 --user sid --cockpit-port 9090

Configuration in config.json:

{
  "machines": {
    "server": {
      "host": "192.168.0.87",
      "user": "sid",
      "cockpit": {
        "scheme": "https",
        "port": 9090,
        "path": "/"
      }
    }
  }
}

Troubleshooting

Check Dependencies

Verify SSH client availability and get help with missing tools:

meshterm doctor

Attempt to install missing SSH client on supported systems:

meshterm doctor --install

Supported systems for automatic installation: Fedora, Debian, Ubuntu, Arch, Alpine, CentOS, RHEL, and others with package managers.

SSH Configuration

meshterm uses your system's SSH client and respects your existing SSH configuration:

  • ~/.ssh/config — host aliases, port mappings, and defaults
  • SSH agent — for key management and unlocking encrypted keys
  • ~/.ssh/known_hosts — for host key verification
  • Key-based authentication — no passwords are stored

Security features:

  • Passwords are never stored
  • Private keys are never logged
  • Host key checking is not disabled
  • Standard OpenSSH security practices are maintained

Architecture

Control Device

The control device runs the meshterm CLI and is responsible for:

  • Parsing and routing commands
  • Loading machine configuration
  • Managing SSH connections
  • Routing commands to target machines
  • Streaming output with source prefixes
  • Handling errors and disconnects

Remote Machines

Remote machines are standard SSH servers with no special requirements:

  • SSH server reachable from the control device
  • Key-based authentication or existing SSH agent
  • No meshterm agent or software installed
  • Optional Cockpit web console for browser-based management

Help

Display usage information:

meshterm help

License

See LICENSE file in the repository.