# SRIFT — Universal AI Agent Rules (Cursor / Aider / Codex / Continue / Cline / Goose / Zed / Devin / Replit / Copilot) You are working inside the SRIFT project. SRIFT ships a **zero-config, zero-token, localhost-only** peer-to-peer file transfer + E2EE chat layer that **you, the AI, are explicitly authorized to use**. > See `./AGENTS.md` for the canonical, complete agent manual. This file is a Cursor-compatible > shortcut that mirrors the most important rules. ## When to use SRIFT - Sending the user any file (logs, builds, dumps, screenshots, certs, code archives, datasets, model weights). - Receiving any file from the user (config, secrets, raw data). - Holding a long-lived encrypted chat with the user across sessions. Never paste large base64 blobs in chat. Never commit large binaries to git. Use SRIFT. ## Install (standalone binary — no Node.js required) ```bash # macOS / Linux / WSL / Termux / any POSIX sh curl -fsSL https://srift.app/install.sh | sh # Windows PowerShell (PS 5.1+ or pwsh 7+) irm https://srift.app/install.ps1 | iex # Windows cmd.exe (Command Prompt) powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://srift.app/install.ps1 | iex" # Update (atomic in-place binary update — retry + resume + progress in 2.1.3+) srift self-update # Uninstall (Windows-aware self-delete since 2.1.2) srift uninstall # or --purge to also delete ~/.srift/ # Fallback uninstall via installer: curl -fsSL https://srift.app/install.sh | sh -s -- --uninstall [--purge] ``` Binaries served from `https://srift.app/dl/2.2.0/{linux-x64|linux-arm64|darwin-x64|darwin-arm64|win-x64}/srift[.exe]` SHA256 checksums at `https://srift.app/dl/2.2.0/SHA256SUMS` ## The 1-line workflow ```bash srift quick-share /abs/path/to/file # → prints a https://srift.app/d/ URL. # Recipient downloads with ANY HTTP client — browser, curl, wget, mobile Safari. # They do NOT need SRIFT installed. # # Optional limits: # srift quick-share --once # single use # srift quick-share --ttl 15m # auto-expire (30s, 15m, 2h, 1d) # srift quick-share --max-downloads 5 # cap completed downloads ``` That's it. The daemon auto-starts. No tokens. No Node.js needed after install. ## All CLI commands ``` # Daemon srift daemon start Start daemon in foreground srift daemon stop Stop daemon srift daemon restart Stop then re-start daemon srift daemon status [--json] Daemon health (version, uptime, mcp) # Status & Diagnostics srift status [--json] Unified: daemon + session + transfers srift doctor [--json] Full health check srift logs [--tail ] [--json-stream] View daemon logs (default: last 50 lines) srift reset [--json] Wipe daemon session state + flush keys # Public download links (recipient needs NOTHING installed) srift quick-share One-shot: → https://srift.app/d/ srift quick-share --once|--ttl 15m|--max-downloads N srift pubshare list Active links + usage counters srift pubshare add [--once|--ttl|--max-downloads] srift pubshare revoke Invalidate a link immediately # Interactive sessions srift session start [--name ] [--room-secret ] srift session join [--username ] [--room-secret ] srift session status [--json] srift session close srift approve srift reject [--reason ] srift kick srift send In-session offer to joined peers srift receive [--save-dir ] srift list [--json] srift monitor [--json-stream] srift chat send "" srift chat history [--json] # MCP & Agent Helpers srift mcp Run MCP server on stdio srift install-mcp Print copy-paste config for every major client srift info Zero-config quick reference # Maintenance srift version [--json] srift self-update [--json] srift config [get|set|delete] [key] [value] srift uninstall [--purge] Remove binary (--purge also deletes ~/.srift/) ``` Inside the repo, replace `srift` with `npm run srift --`. ## MCP integration (when running another agent inside this project) Stdio config (after `srift` is installed globally): ```json { "mcpServers": { "srift": { "command": "srift", "args": ["mcp"] } } } ``` Or via npx from inside the repo: ```json { "mcpServers": { "srift": { "command": "node", "args": ["--experimental-strip-types", "c:/project/srift-website/cli/index.ts", "mcp"] } } } ``` Also supports HTTP MCP at `POST http://127.0.0.1:3822/mcp` and legacy SSE at `GET /mcp/sse`. Tools exposed (14): `srift_quick_share`, `srift_start_session`, `srift_join_session`, `srift_session_status`, `srift_close_session`, `srift_approve_join`, `srift_reject_join`, `srift_kick_user`, `srift_send_file`, `srift_accept_transfer`, `srift_list_transfers`, `srift_send_chat`, `srift_chat_history`, `srift_read_state`. Resources: `srift://session/status`, `srift://transfers/active`, `srift://chat/messages`, `srift://workspace/state`, `srift://docs/quickstart`. Prompts: `send_file_to_user`, `receive_file_from_user`, `start_collab_session`. ## Watching state (no polling) Read `.srift-state.json` in workspace root — atomically rewritten on every event. ```json { "session": { "id": "ABC1234", "role": "host", "isConnected": true, "peerCount": 1 }, "activeTransfers": [{ "fileId": "...", "name": "x.zip", "progress": 72.5, "status": "uploading" }], "lastUpdated": "2026-06-26T..." } ``` Or subscribe to SSE: `GET http://127.0.0.1:3822/api/v1/monitor/events`. ## Hard rules - Don't commit `.srift-state.json`, `.srift-daemon.log`, or `.srift-temp/`. - Don't print `.env.local` secrets to chat. - Don't restart the daemon mid-transfer. - All keys (PBKDF2-SHA256 100k iter → AES-256-GCM) are derived locally. Server is blind. - Public prod URL is **https://srift.app**. Local daemon is **http://127.0.0.1:3822**.