Metadata-Version: 2.4
Name: magiclock
Version: 0.5.5
Summary: MagicLock — software licensing & code protection (machine-fingerprint node-lock) + the unified `magiclock` CLI (runtime gate, Noise_NK channel, compiled-binary build tool).
License-Expression: LicenseRef-Proprietary
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
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=42
Provides-Extra: build
Requires-Dist: nuitka>=2; extra == "build"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Dynamic: license-file

# `magiclock`

`pip install magiclock` installs **MagicLock** — software licensing & code
protection with a machine-fingerprint node-lock (no hardware needed) — plus the
unified `magiclock` CLI. This is the one customer-facing package.

What's inside (import packages, one dist):

| Package | Role |
|---|---|
| `magiclock` | The CLI + the runtime: node-lock vault (`SoftwareVaultTransport`), `.pya` import hook, and the top-level API (`magiclock.bootstrap()` / `magiclock.open_model()`). |
| `magiclock_host` | Tier-neutral runtime SDK: `MagicLockRuntime` (7-step gate), `Transport` seam, MLEV codec |
| `magiclock_channel` | Secure channel: Noise_NK handshake + MLCC/MLCR framing |
| `magiclock_build` | native-binary build/packaging (strong protection tier) — the compiler dependency is the `[build]` extra |

## Quickstart

```bash
pip install magiclock            # MagicLock + CLI
pip install 'magiclock[build]'   # + compiled strong-protection builds (compiler pulled automatically)

magiclock activate               # authenticate + bind this machine (node-lock seat)
magiclock protect app.py         # protect code (import-hook tier)
magiclock run app.py             # run protected code
magiclock build app.py           # compiled strong protection (native binary)
magiclock status                 # account + this machine's seat / license
```

The full command set: `activate / status / deactivate · protect / protect-model
/ run · build · skill`. Authentication is folded into `activate`
(device-authorization flow, or `--with-token` for CI); `activate` is
idempotent (re-run to refresh); `deactivate` frees the seat server-side by
default (`--local-only` to skip that and only clear this machine). Run
`magiclock --help`.

Using an AI coding agent (Claude Code) to protect your project? Run
`magiclock skill` once — it installs
`.claude/skills/magiclock-protect/SKILL.md` into the current project, which
teaches the agent how to pick a protection tier and drive `protect`/`build`
correctly against your codebase (`--dir DIR` to target another project,
`--force` to overwrite, `--print` to inspect the content first).

## Language

CLI messages are available in English, 简体中文, 繁體中文, 日本語, 한국어 and
français. The language is picked automatically: set `MAGICLOCK_LANG` (e.g.
`zh-Hans`, `zh-TW`, `ja`, `fr`) to force one; otherwise the language preference
saved on your account is used after `magiclock activate`, falling back to your
system locale, then English. (`--help` text stays English.)

Enable tab completion (bash/zsh):

```bash
magiclock completion bash >> ~/.bashrc    # or: source <(magiclock completion bash)
magiclock completion zsh >> ~/.zshrc      # or: source <(magiclock completion zsh)
```

Supported interpreters: Python 3.9 – 3.14 (installs into the *customer's*
interpreter).
