DEV Community

Aref
Aref

Posted on

Stop Wrestling with Docker Compose - This CLI Spins Up Your Entire Dev Stack in Seconds

We've all been there. You start a new project, need a database, maybe some Redis, perhaps Kafka for that microservices architecture you're building. What follows is:

  1. 🔍 Google "docker compose postgresql"
  2. 📋 Copy some random compose file
  3. 🔧 Modify it for your needs
  4. ❌ Port 5432 is already in use
  5. 😤 Repeat for every service you need

What if there was a better way?

I built infra-tools - a CLI that gives you enterprise-grade services with zero configuration.

npm install -g infra-tools
infra-tools databases     # PostgreSQL, MySQL, MongoDB, Redis running
infra-tools status        # Beautiful status dashboard
Enter fullscreen mode Exit fullscreen mode

🚀 Quick Start

# Start all databases
infra-tools databases

# Start messaging services  
infra-tools messaging

# Check what's running
infra-tools status

# Follow service logs
infra-tools logs postgres -f

# Interactive configuration
infra-tools config redis
Enter fullscreen mode Exit fullscreen mode

🎯 What's Included?

15+ Production-Ready Services:

Category Services
Databases PostgreSQL, MySQL, MongoDB, Redis, SQL Server, Neo4j, CouchDB
Messaging Kafka, Zookeeper, RabbitMQ
Observability Elasticsearch, Logstash, Kibana, Prometheus, Grafana
Gateway Kong API Gateway + Admin UI

All services use latest stable versions with security updates and performance improvements.

🔧 Smart Configuration

The interactive config system lets you customize anything:

infra-tools config postgres
Enter fullscreen mode Exit fullscreen mode
? PostgreSQL Image: postgres:17-alpine
? Port: 5432  
? Password: ********
? Database Name: myapp
? Custom Environment Variables? (Y/n)
Enter fullscreen mode Exit fullscreen mode

Changes are saved and reused across restarts.

🎨 Beautiful Status Dashboard

infra-tools status
Enter fullscreen mode Exit fullscreen mode
┌─────────────┬──────────┬─────────────┬─────────────────┐
│ SERVICE     │ STATUS   │ PORTS       │ HEALTH          │
├─────────────┼──────────┼─────────────┼─────────────────┤
│ postgres    │ ✅ Running │ 5432        │ 🟢 Healthy      │
│ redis       │ ✅ Running │ 6379        │ 🟢 Healthy      │
│ kafka       │ ✅ Running │ 9092        │ 🟢 Healthy      │
│ grafana     │ ✅ Running │ 3000        │ 🟢 Healthy      │
└─────────────┴──────────┴─────────────┴─────────────────┘
Enter fullscreen mode Exit fullscreen mode

🛡️ Production-Ready Features

  • Health Checks: Every service has proper health monitoring
  • Port Conflict Detection: Smart port assignment
  • Volume Management: Persistent data with easy backup
  • Cross-Platform: Windows, macOS, Linux support
  • Resource Limits: Proper CPU/memory constraints

🔍 Debugging Made Easy

# Check environment variables
infra-tools vars postgres

# Interactive shell access
infra-tools shell redis

# View port mappings
infra-tools ports

# Execute commands
infra-tools exec postgres psql -U postgres
Enter fullscreen mode Exit fullscreen mode

💡 Real-World Use Cases

Microservices Development:

infra-tools databases messaging monitoring
# Full stack running in ~30 seconds
Enter fullscreen mode Exit fullscreen mode

Data Engineering:

infra-tools kafka elasticsearch
# Perfect for streaming pipelines
Enter fullscreen mode Exit fullscreen mode

Full-Stack Applications:

infra-tools            # Everything you need
Enter fullscreen mode Exit fullscreen mode

🚀 Why I Built This

After years of:

  • ❌ Copying docker-compose files between projects
  • ❌ Fighting port conflicts
  • ❌ Inconsistent team environments
  • ❌ "Works on my machine" syndrome

I wanted one command that gives you everything you need for modern development.

🎯 Get Started

npm install -g infra-tools
infra-tools --help
Enter fullscreen mode Exit fullscreen mode

Links:


What services would you want to see added next? Let me know in the comments! 🚀

P.S. If this saves you time, a ⭐ on GitHub would mean the world to me!

Top comments (0)