docker-pilot
Version:
A powerful, scalable Docker CLI library for managing containerized applications of any size
251 lines (175 loc) โข 7.63 kB
Markdown
# Docker Pilot ๐ณ
<div align="center">

**A powerful and scalable npm library for managing Docker applications of any size.**
[](https://badge.fury.io/js/docker-pilot)
[](https://www.typescriptlang.org/)
[](https://www.docker.com/)
[](https://opensource.org/licenses/ISC)
[๐ **Complete Documentation**](https://Jonhvmp.github.io/docker-pilot/) โข [๐ **Quick Start**](#-quick-start) โข [๐ฎ **Interactive Menu**](#-interactive-menu)
---
</div>
## โจ What is Docker Pilot?
Docker Pilot is a modern TypeScript library that makes Docker container management **simple**, **powerful**, and **fun**. From small projects to enterprise systems, it provides an intuitive CLI and programmatic API.
### ๐ฏ Key Features
- ๐ฎ **Interactive Terminal Menu** - Navigate commands with ease
- ๐ **Smart Compose Management** - Recursive discovery and analysis of docker-compose files
- ๐ฏ **Intelligent Project Detection** - Auto-detect compose files with smart prioritization
- ๐ **Multi-language Support** - Portuguese & English with complete i18n
- ๐ฆ **TypeScript Native** - Full type safety and IntelliSense
- โก **Zero Configuration** - Works out of the box
- ๐ **Plugin System** - Extensible architecture
- ๐ **Real-time Monitoring** - Status, logs, and metrics
- ๐ **Advanced File Analysis** - Validate, analyze, and manage compose files
## ๐ Quick Start
### Installation
```bash
# Install globally for CLI
npm install -g docker-pilot
# Or locally for your project
npm install docker-pilot
```
### CLI Usage
```bash
# Start interactive menu
docker-pilot
# Or use direct commands
docker-pilot up # Start all services
docker-pilot status # Check status
docker-pilot logs app # View logs
docker-pilot compose list # List all compose files
docker-pilot compose analyze # Analyze compose structure
docker-pilot compose validate # Validate compose files
```
### As Library
```typescript
import { DockerPilot } from 'docker-pilot';
const pilot = new DockerPilot();
await pilot.initialize();
await pilot.up(); // Start services
const status = await pilot.status(); // Get status
```
## ๏ฟฝ What's New in v2.0.4
### ๐ Enhanced Docker Compose Management
Docker Pilot now provides **comprehensive docker-compose file management** with intelligent discovery:
```bash
# List all compose files recursively
docker-pilot compose list --variants
# Analyze compose file structure
docker-pilot compose analyze docker-compose.yml
# Validate compose files
docker-pilot compose validate
# Find compose files in complex projects
docker-pilot compose find /path/to/project
```
**Smart Discovery Features:**
- ๐ **Recursive Search**: Finds compose files up to 6 levels deep
- ๐ฏ **Smart Prioritization**: Identifies main files vs. environment variants
- ๐ **Detailed Analysis**: Shows services, ports, dependencies, and file info
- ๐ **Environment Detection**: Recognizes dev, prod, test variants automatically
- โ
**Real-time Validation**: Syntax and structure validation with detailed reports
### ๐ฏ Intelligent Project Auto-Detection
Starting Docker Pilot now automatically detects your project structure:
```
๐ Searching for docker-compose files recursively...
๐ Search depth: 6 levels
Found 3 docker-compose files:
1. docker-compose.yml ๐ฏ๐
๐ 2.1 KB | ๐
22/06/2025
๐ ๏ธ 4 services: web, api, database, redis
2. backend/docker-compose.dev.yml (development) ๐(2)
๐ 1.8 KB | ๐
21/06/2025
๐ ๏ธ 2 services: api-dev, database-dev
```
## ๏ฟฝ๐ฎ Interactive Menu
Docker Pilot's standout feature is its **interactive terminal menu** that makes Docker management intuitive:

```bash
$ docker-pilot
๐ณ My Project - Docker Pilot v2.0 ๐ณ
๐ Basic Commands:
1. Start all services
2. Stop all services
3. Restart all services
4. Rebuild and start all services
5. View logs of all services
6. View services status
๐ ๏ธ Advanced Commands:
7. Open shell in service
8. Check services health
9. Monitor in real time
10. Update all images
โ๏ธ Maintenance:
11. Clean unused resources
12. Deep clean
13. Show configuration
๐ง App:
14. Start app
15. Restart app
16. View app logs
Choose your option: โ
```
### Language Support
Docker Pilot automatically detects your system language and provides full localization:
- ๐บ๐ธ **English** - Complete interface
- ๐ง๐ท **Portuguรชs** - Interface completa
Switch languages on-the-fly through the advanced settings menu!
## ๐ Requirements
- **Node.js** >= 18.0.0
- **Docker** >= 20.0.0
- **Docker Compose** >= 2.0.4
## ๐ฏ Use Cases
**๐จโ๐ป Developers**
- Quick project setup
- Development workflow automation
- Multi-service management
- Interactive debugging
**๐ข Teams & Enterprise**
- Standardized Docker workflows
- Multi-environment support
- Automated backups
- Performance monitoring
## ๐ง Configuration
Docker Pilot works with zero configuration, but you can customize it:
```json
{
"projectName": "My Amazing App",
"language": "en", // or "pt-br"
"services": {
"app": {
"port": 3000,
"description": "Main application"
},
"database": {
"port": 5432,
"description": "PostgreSQL database"
}
}
}
```
## ๐ Why Choose Docker Pilot?
<div align="center">
| ๐ณ **Native Docker** | ๐ฎ **Interactive** | ๐ **Global** | ๐ **Modern** |
|:---:|:---:|:---:|:---:|
| Built specifically for Docker workflows | Terminal UI that's actually enjoyable | Multi-language from day one | TypeScript, ES6+, latest standards |
| ๐ **Extensible** | ๐ **Intelligent** | ๐ก๏ธ **Reliable** | โก **Fast** |
|:---:|:---:|:---:|:---:|
| Plugin system for custom needs | Auto-detection and smart defaults | Battle-tested error handling | Optimized for performance |
</div>
## ๐ Documentation
**Complete documentation is available at: [https://Jonhvmp.github.io/docker-pilot/](https://Jonhvmp.github.io/docker-pilot/)**
- ๐ [Getting Started Guide](https://jonhvmp.github.io/docker-pilot/getting-started/installation/)
- ๐ฎ [Interactive Menu Guide](https://Jonhvmp.github.io/docker-pilot/user-guide/interactive-menu/)
- ๐ [API Reference](https://jonhvmp.github.io/docker-pilot/api/core/)
- ๐ [Plugin Development](https://Jonhvmp.github.io/docker-pilot/advanced/plugins/)
- ๐ [Internationalization](https://Jonhvmp.github.io/docker-pilot/user-guide/i18n/)
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](https://Jonhvmp.github.io/docker-pilot/development/contributing/) for details.
## ๐ License
Docker Pilot is [ISC licensed](LICENSE).
---
<div align="center">
**[โฌ Back to top](#docker-pilot-)**
Made with โค๏ธ by [Jonhvmp](https://www.linkedin.com/in/jonhvmp) โข [JA Solutions Engine](mailto:jasolutionsengine@gmail.com)
**๐ If Docker Pilot helps you, please give it a star! ๐**
</div>