Getting started
Quickstart
Three commands from an empty folder to a live, global function.
Install the CLI
Everything happens through @foundry/cli. Install it once, globally, then sign in — the CLI opens your browser to authenticate.
bash
$ npm i -g @foundry/cli $ foundry login ✓ signed in as ava@acme.co
Deploy your first function
Create a file that exports a handler, then deploy the folder. Foundry detects the entrypoint automatically.
api/time.ts
typescript
export default () => Response.json({ now: new Date().toISOString() });
bash
$ foundry deploy ✓ bundled api/time.ts ✓ live in 38 regions · 0.6s → https://time.acme.foundry.app
Verify it's live
Hit the URL from anywhere — it's served from the region nearest you.
bash
$ curl https://time.acme.foundry.app { "now": "2026-07-13T09:41:07.220Z" }
You're done
That URL is already global and immutable. Push again and Foundry gives you a fresh version — the old one stays reachable for instant rollbacks.
Was this page helpful?
Updated Jul 2026