New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

infra-tools

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infra-tools

Cross-platform Docker infrastructure management CLI - Start 15+ enterprise services with one command

latest
Source
npmnpm
Version
1.4.1
Version published
Maintainers
1
Created
Source

🚀 Infra-Tools CLI (Cross-Platform)

Cross-platform Node.js CLI for managing Docker infrastructure with 15+ enterprise services

NPM Version Platform Support Docker

✨ Features

  • 🌍 Cross-Platform: Windows, macOS, and Linux support
  • 📦 NPX Ready: Use instantly with npx infra-tools
  • 🐳 Docker Integration: Native Docker API integration with dockerode
  • 🔌 15+ Services: PostgreSQL, MySQL, MongoDB, Redis, Kafka, ELK, and more
  • ⚡ Dynamic Ports: Automatic port conflict resolution
  • 📊 Rich UI: Beautiful tables and status indicators
  • 💾 Volume Management: Backup & restore volumes with compression
  • 🔧 Zero Config: Works out of the box with existing Docker Compose files

🚀 Quick Start

# Start all services
npx infra-tools

# Check status
npx infra-tools status

# Start specific services  
npx infra-tools start postgres redis

# View logs
npx infra-tools logs kafka -f

# Show environment variables
npx infra-tools vars postgres

Global Installation

npm install -g infra-tools
infra-tools status
infra-tools start databases

🖥️ Platform Support

Windows

  • Requirements: Docker Desktop with WSL2 or Hyper-V
  • Package Managers: Chocolatey, Winget, Scoop support
  • Shells: CMD, PowerShell, Windows Terminal support

macOS

  • Requirements: Docker Desktop
  • Package Managers: Homebrew, MacPorts support
  • Shells: Bash, Zsh support

Linux

  • Requirements: Docker Engine or Docker Desktop
  • Package Managers: apt, yum, dnf, pacman, zypper support
  • Shells: Bash, sh support

📋 Available Services

Databases

  • PostgreSQL 15 - postgres (port 5432)
  • MySQL 8.0 - mysql (port 3306)
  • MongoDB 7.0 - mongo (port 27017)
  • Redis 7 - redis (port 6379)
  • SQL Server 2022 - mssql (port 1433)
  • Neo4j 5.13 - neo4j (port 7474)
  • CouchDB 3.3 - couchdb (port 5984)

Message Queues

  • Apache Kafka - kafka (port 9092)
  • Zookeeper - zookeeper (port 2181)
  • RabbitMQ - rabbitmq (ports 5672, 15672)
  • Elasticsearch - elasticsearch (port 9200)
  • Logstash - logstash (port 5044)
  • Kibana - kibana (port 5601)

Monitoring

  • Prometheus - prometheus (port 9090)
  • Grafana - grafana (port 3000)

API Gateway

  • Kong Gateway - kong (port 8000)
  • Kong Admin - kong-database (port 5433)
  • Konga UI - konga (port 1337)

🛠️ Commands

Service Management

npx infra-tools start [services...]     # Start services
npx infra-tools stop [services...]      # Stop services  
npx infra-tools restart [services...]   # Restart services
npx infra-tools status [--json|--active] # Show status
npx infra-tools config <service>        # Configure service interactively

Service Groups

npx infra-tools databases    # All databases
npx infra-tools messaging    # Kafka + RabbitMQ
npx infra-tools logging      # ELK stack
npx infra-tools monitoring   # Prometheus + Grafana
npx infra-tools gateway      # Kong API Gateway

Container Operations

npx infra-tools logs <service> [-f]     # View logs
npx infra-tools exec <service> [cmd]    # Execute command
npx infra-tools shell <service>         # Open shell
npx infra-tools inspect <service>       # Inspect container
npx infra-tools vars <service>          # Show environment variables

Volume Management

# Volume operations (all subcommands under 'volumes')
npx infra-tools volumes                     # Show volume usage (default)
npx infra-tools volumes show [service]      # Show volume usage
npx infra-tools volumes list [service]      # List volumes with details
npx infra-tools volumes inspect <volume>    # Inspect specific volume
npx infra-tools volumes backup <volume>     # Backup volume to .tar.gz archive
npx infra-tools volumes restore <volume>    # Restore volume from archive
npx infra-tools volumes remove <volume>     # Remove volume (with confirmation)

Maintenance

npx infra-tools clean                   # Remove stopped containers
npx infra-tools reset                   # Reset environment

⚙️ Advanced Features

Interactive Service Configuration

# Configure service image, ports, volumes, and environment variables
npx infra-tools config postgres
# Prompts for:
# - Docker image (default: postgres:14-alpine)
# - Ports (default: 5432)
# - Volume names (default: postgres-data)
# - Environment variables

Volume Backup & Restore

# Backup a specific volume to compressed archive
npx infra-tools volumes backup postgres
# Prompts for backup directory (default: ./backups)
# Creates: infra_postgres-data_2025-10-28.tar.gz

# Restore volume from archive
npx infra-tools volumes restore postgres
# Prompts for archive path
# Shows containers using the volume
# Requires confirmation before restore

# Backup/restore supports both service names and full volume names
npx infra-tools volumes backup infra_postgres-data
npx infra-tools volumes restore infra_mysql-data

Dynamic Port Assignment

# Automatically find free ports if defaults are busy
npx infra-tools start --dynamic-ports postgres mysql

Environment Variables

SKIP_PORT_CHECK=true npx infra-tools start
DYNAMIC_PORTS=true npx infra-tools start

JSON Output

# Get machine-readable status
npx infra-tools status --json --active

🔧 Windows-Specific Features

  • Package Manager Integration: Automatic Miller installation via Chocolatey/Winget/Scoop
  • Windows Terminal Support: Enhanced experience with Windows Terminal
  • WSL2 Compatibility: Seamless integration with Docker Desktop on WSL2
  • Path Normalization: Automatic Windows path conversion for Docker volumes

🏗️ Architecture

The CLI is built with:

  • Commander.js: Command-line interface framework
  • Dockerode: Native Docker API integration
  • Chalk: Cross-platform terminal colors
  • CLI-Table3: Beautiful ASCII tables
  • Inquirer: Interactive prompts
  • Ora: Elegant loading spinners

🤝 Migration from Bash Version

The Node.js CLI maintains 100% compatibility with the existing Bash version:

  • Same command structure and arguments
  • Same Docker Compose files (no changes needed)
  • Same service names and port mappings
  • Same volume and backup strategies

🌟 Acknowledgments

  • Docker for containerization platform
  • All service maintainers for excellent container images
  • Community for feedback and contributions
  • Kong, Keycloak, Elastic, Confluent for enterprise-grade services

📞 Support

Made with ❤️ for developers who want powerful, enterprise-grade tools without the complexity.

Start building amazing applications with complete development infrastructure in seconds!

Infra-Tools v1.4.0 - Created by 👨‍💻 Aref M | Licensed under MIT

Keywords

docker

FAQs

Package last updated on 28 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts