Metadata-Version: 2.4
Name: inferlock
Version: 0.4.0
Summary: File encryption and licensing for AI models
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: cryptography

# inferlock

Protect AI model files with encryption and license-based runtime loading.

inferlock encrypts model files and loads them securely with expiration-based licenses.

---

## Features

* Model file encryption
* Runtime in-memory decryption
* License-based loading
* Expiration-based license
* Single-command packaging
* Bundle-based distribution
* CLI-first design

---

## Installation

```bash
pip install inferlock
```

or local dev:

```bash
pip install -e .
```

---

## Quick Start

Encrypt model and create license:

```bash
inferlock encrypt model.pt --expire 30d
```

Output:

```
model.inferlock/
 ├── model.inferlock
 └── license.inferlock
```

Load model:

```python
from inferlock import load

model = load("model.inferlock")
```

---

## CLI Usage

Encrypt model:

```bash
inferlock encrypt model.pt --expire 30d
```

Generate license manually:

```bash
inferlock license model.key --expire 30d
```

Show bundle info:

```bash
inferlock info model.inferlock
```

---

## Device Binding

Bind license to machine:

```bash
inferlock encrypt model.pt --expire 30d --bind-device
```

The license will be tied to the current machine's MAC address and cannot be used on other devices.

---

## Bundle Structure

```
model.inferlock/
 ├── model.inferlock
 └── license.inferlock
```

---

## Python API

Load bundle:

```python
from inferlock import load

model = load("model.inferlock")
```

Load manually:

```python
load("model.inferlock", "license.inferlock")
```

---

## License Format

```json
{
  "key": "...",
  "expire": "YYYY-MM-DD",
  "version": 1
}
```

## Version

### v0.2.0

* license system
* expiration support
* bundle packaging
* single command encrypt + license
* auto bundle loader

### v0.3.0

* device binding (MAC)
* per-device license

### v0.4.0

* signed license
* tamper protection

### v0.5.0

* encrypted license
* hidden key

---

## Roadmap

Future features:

* multi-device license
* trial license
* offline activation
* hardware fingerprint
* bulk license generation
* license revoke
* metadata bundle
* verify command

---

## Example

```bash
inferlock encrypt yolov7.weights --expire 7d
```

Load:

```python
load("yolov7.inferlock")
```
