Metadata-Version: 2.4
Name: sovereignbox
Version: 0.1.0
Summary: Local-first, encrypted AI memory and identity standard
Author: SovereignBox Contributors
License: Apache-2.0
Project-URL: Homepage, https://github.com/sovereignbox/sovereignbox
Project-URL: Repository, https://github.com/sovereignbox/sovereignbox
Project-URL: Issues, https://github.com/sovereignbox/sovereignbox/issues
Keywords: ai,memory,identity,encryption,privacy,llm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
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: Topic :: Security :: Cryptography
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0
Requires-Dist: pydantic>=2.0
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Dynamic: license-file

# SovereignBox

**Local-first, encrypted AI memory and identity standard.**

SovereignBox lets you own your AI conversation context — stored locally in an encrypted vault, portable across AI systems, and fully under your control.

## Features

- 🔐 **Encrypted vault** — Scrypt KDF + Fernet (AES-128-CBC + HMAC-SHA256)
- 📋 **Typed schema** — Pydantic v2 models for Identity, Preferences, and History
- 🔄 **Portable** — JSON export/import across any AI system
- 💻 **CLI** — Full command-line interface
- 🐍 **Python API** — Embeddable in any Python application

## Installation

```bash
pip install sovereignbox
```

## Quick Start

```bash
export SOVEREIGNBOX_PASSPHRASE=mysecretpassphrase

sovereignbox init
sovereignbox set-name "Alice"
sovereignbox set-style --verbosity detailed --tone professional
sovereignbox history add --system openai --summary "Discussed Python async patterns"
sovereignbox history list
sovereignbox info
sovereignbox export ./backup.json
```

## Python API

```python
from sovereignbox import PassportStore, Vault
from sovereignbox.schema.history import Session

vault = Vault("~/.sovereignbox/vault.db", passphrase="secret")
store = PassportStore(vault)

passport = store.load_or_create()
passport.identity.personal_info.display_name = "Alice"
session = Session(system_id="openai", summary="Chat about Python")
passport.history.add_session(session)
store.save(passport)
```

## Schema

- `DataPassport` — root document
  - `Identity` — who you are (name, email, AI personas, trust levels)
  - `Preferences` — how you like AI to respond (verbosity, tone, topics)
  - `InteractionHistory` — sessions and messages across AI systems

## Environment Variables

| Variable | Default | Notes |
|---|---|---|
| `SOVEREIGNBOX_VAULT` | `~/.sovereignbox/vault.db` | Override vault path |
| `SOVEREIGNBOX_PASSPHRASE` | *(interactive prompt)* | Set in scripts/CI |

## License

Apache 2.0
