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

dhanda

v0.4.0

Published

Personal terminal coding agent — chat, code, files. Keys server par, multi-provider (Meta/Groq/Gemini/OpenRouter + free providers), key rotation, auto + specific model select.

Readme

dhanda — personal terminal coding agent

Chat + code + file likhna. Bas. Personal use ke liye, 3-4 PC par.

User ka kaam (bas itna hi)

npm install -g dhanda
dhanda

Pehli baar ID + password poochha jayega (jo admin ne diya ho) — password type karte waqt screen par nahi dikhega. Uske baad session save ho jayega, dobara login nahi poochha jayega. PC par koi env var, koi key, koi extra setup nahi chahiye. Default model auto hai — pehle configured provider ka pehla model chalta hai (order: Meta, phir Groq, Gemini, OpenRouter, phir baaki). Badalna ho to chat me /model likho.

Design (ek line me)

CLI (PC) ↔ Backend server (keys + user accounts) ↔ Meta / Groq / Gemini / OpenRouter + baaki free providers

  • PC par koi API key nahi rehti. Key sirf server ke env vars me hai.
  • Tools (file padhna/likhna, command chalana) PC par chalte hain — files to PC ki hain.
  • Sirf AI wali call server par jati hai, server key laga ke provider ko bhejta hai.
  • Backend URL package ke lib/defaults.js me baked hai (publish se pehle ek baar bharna hai).
  • Chat history server par kabhi save nahi hoti — har request stateless hai, history sirf us PC ke chat me rehti hai.

Files

  • bin/agent.js — CLI (dhanda command). Login + chat loop + tools + slash commands.
  • server.js — backend. GET /, POST /login, GET /me, GET /models, POST /chat.
  • lib/providers.js — provider registry + key rotation + model select.
  • lib/auth.js — password hashing (scrypt) + session tokens (30 din).
  • lib/defaults.js — baked default (server URL). API keys KABHI yahan mat daalo.
  • scripts/users.js — ADMIN ONLY: user add/remove/list (server par chalao).
  • render.yaml — Render deploy file.
  • .env.example — server ke env vars ka format (real keys kabhi isme mat likhna).

Login + users (sirf admin set kar sakta hai)

User add/remove/list sirf server par hota hai — CLI se koi user nahi bana sakta. Yehi tumhara control hai:

node scripts/users.js add <id>      # password do baar poochha jayega
node scripts/users.js remove <id>
node scripts/users.js list           # sirf ids dikhengi, password/hash kabhi nahi
  • Har user ki alag ID + alag password.
  • Password scrypt hash me save hota hai (salt ke saath) — plain text kabhi file me nahi rehta.
  • Login par server 30 din ka session token deta hai, jo PC par ~/.dhanda/session.json me save hota hai.
  • Logout: dhanda --logout ya chat me /logout.
  • Bina login ke /chat aur /models par 401 milta hai. Galat password par 401, aur login par per-IP rate limit (10/min) brute force rokne ke liye.
  • Server restart ke baad bhi session chalta hai (sessions file me save hote hain). Naya user bina server restart ke chalne lagta hai.

Chat me shortcuts

/model <name|number>   model badlo (bina arg ke list dikhegi)
  example: /model 2  ya  /model gemini-2.5-flash
/models                available models dekho
/clear                 chat history saaf karo
/logout                logout karke band karo
/help                  shortcuts ki list
/exit                  band karo

Startup flags bhi hain: dhanda -m <model> (specific model se shuru), dhanda --list-models, dhanda --logout.

Model select

  • Default (auto): order Meta → Groq → Gemini → OpenRouter → baaki free providers. Jo provider configure nahi hai, wo skip hota hai — isliye OpenRouter-only setup par auto seedha OpenRouter chalata hai.
  • Specific: -m ya /model se jo model chuno, sirf wahi chalega — silently switch nahi hoga.

Server setup (EK BAAR, publish se pehle)

# env vars set karo (comma-separated keys, 1-10 ya jitni hon)
OPENROUTER_KEYS=key1 \
OPENROUTER_MODELS=nvidia/nemotron-3-ultra-550b-a55b:free \
GROQ_KEYS=key1,key2 \
GEMINI_KEYS=key1,key2 \
META_KEYS=key1 \
META_BASE_URL=https://api.meta.ai/v1 \
META_MODELS=muse-spark-1.3,muse-wonder-1.0 \
node server.js

Poori list .env.example me hai — jo provider nahi chahiye, uski keys khali chhodo, wo skip ho jayega. Host par terminal na mile to DHANDA_BOOTSTRAP_USER + DHANDA_BOOTSTRAP_PASSWORD env vars se user ban jayega (server start par, hash karke).

  • Meta note (verified): provider ka naam meta hai. Default base URL https://api.meta.ai/v1 hai (Meta Model API, OpenAI-compatible). Verified models: muse-spark-1.3 (latest, default), muse-spark-1.2, muse-spark-1.1, muse-wonder-1.0 (contributor variants -contributor bhi hain, par wo tumhare prompts par train kar sakte hain, isliye default list me nahi hain). Purana Llama API (api.llama.com) retired hai. Kisi gateway ka URL ho to META_BASE_URL se override karo, aur META_MODELS me apne model names comma-separated daalo.
  • Deploy (current host: Azure App Service, Free F1, Central India): Deployment Center me repo ashudhanda/dhanda (branch main) connect karo, Startup Command npm start, aur Application settings me keys daalo. App Service ka /home/site/wwwroot writable hai, to ./users.json default hi chalega (SnapDeploy par read-only tha, isliye wahan /tmp chahiye tha). Alternative: Render (render.yaml service bana dega, sync: false wali values dashboard me set karo, file me kabhi nahi).
  • Rate limits: chat har user ke liye 120 req/min, login har IP ke liye 10 req/min.
  • Alternative hosting: Railway free tier, ya apna ek PC + Tailscale private network (URL public hi nahi hoga).

Key rotation (kaise kaam karti hai)

  • Har provider ki keys round-robin chalti hain (load spread hota hai).
  • Kisi key par 429 (rate limit) / 401 (bad key) / 5xx / key-error aaye to agli key try hoti hai.
  • Auto mode me ek provider ki saari keys fail hon to agla provider try hota hai.
  • Specific mode me sirf us provider ki keys rotate hoti hain — model switch nahi hota.

npm publish

npm login
npm publish

Publish se pehle lib/defaults.js me server URL bhar dena — warna zero-config nahi chalega. Dobara publish karna ho to package.json me version badhana padega (0.1.0 → 0.1.1). dhanda naam npm registry par free hai (27 Oct 2026 ko check kiya gaya).

Agle steps (jab chaho)

  • Streaming (token aate hi print) — speed ke liye.
  • edit_file tool (purana text dhoondh ke naya likhna).
  • Session save (chat history file me).