Metadata-Version: 2.4
Name: drove-cli
Version: 0.0.8
Summary: Drove Command Line Interface
License: Apache-2.0
Keywords: container,docker,podman,distributed-systems,container-orchestrator
Author: Santanu Sinha
Author-email: santanu.sinha@gmail.com
Maintainer: Santanu Sinha
Maintainer-email: santanu.sinha@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Clustering
Classifier: Topic :: System :: Distributed Computing
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
Requires-Dist: tenacity (>=8.2.3,<9.0.0)
Requires-Dist: urllib3 (>=2.0.7,<3.0.0)
Project-URL: Repository, https://github.com/PhonePe/drove-cli
Description-Content-Type: text/markdown

# Drove CLI

Command-line interface for the [Drove Container Orchestrator](https://github.com/PhonePe/drove-orchestrator).

## Installation

### Using pip

```bash
pip install drove-cli
```

### Using pip (virtual environment)

```bash
python3 -m venv ~/.venvs/drove-cli
source ~/.venvs/drove-cli/bin/activate
pip install drove-cli
```

To activate in a new shell:
```bash
source ~/.venvs/drove-cli/bin/activate
```

### Using Docker

```bash
docker pull ghcr.io/phonepe/drove-cli:latest
```

Create a wrapper script for convenience:

```bash
cat > ~/bin/drove << 'EOF'
#!/bin/sh
docker run --rm -it --network host \
    -v ${HOME}/.drove:/root/.drove:ro \
    ghcr.io/phonepe/drove-cli:latest "$@"
EOF
chmod +x ~/bin/drove
```

## Upgrade

### Using pip

```bash
pip install -U drove-cli
```

### Using Docker

```bash
docker pull ghcr.io/phonepe/drove-cli:latest
```

## Configuration

Create `~/.drove` with your cluster configuration:

```ini
[DEFAULT]
stage_token = <your-stage-token>
prod_token = <your-prod-token>

[local]
endpoint = http://localhost:10000
username = admin
password = admin

[stage]
endpoint = https://drove.stage.example.com
auth_header = %(stage_token)s

[prod]
endpoint = https://drove.prod.example.com
auth_header = %(prod_token)s
```

## Quick Start

```bash
# Verify connection
drove -c prod cluster ping

# View cluster status
drove -c prod cluster summary

# List applications
drove -c prod apps list

# Get application info
drove -c prod apps info <app-name>
```

## Commands

| Command | Description                                                           |
|---------|-----------------------------------------------------------------------|
| `appinstances` | Application instance operations                                       |
| `apps` | Application lifecycle Management (list, info, deploy, scale, suspend) |
| `cluster` | Cluster operations (ping, summary, leader, maintenance)               |
| `config` | CLI configuration management                                          |
| `describe` | Show detailed information about a resource                            |
| `executor` | Executor management                                                   |
| `localservices` | Local service management                                              |
| `lsinstances` | Local service instance operations                                     |
| `tasks` | One-off task execution                                                |

Use `drove -h` or `drove <command> -h` for detailed help.

## Global Options

```
-f, --file FILE        Configuration file (default: ~/.drove)
-c, --cluster CLUSTER  Cluster name from config file
-e, --endpoint URL     Drove endpoint URL
-t, --auth-header HDR  Authorization header value
-u, --username USER    Cluster username
-p, --password PASS    Cluster password
-i, --insecure         Skip SSL verification
-d, --debug            Print error details
```

## Documentation

Full documentation is available at **[phonepe.github.io/drove-orchestrator](https://phonepe.github.io/drove-orchestrator/cli/)**

## License

© 2024 Santanu Sinha | Apache 2.0

