Metadata-Version: 2.4
Name: dl-cli-aiteam
Version: 1.0.0
Summary: CLI and Python library to upload, download, and manage file transfers to/from H100 via Relay Server
License: MIT
Project-URL: Repository, https://github.com/your-org/dl-cli
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Networking
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: tqdm>=4.66.0
Provides-Extra: cli
Requires-Dist: typer>=0.15.0; extra == "cli"
Requires-Dist: rich>=13.9.0; extra == "cli"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=6.0; extra == "dev"
Requires-Dist: ruff>=0.9; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=6.0; extra == "dev"

# DL CLI

Python library and CLI to upload, download, and manage file transfers to/from H100 via Relay Server.

## Installation

```bash
# Full install (library + CLI)
pip install dl-cli[cli]

# Library only (no typer/rich)
pip install dl-cli
```

## CLI Usage

```bash
# Configure
dl init
dl config --server-url http://your-server:8000 --transfer-url http://your-server:8001

# List remote files
dl ls /data/models -l

# Download
dl download /data/models/checkpoint.pt -o ./checkpoint.pt
dl download /data/models/checkpoint.pt --chunked       # large files
dl download /data/models/checkpoint.pt --resume <id>   # resume failed transfer

# Upload
dl upload ./model.pt /data/models/model.pt
dl upload-multi ./file1.pt ./file2.pt -d /data/models/

# Transfer management
dl transfers list
dl transfers status <transfer-id>
dl transfers cancel <transfer-id>

# Health check
dl health
```

## Library Usage

```python
from dl_cli import FileServiceClient, TransferServiceClient

# List files
fc = FileServiceClient()
entries = fc.list_directory("/data/models")

# Stream download
for resp, chunk in fc.download_stream("/data/models/file.pt"):
    ...

# Chunked upload via transfer service
tc = TransferServiceClient()
transfer = tc.init_upload("model.pt", "/data/models/model.pt", file_size=1024000)
tc.upload_chunk(transfer["transfer_id"], 0, data)
tc.commit_upload(transfer["transfer_id"])
```

## Project Structure

```
dl_cli/
├── deployment/
│   ├── Dockerfile
│   └── deploy.sh
├── src/
│   └── dl_cli/
│       ├── __init__.py
│       ├── main.py
│       ├── client.py
│       ├── config.py
│       └── commands/
├── pyproject.toml
├── requirements.txt
└── README.md
```

## Build & Publish

```bash
pip install build twine
python -m build
twine upload dist/*
```

## Docker

```bash
./deployment/deploy.sh build
./deployment/deploy.sh rerun
docker run --rm dl-cli --help
```
