# 🚀 DevOps CLI - All-in-One DevOps Command Center

A comprehensive, modular DevOps CLI that orchestrates Docker, Kubernetes, Helm, Terraform, CI/CD pipelines, and cloud providers through a unified interface.

## Features

### Core Capabilities
- **Docker & Compose**: Build, push, run containers with Docker Compose
- **Kubernetes**: Deploy, scale, rollback with kubectl and Helm
- **Terraform**: Infrastructure as Code with multi-cloud support
- **CI/CD**: GitHub Actions, GitLab CI, Jenkins integration
- **Cloud Providers**: AWS, Azure, GCP operations
- **Monitoring**: Logs, metrics, health checks

### Architecture

```
┌─────────────────────────────────────────────────────────┐
│                      devops CLI                         │
├─────────────────────────────────────────────────────────┤
│  Plugins: docker | k8s | helm | terraform | ci | cloud │
├─────────────────────────────────────────────────────────┤
│  Core: Config | Logger | Executor | Validator           │
└─────────────────────────────────────────────────────────┘
```

## Installation

```bash
go build -o devops ./cmd/devops
./devops --help
```

## Quick Start

```bash
# Initialize a new project
devops init

# Check environment
devops doctor

# Build and deploy
devops build
devops deploy

# Full workflow
devops up
```

## Commands

### Project Management
| Command | Description |
|---------|-------------|
| `devops init` | Initialize a new DevOps project |
| `devops doctor` | Check environment and dependencies |
| `devops config` | View and edit configuration |

### Build & Run
| Command | Description |
|---------|-------------|
| `devops build` | Build Docker images |
| `devops run` | Run containers locally |
| `devops up` | Start full development environment |
| `devops down` | Stop all services |

### Deployment
| Command | Description |
|---------|-------------|
| `devops deploy` | Deploy to Kubernetes |
| `devops rollback` | Rollback to previous version |
| `devops scale` | Scale deployments |
| `devops status` | View deployment status |

### Infrastructure
| Command | Description |
|---------|-------------|
| `devops infra plan` | Plan infrastructure changes |
| `devops infra apply` | Apply infrastructure changes |
| `devops infra destroy` | Destroy infrastructure |

### CI/CD
| Command | Description |
|---------|-------------|
| `devops ci run` | Run CI pipeline |
| `devops ci deploy` | Deploy via CI/CD |
| `devops ci status` | Check pipeline status |

### Monitoring
| Command | Description |
|---------|-------------|
| `devops logs` | Stream logs |
| `devops exec` | Execute command in container |
| `devops shell` | Shell into container |
| `devops top` | View resource usage |

## Configuration

Create `devops.yml` in your project root:

```yaml
project:
  name: myapp
  version: 1.0.0

docker:
  context: .
  dockerfile: Dockerfile
  image: myapp
  tag: latest

compose:
  file: docker-compose.yml
  services:
    - app
    - db
    - redis

kubernetes:
  context: minikube
  namespace: production
  kubeconfig: ~/.kube/config

helm:
  chart: ./charts/myapp
  release: myapp
  values: ./values.yaml

terraform:
  backend: s3
  state: myapp.tfstate
  vars:
    environment: production

ci:
  provider: github
  workflow: .github/workflows/deploy.yml

cloud:
  provider: aws
  region: us-west-2
```

## Plugin System

Plugins extend functionality:

```go
type Plugin interface {
    Name() string
    Init(*Config) error
    Build() error
    Deploy() error
    Destroy() error
    Status() (string, error)
}
```

### Built-in Plugins
- `docker` - Docker and Docker Compose operations
- `kubernetes` - Kubernetes deployments with kubectl
- `helm` - Helm chart management
- `terraform` - Infrastructure as Code
- `github` - GitHub Actions integration
- `gitlab` - GitLab CI integration
- `jenkins` - Jenkins pipeline support
- `aws` - Amazon Web Services
- `azure` - Microsoft Azure
- `gcp` - Google Cloud Platform

## License

MIT
