# Portti > Push a file or folder behind an email gate. Guests open a portti.live link and get a one-time code from noreply@portti.app. No guest accounts. No shared passwords. This file is for AI editors (Cursor, Claude Code, ChatGPT, Copilot, etc.). Humans read https://portti.app/. ## What to do when the user asks to share / push / Portti 1. Use the file the user named. For an app, prefer its built folder (e.g. `./dist`, `./out`, `./build`). 2. Ask who may open it: emails and/or `@domain` rules (e.g. `anna@x.fi`, `@acme.com`). 3. Run: ``` npx -y portti push --to ``` 4. Return the `https://.portti.live` URL. That is what the user shares. ## Other intents (do not only think about push) | User wants | Command | |---|---| | Stats / who opened / activity | `npx -y portti log ` — add `--open` for a 5-minute browser URL | | Who is allowlisted | `npx -y portti guests ` (alias: `users`) | | Add / invite guests | `npx -y portti add --to b@x.fi,@acme.com` (alias: `invite`) | | Remove / kick guests | `npx -y portti revoke --to b@x.fi` (alias: `remove`) | | List my shares | `npx -y portti list` | | Change expiry | `npx -y portti expire --days N` | | Take down / unpublish now | `npx -y portti delete ` (aliases: `unpublish`, `expire --now`) | | Update files on an existing share | `npx -y portti push --to … --id ` | `guests` = who may open. `log` = who actually opened. Prefer `add`/`revoke` over a new push when content is unchanged. ## First time on this machine (login) If the CLI/MCP returns `login_required` (or prompts for login): 1. Ask the user for their email. 2. `npx -y portti login ` — a 6-digit code is emailed from noreply@portti.app. 3. Ask the user for the code. 4. `npx -y portti login --code NNNNNN` — stores a bearer token at `~/.portti/token`. 5. Retry the push. With MCP, use `portti_login`, ask for the code, then use `portti_verify`. There is no `portti verify` CLI command. Do not invent tokens. Do not open a browser. Do not tell the user to sign up on a website. ## MCP (Cursor / Claude Code) ``` npx -y portti mcp ``` Tools: `portti_push`, `portti_guests`, `portti_add`, `portti_revoke`, `portti_list`, `portti_log`, `portti_expire`, `portti_login`, `portti_verify`. Cursor config (`.cursor/mcp.json`): ``` { "mcpServers": { "portti": { "command": "npx", "args": ["-y", "portti", "mcp"] } } } ``` Same login_required → ask email → login → ask code → verify → retry sequence. ## Useful commands ``` npx -y portti push --to a@x.fi,@org.fi npx -y portti push --to a@x.fi --id npx -y portti add --to b@x.fi npx -y portti revoke --to b@x.fi npx -y portti guests npx -y portti log npx -y portti log --open npx -y portti list npx -y portti expire --days 30 npx -y portti delete ``` ## Domains (do not mix these up) - portti.app — product site, this file, skill.md, email sender (noreply@portti.app) - portti.live — share URLs guests open (`https://.portti.live`), owner API under `/api/` ## Rules of thumb - A gate, not a vault: identity-gated hosting, not end-to-end encryption. - Ignore `.git`, `node_modules`, `.env*`, `.DS_Store` by default; respect `.porttiignore`. - Do not push secrets. If refused for size/secrets, tell the user the exact CLI fix from the error. - Errors are one sentence with the fix — relay that sentence to the user. - Free plan: short expiry and live-share caps; refusals mention https://portti.app/pro. - Exact emails are always fine (including `anna@gmail.com`). Company `@domain` rules like `@acme.com` are fine. Freemail wildcards (`@gmail.com`, `@outlook.com`, etc.) need `--allow-freemail`. ## One-liner for the user Tell your agent: push ./dist to Portti and share it with anna@x.fi