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

getxpos

v0.1.2

Published

Node.js SDK for XPOS — instant public URLs via SSH tunnels

Downloads

309

Readme

getxpos

npm license

Node.js SDK for XPOS — instant public URLs via SSH tunnels. Zero dependencies.

Features

  • Zero dependencies — uses only Node.js built-ins
  • CLI + programmatic API — use from terminal or embed in your tooling
  • HTTP & TCP tunnels — expose web apps or any TCP service
  • Anonymous or authenticated — works instantly, tokens unlock more features
  • Reserved subdomains & custom domains — with Pro/Business plans

Quick Start

# One-off (no install needed)
npx getxpos --port 3000

# Or install globally
npm install -g getxpos
xpos --port 3000

Installation

# Global (recommended for CLI usage)
npm install -g getxpos

# Project dependency (for programmatic API)
npm install getxpos --save-dev

Authentication

Get a token from xpos.dev/dashboard/tokens, then either:

# Pass directly
xpos --port 3000 --token tk_xxx

# Or set environment variable
export XPOS_TOKEN=tk_xxx
xpos --port 3000

CLI Usage

# Anonymous tunnel (random subdomain, 3hr expiry)
xpos --port 3000

# Authenticated (random subdomain, 10hr expiry)
xpos --port 3000 --token tk_xxx

# Reserved subdomain (Pro+)
xpos --port 3000 --token tk_xxx --subdomain myapp

# Custom domain (Business)
xpos --port 8000 --token tk_xxx --domain tunnel.example.com

# Port-based TCP tunnel (Pro+)
xpos --port 5432 --token tk_xxx --mode tcp

CLI Options

| Option | Description | Default | |--------|-------------|---------| | --port <port> | Local port to expose | (required) | | --host <host> | Local host to forward | localhost | | --token <token> | Auth token (or XPOS_TOKEN env) | — | | --subdomain <name> | Reserved subdomain (requires token) | — | | --domain <domain> | Custom domain (requires token) | — | | --mode <mode> | http or tcp | http | | --server <host> | SSH server hostname | go.xpos.dev | | -h, --help | Show help | — | | -v, --version | Show version | — |

Programmatic API

import { xpos } from 'getxpos';

// HTTP tunnel
const tunnel = await xpos.connect({ port: 3000, token: 'tk_xxx' });
console.log(tunnel.url);        // https://abc.xpos.to
console.log(tunnel.expiresAt);  // 2026-03-28T10:30:45Z
tunnel.close();

// Port-based TCP tunnel
const tcp = await xpos.connect({ port: 5432, token: 'tk_xxx', mode: 'tcp' });
console.log(tcp.url);           // 1.2.3.4:54321
tcp.close();

Named imports

import { connect, XposTunnel } from 'getxpos';

const tunnel = await connect({ port: 3000 });
console.log(tunnel.url);
tunnel.close();

Events

const tunnel = new XposTunnel({ port: 3000 });

tunnel.on('connect', ({ url, expiresAt }) => {
  console.log(`Connected: ${url}`);
});

tunnel.on('output', (text) => {
  // Raw SSH output
});

tunnel.on('close', ({ code }) => {
  console.log('Tunnel closed');
});

await tunnel.start();

Options

| Option | Type | Description | |--------|------|-------------| | port | number | Local port to expose (required) | | host | string | Local host (default: "localhost") | | token | string | Auth token (or reads XPOS_TOKEN env) | | subdomain | string | Reserved subdomain | | domain | string | Custom domain | | mode | string | "http" or "tcp" (default: "http") | | server | string | SSH server (default: "go.xpos.dev") |

Requirements

  • Node.js >= 18
  • SSH client in PATH (ssh command — comes pre-installed on macOS, Linux, and Windows 10+)

Troubleshooting

"SSH not found" — Install OpenSSH. On Windows: Settings > Apps > Optional Features > OpenSSH Client.

Connection timeout — Check your firewall allows outbound connections on port 443.

"subdomain requires a token" — Reserved subdomains need a Pro plan. Get a token from your dashboard.

Links

License

MIT