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

@idirdev/dockstat

v1.0.0

Published

Docker container and image statistics

Readme

dockstat

[EN] A CLI tool to monitor Docker containers, images, volumes, and system disk usage from the terminal. [FR] Un outil CLI pour surveiller les conteneurs Docker, les images, les volumes et l'utilisation disque du système depuis le terminal.


Features / Fonctionnalités

[EN]

  • List running (or all) Docker containers with image and status
  • Show real-time CPU and memory stats for running containers
  • List Docker images with size information
  • List Docker volumes with driver details
  • Display Docker system disk usage summary
  • Exits with error if Docker daemon is not running
  • Lightweight wrapper with no extra dependencies

[FR]

  • Lister les conteneurs Docker en cours (ou tous) avec image et statut
  • Afficher les stats CPU et mémoire en temps réel des conteneurs
  • Lister les images Docker avec leur taille
  • Lister les volumes Docker avec les détails du driver
  • Afficher le résumé d'utilisation disque du système Docker
  • Quitte avec une erreur si le daemon Docker n'est pas actif
  • Wrapper léger sans dépendances supplémentaires

Installation

npm install -g @idirdev/dockstat

CLI Usage / Utilisation CLI

# List running containers (default)
# Lister les conteneurs en cours (défaut)
dockstat

# List all containers including stopped
# Lister tous les conteneurs y compris ceux arrêtés
dockstat --all

# Show CPU and memory stats
# Afficher les stats CPU et mémoire
dockstat --stats

# List Docker images
# Lister les images Docker
dockstat --images

# List volumes
# Lister les volumes
dockstat --volumes

# Show disk usage summary
# Afficher le résumé d'utilisation disque
dockstat --disk

# Show help / Afficher l'aide
dockstat --help

Example Output / Exemple de sortie

$ dockstat
api-server (node:20-alpine) Up 3 days
postgres-db (postgres:15) Up 3 days
redis-cache (redis:7-alpine) Up 3 days

$ dockstat --stats
api-server: CPU=0.42% MEM=128MiB / 2GiB
postgres-db: CPU=0.18% MEM=256MiB / 2GiB
redis-cache: CPU=0.05% MEM=12MiB / 2GiB

$ dockstat --images
node:20-alpine (142MB)
postgres:15 (379MB)
redis:7-alpine (29.5MB)

API (Programmatic) / API (Programmation)

[EN] Use dockstat as a library to integrate Docker monitoring into your scripts. [FR] Utilisez dockstat comme bibliothèque pour intégrer la surveillance Docker dans vos scripts.

const {
  isDockerRunning,
  listContainers,
  getStats,
  getImages,
  getVolumes,
  getDiskUsage,
} = require('@idirdev/dockstat');

// Check if Docker is available
// Vérifier si Docker est disponible
if (!isDockerRunning()) {
  console.error('Docker is not running');
  process.exit(1);
}

// List running containers
// Lister les conteneurs en cours
const containers = listContainers(false);
containers.forEach(c => {
  console.log(`${c.name} [${c.image}] ${c.status}`);
});
// { id: 'a1b2c3d4', name: 'api-server', image: 'node:20-alpine', status: 'Up 3 days', ports: '0.0.0.0:4000->4000/tcp' }

// Get CPU / memory stats
// Obtenir les stats CPU / mémoire
const stats = getStats();
stats.forEach(s => console.log(`${s.name}: ${s.cpu} cpu, ${s.mem}`));

// List images
// Lister les images
const images = getImages();
images.forEach(i => console.log(`${i.name} ${i.size}`));

// Get raw disk usage string (docker system df)
// Obtenir la chaîne brute d'utilisation disque
console.log(getDiskUsage());

API Reference

| Function | Parameters | Returns | |----------|-----------|---------| | isDockerRunning() | — | boolean | | listContainers(all?) | all: boolean | Array<{id, name, image, status, ports}> | | getStats() | — | Array<{name, cpu, mem, net, block}> | | getImages() | — | Array<{name, size, id}> | | getVolumes() | — | Array<{name, driver}> | | getDiskUsage() | — | string |


License

MIT - idirdev