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

@togalma/cli

v0.2.8

Published

Developer-friendly CLI to order lunch from Togalma.

Downloads

1,604

Readme

Togalma CLI

Un outil en ligne de commande (CLI) pour se connecter, voir le menu, créer une commande et payer (Wave) chez Togalma.

Package npm: @togalma/cli


Français

Installation

Prérequis: Node.js 18+

npm i -g @togalma/cli

Démarrage rapide

togalma auth register
togalma auth login
togalma menu
togalma order create

Commandes

# Auth
togalma auth register
togalma auth login
togalma auth recover
togalma auth logout
togalma auth whoami

# Menu (interactif)
togalma menu

# Commandes
togalma order create
togalma order pay <recOrderId>
togalma orders list
togalma orders show <recOrderId>

Récupérer son PIN

Si vous avez oublié votre PIN, utilisez:

togalma auth recover

Votre PIN sera renvoyé via WhatsApp.

Astuce: si vous faites togalma auth register avec un numéro déjà existant, le CLI vous proposera directement de récupérer le PIN.

Configuration (variables d’environnement)

  • TOGALMA_BASE_URL: URL de base (ex: https://togalma.com). Par défaut, le CLI utilise https://togalma.com.
  • TOGALMA_SESSION_PATH: chemin complet du fichier de session JSON (override). Utile si vous voulez contrôler où est stockée la session.
  • TOGALMA_NO_SPLASH=1: désactive l’animation au démarrage du menu.
  • TOGALMA_NO_UPDATE_CHECK=1: désactive la vérification de mise à jour (sinon, max 1 fois/jour).

Où la session est stockée ?

Le CLI sauvegarde un fichier JSON contenant votre token (session locale). Par défaut le chemin est déterminé via env-paths (dépend de l’OS).

  • Important: ne partagez jamais ce fichier. Si vous pensez qu’il a fuité, faites togalma auth logout (puis reconnectez-vous).

Notes sécurité

  • Le PIN n’est jamais stocké par le CLI.
  • Le token est stocké localement dans un fichier de session.
  • En cas de besoin, utilisez TOGALMA_SESSION_PATH pour stocker la session dans un emplacement chiffré / sécurisé.

Dépannage

  • Erreur 426 (Upgrade Required): l’API demande une version plus récente du CLI. Mettez à jour:
npm i -g @togalma/cli@latest
  • EPIPE (ex: togalma ... | head): c’est normal quand la sortie est coupée par un pipe; le CLI termine proprement.
  • Pas d’animation: si votre terminal n’est pas un TTY, l’animation est automatiquement ignorée. Vous pouvez aussi forcer TOGALMA_NO_SPLASH=1.

English

Install

Prerequisite: Node.js 18+

npm i -g @togalma/cli

Quickstart

togalma auth register
togalma auth login
togalma menu
togalma order create

Commands

# Auth
togalma auth register
togalma auth login
togalma auth recover
togalma auth logout
togalma auth whoami

# Interactive menu
togalma menu

# Orders
togalma order create
togalma order pay <recOrderId>
togalma orders list
togalma orders show <recOrderId>

PIN recovery

If you forgot your PIN, run:

togalma auth recover

Your PIN will be re-sent via WhatsApp.

Tip: if you run togalma auth register with a phone number that already exists, the CLI will offer to recover your PIN.

Configuration (environment variables)

  • TOGALMA_BASE_URL: base URL (e.g. https://togalma.com). Defaults to https://togalma.com.
  • TOGALMA_SESSION_PATH: full path to the JSON session file (override).
  • TOGALMA_NO_SPLASH=1: disables the menu splash animation.
  • TOGALMA_NO_UPDATE_CHECK=1: disables update checks (otherwise at most once/day).

Where is the session stored?

The CLI stores a local JSON session file that includes your token. The default location is computed using env-paths (OS-specific).

  • Important: never share this file. If you suspect it leaked, run togalma auth logout and log in again.

Security notes

  • The CLI never stores your PIN.
  • Your token is stored locally in the session file.
  • Use TOGALMA_SESSION_PATH if you want the session stored in a more secure/encrypted location.

Troubleshooting

  • 426 (Upgrade Required): the API requires a newer CLI version. Update:
npm i -g @togalma/cli@latest
  • EPIPE (e.g. piping to head): expected when the pipe closes early; the CLI exits cleanly.
  • No animation: when not running in a TTY, splash is skipped automatically. You can also set TOGALMA_NO_SPLASH=1.