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)