# Portti

Push a local file or folder behind an email gate. Guests open `https://<id>.portti.live` and get a one-time code from `noreply@portti.app`.

## When the user wants to share / push / Portti

1. Use the file the user named. For an app, prefer its built folder (`./dist`, `./out`, `./build`).
2. Ask who may open it: exact emails and/or `@company.com` domain rules.
3. Run: `npx -y portti push <path> --to <emails>` (alias: `share`)
4. Return the `https://<id>.portti.live` URL.

Exact emails are always fine (including `anna@gmail.com`). Company `@domain` rules like `@acme.com` are fine. Freemail wildcards (`@gmail.com`, `@outlook.com`, etc.) are refused unless `--allow-freemail`.

## Other intents → command

| User wants | Run |
|---|---|
| Who opened / stats / activity | `npx -y portti log <id>` (`--open` for a short-lived browser URL) |
| Who is allowlisted | `npx -y portti guests <id>` (alias: `users`) |
| Add people | `npx -y portti add <id> --to a@x.fi,@acme.com` (alias: `invite`) |
| Remove people | `npx -y portti revoke <id> --to a@x.fi` (alias: `remove`) |
| List my shares | `npx -y portti list` |
| Change expiry | `npx -y portti expire <id> --days N` |
| Take down now | `npx -y portti delete <id>` (aliases: `unpublish`, `expire --now`) |
| Update content | `npx -y portti push <path> --to … --id <id>` |

`guests` = allowlist. `log` = who actually opened it.

## Login (first time)

On `login_required`: ask email → `npx -y portti login <email>` → ask for the 6-digit code → `npx -y portti login <email> --code NNNNNN` → retry.

## MCP

`npx -y portti mcp` — `portti_push`, `portti_guests`, `portti_add`, `portti_revoke`, `portti_list`, `portti_log`, `portti_expire`, `portti_login`, `portti_verify`.
