@mazhu/dockerman
v1.0.0
Published
A simpler Docker Compose management CLI tool
Downloads
122
Readme
dockerman
A simpler Docker Compose management CLI tool
A user-friendly alternative to docker-compose commands with beautiful colored output and simpler syntax.
Features
- 🚀 Simple and intuitive commands
- 🎨 Beautiful colored output
- 📊 Pretty container listing tables
- 🔧 Docker Compose v2 support
- 📦 Zero configuration needed
Installation
npm install -g @mazhu/dockermanUsage
Start all services
dockerman upOptions:
-d, --detach- Run in detached mode (default: true)-f, --file <file>- Specify an alternate compose file--build- Build images before starting containers
Stop all services
dockerman downOptions:
-f, --file <file>- Specify an alternate compose file-v, --volumes- Remove volumes--remove-orphans- Remove containers for services not defined in the Compose file
View logs
dockerman logs [service]Options:
-f, --follow- Follow log output--tail <n>- Number of lines to show (default: 100)-f, --file <file>- Specify an alternate compose file
Examples:
# View all logs
dockerman logs
# Follow logs for a specific service
dockerman logs web -f
# Show last 50 lines
dockerman logs --tail 50Check service status
dockerman statusShows a pretty table with service status, container names, and ports.
List containers
dockerman psOptions:
-a, --all- Show all containers, including stopped ones-f, --file <file>- Specify an alternate compose file
Clean up resources
dockerman cleanOptions:
-a, --all- Remove all unused images, not just dangling ones-v, --volumes- Remove unused volumes-f, --force- Do not prompt for confirmation
Examples:
# Preview what would be removed
dockerman clean
# Actually clean up
dockerman clean -f
# Clean everything including unused images and volumes
dockerman clean -a -v -fComparison with docker-compose
| Task | docker-compose | dockerman |
|------|---------------|-----------|
| Start services | docker-compose up -d | dockerman up |
| Stop services | docker-compose down | dockerman down |
| View logs | docker-compose logs -f --tail=100 | dockerman logs -f |
| Check status | docker-compose ps | dockerman status |
| List containers | docker ps --format "table..." | dockerman ps |
| Clean up | docker system prune -f | dockerman clean -f |
Requirements
- Node.js >= 14.0.0
- Docker >= 20.10.0
- Docker Compose v2 (bundled with Docker)
Development
# Clone the repository
git clone https://github.com/deepdadou/dockerman.git
cd dockerman
# Install dependencies
npm install
# Link for local testing
npm link
# Test the CLI
dockerman --helpLicense
MIT © Mike Wang
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
1.0.0
- Initial release
- Basic commands: up, down, logs, status, ps, clean
- Beautiful colored output with cli-table3
- Docker Compose v2 support
