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

@xlabglobal/xnpm

v1.0.0

Published

Local-first npm package management workspace for discovering, inspecting and operating Node.js packages on your machine.

Downloads

90

Readme

Xnpm

Xnpm là ứng dụng local-first để quét, xem, quản lý và hỗ trợ phát triển các package Node.js/npm đang có trên máy.

Chức năng chính

  • quản lý thư mục scan package theo từng vùng làm việc
  • quét đệ quy các dự án có package.json
  • xem nhanh package manager, scripts, dependency count, workspace count và trạng thái sẵn sàng phát triển
  • chạy trực tiếp các thao tác phổ biến từ UI: install, lint, test, build, open folder
  • ghi log thao tác vào file log theo từng hệ điều hành

Chạy nhanh bằng npx

npx @xlabglobal/xnpm

Sau khi chạy, mở trình duyệt tại http://127.0.0.1:4173 để truy cập dashboard.

Tech stack

  • Frontend: React 19 + Vite + TypeScript
  • Backend: Fastify + TypeScript
  • Tooling: ESLint, Vitest, Supertest, TSX, Concurrently

Chạy local

1. Cài dependency

npm install

2. Chạy development mode

npm run dev
  • Frontend: http://127.0.0.1:4174
  • Backend API: http://127.0.0.1:4173

3. Build production

npm run build

4. Chạy production

npm run start

Scripts

npm run dev
npm run build
npm run lint
npm run test
npm run start

Kiến trúc chính

Backend

  • server/app.ts: khởi tạo Fastify, route API, serve static client khi build production
  • server/catalog.ts: quét root, đọc package.json, chuẩn hóa metadata package
  • server/store.ts: lưu scan roots vào thư mục config theo OS (%APPDATA%/xnpm, ~/.config/xnpm, ~/Library/Application Support/xnpm)
  • server/process-runner.ts: chạy action theo package manager, tự nhận diện executable trên từng OS
  • server/logger.ts: ghi log debug vào thư mục log theo OS

Frontend

  • src/App.tsx: dashboard chính, package list, detail panel, root manager, action console
  • src/styles.css: design system, layout, màu, typography và responsive rules

Quy ước quét package

  • Bỏ qua: .git, .next, .turbo, coverage, dist, build, node_modules, .cache, out
  • Package được xác định bởi file package.json
  • Trạng thái package:
    • Ready: có đủ lint, test, build
    • Needs polish: có dấu hiệu phát triển nhưng thiếu workflow script
    • Barebones: package tối giản, cần hoàn thiện thêm

Logging

File log runtime được lưu theo hệ điều hành:

  • Windows: %APPDATA%\xnpm\logs\xnpm.log
  • macOS: ~/Library/Logs/xnpm/xnpm.log
  • Linux: ~/.local/state/xnpm/logs/xnpm.log

Tương thích hệ điều hành

  • Đã thiết kế để chạy trên Windows, Linux và macOS với cùng codebase Node.js/React/Fastify
  • Build, test, lint và scan package dùng Node API + npm scripts, tránh phụ thuộc trực tiếp vào Bash hoặc PowerShell
  • Thao tác open folder tự chọn lệnh phù hợp theo nền tảng:
    • Windows: explorer
    • macOS: open
    • Linux: ưu tiên xdg-open, fallback sang gio open, gnome-open, kde-open
  • Có thể override lệnh mở thư mục bằng biến môi trường XNPM_OPEN_FOLDER_COMMAND nếu máy dùng launcher khác
  • Có thể override thư mục runtime bằng XNPM_RUNTIME_DIR và danh sách root gợi ý bằng XNPM_SUGGESTED_ROOTS

Tiêu chuẩn chất lượng

  • TypeScript strict mode
  • Lint riêng cho frontend và backend trong cùng một project
  • Test unit + API bằng Vitest/Supertest
  • Build client và server tách biệt để dễ kiểm soát

Định hướng mở rộng

  • thêm batch actions cho nhiều package
  • thêm dependency health/outdated analyzer
  • thêm terminal log streaming theo thời gian thực
  • thêm export inventory sang JSON/CSV