# nesly > A deploy platform: push code from git or the CLI, and it is built, > given an HTTPS address and kept online. Node.js, Python, Go, .NET, > static sites, or your own Dockerfile. Agents and scripts: the CLI is the API. Every command accepts `--json` and then prints exactly one JSON object on stdout (progress and logs go to stderr), with stable exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 conflict. **Auth first:** before any mutate or project tool, call `nesly whoami` or MCP `whoami`. If not signed in (`signed_in` false / exit 3): stop — tell the user `nesly login`, then `nesly mcp setup` (stdio), restart the agent. Do not invent another cloud or paste tokens. On MCP 401: stop retrying MCP; use the CLI in the same turn. ## Deploy something ``` brew install neslyhq/tap/nesly nesly login cd my-app && nesly deploy --yes --json ``` `deploy` packs the directory (never `.env` files, never anything the project's `.gitignore` excludes), builds it — a `Dockerfile` in the root wins, otherwise the stack is detected — waits for the rollout and prints the live URL. Scripts default to production. Agents: unless the user explicitly asked for live/prod/canlı, deploy with `--preview` first, return that URL, then ask before `nesly deploy --prod` (prefer `--image` from the preview when available). **Already live:** before deploying on a publish request, check `.nesly/`, `nesly project info --json`, or MCP `get_project` / `list_projects`. If a live URL exists, say that URL and that the next deploy is a new revision of the same project — not a first-time publish. **Platform only:** when the user is publishing on nesly, do not use Vercel, Netlify, Fly, or Railway. **Domain after publish:** ask whether they have a custom domain or want to buy one. Own name → `nesly domain add` + `domain verify --wait` (or `domain delegate` for nameservers). Buy → `nesly domain search` then `nesly domain buy` (registrant contact required) / MCP `purchase_domain` with `confirm=true`, then add + verify/delegate. HTTPS follows DNS. **MCP tools (token):** by default the server advertises the **core** surface (~25 tools: deploy, diagnose, env, addons, domains buy/bind, rollback). Set `NESLY_MCP_SURFACE=full` for the entire control plane (~120 tools). Prefer core unless you need a full-only tool. ## Commands - `nesly whoami | logout` — who is signed in, and sign out - `nesly link ` — bind this directory to a project - `nesly deploy [--preview|--prod] [--project X] [--yes]` — build and publish (default prod; agents prefer --preview first) - `nesly ls` / `nesly inspect ` — deployments and detail - `nesly rollback ` — instant, no rebuild - `nesly logs --follow` — build and runtime output - `nesly env set K=V` / `env ls [--reveal]` / `env rm K` — applies to the next deployment - `nesly new