Metadata-Version: 2.4
Name: putplace-client
Version: 0.8.2
Summary: PutPlace CLI client for scanning directories and uploading file metadata
License: Apache-2.0
Classifier: Development Status :: 4 - Beta
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.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 :: Archiving
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: configargparse>=1.7.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: rich>=13.7.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# PutPlace Client

A command-line tool for scanning directories and uploading file metadata to a PutPlace server.

## Installation

```bash
pip install putplace-client
```

## Quick Start

```bash
# Scan a directory and send metadata to server
ppclient /path/to/scan --api-key YOUR_API_KEY

# With custom server URL
ppclient /path/to/scan --url http://your-server:8000/put_file --api-key YOUR_API_KEY

# Dry run (don't send to server)
ppclient /path/to/scan --dry-run

# With exclude patterns
ppclient /path/to/scan --exclude .git --exclude "*.log" --exclude __pycache__
```

## Features

- Recursively scans directories
- Calculates SHA256 hashes for each file
- Auto-detects hostname and IP address
- Supports exclude patterns (wildcards, directory names)
- Progress bars and colored output
- Dry-run mode for testing
- Configuration file support

## Configuration

ppclient supports configuration via:

1. **Command-line arguments**
2. **Environment variables** (`PUTPLACE_EMAIL`, `PUTPLACE_PASSWORD`, `PUTPLACE_API_KEY`)
3. **Config files** (`~/ppclient.conf` or `./ppclient.conf`)

### Config file example

```ini
[DEFAULT]
url = http://your-server:8000/put_file
api-key = your-api-key
exclude = .git
exclude = *.log
exclude = __pycache__
```

## Command-line Options

```
ppclient [OPTIONS] PATH

Arguments:
  PATH                    Directory or file to scan

Options:
  --url URL               Server URL (default: http://localhost:8000/put_file)
  --api-key KEY           API key for authentication
  --email EMAIL           Email for JWT authentication
  --password PASSWORD     Password for JWT authentication
  --exclude PATTERN       Exclude pattern (can be repeated)
  --hostname NAME         Override auto-detected hostname
  --ip ADDRESS            Override auto-detected IP
  --dry-run               Scan without sending to server
  --verbose, -v           Verbose output
  --config FILE           Config file path
  --help                  Show help message
```

## Related

- [putplace-server](https://pypi.org/project/putplace-server/) - The PutPlace API server

## License

Apache-2.0
