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

@sqlnest/cli

v0.0.7

Published

CLI local SQLNest — device flow + tunnel WSS vers ta DB Postgres (Mongo v1.1).

Readme

@sqlnest/cli

CLI locale SQLNest — pairing device flow + tunnel WSS entre ta machine et ton compte dev.sqlnest.io. Tes credentials Postgres ne quittent jamais ton laptop.

Install

npx @sqlnest/cli connect

Ou installation globale :

npm i -g @sqlnest/cli
sqlnest --help

Requiert Node.js ≥ 22.

Usage

Premier pairing

sqlnest connect

Ouvre https://dev.sqlnest.io/pair, affiche un code à saisir dans l'UI. Une fois approuvé, la CLI ouvre un WSS et sert les requêtes de ton canvas contre ta DB locale.

Ajouter une DSN locale

sqlnest add-connection --name prod
# prompts interactifs pour host / port / user / password (sans echo)

Les DSN sont stockées dans ~/.sqlnest/local-connections.toml (perms 0600 obligatoires).

Ping / diagnostic

sqlnest ping --tunnel prod

CI (Bearer token)

sqlnest connect --token sn_xxxxx --name ci-worker-1

Autres commandes

sqlnest logout --all              # retire tous les tunnels
sqlnest logout --tunnel <id>      # retire un tunnel
sqlnest revoke-connection --name prod
sqlnest --version
sqlnest --help

Fichiers de config

Tout vit sous ~/.sqlnest/ (créé au premier connect, perms 0700) :

| Fichier | Rôle | Perms | |---|---|---| | config.toml | Keypair Ed25519 + liste des tunnels | 0600 | | local-connections.toml | DSN Postgres locales | 0600 |

La CLI refuse de démarrer si les perms de ces fichiers sont trop ouvertes.

Override du répertoire (utile en test) :

SQLNEST_CONFIG_DIR=/tmp/sqlnest-test sqlnest connect

Exit codes

  • 0 — succès
  • 1 — erreur runtime (backend down, timeout, sig invalide…)
  • 2 — usage invalide (args manquants / inconnus)

Sécurité

  • Les DSN Postgres restent exclusivement locales — jamais transmises au backend SQLNest.
  • Le backend SQLNest signe chaque requête avec une clé Ed25519 dérivée d'AUTH_SECRET. La CLI vérifie la signature avant d'exécuter — le tunnel WSS ne peut être détourné par un man-in-the-middle du serveur.
  • La clé privée locale est chiffrée AES-256-GCM avec un salt tiré à l'install.

Contributing

Le paquet publié pointe en dur sur https://dev.sqlnest.io — les URLs sont bakées à la compile via esbuild --define:process.env.NODE_ENV="production" + --minify-syntax. Aucune env var ne peut les override runtime — les strings localhost ne sont même pas présentes dans le binaire publié.

Pour dev local depuis les sources (jamais depuis le binaire publié) :

NODE_ENV=development pnpm --filter @sqlnest/cli exec tsx src/bin.ts connect

En dev-from-source, tsx évalue process.env.NODE_ENV === "development" à true → les URLs deviennent http://localhost:4000 / http://localhost:3000. Rien de baké, c'est le code source qui branche.

License

ISC — © Anthonin COLAS