1
Install the Portal CLI
The CLI is a single binary. It works on macOS, Linux, and Windows (WSL).
curl -fsSL https://portal.dev/install | shVerify the install:
$ portal --version
portal 4.0.2 (2026-07-01, darwin-arm64)2
Link a repository
From inside any Git repo, run portal link. We'll autodetect the framework and create a project.
$ cd ~/apps/acme-web
$ portal link
? What team should this belong to? › acme
? Project name? › acme-web
? Framework detected: next.js@15.2 › use detected
? Production branch? › main
✔ Linked to acme/acme-web
✔ Wrote portal.config.ts
✔ Added .portal/ to .gitignore3
Add environment variables
Secrets are scoped per environment (production, preview, development). They're encrypted at rest and injected at build & runtime.
# add a secret to production only
$ portal env add DATABASE_URL --prod
# add to production + preview
$ portal env add STRIPE_SECRET --prod --preview
# pull secrets into a local .env
$ portal env pull .env.local4
Deploy
You have two options: push to your production branch, or run portal deploy directly.
$ git push origin main
portal › build ▓▓▓▓▓▓▓▓▓▓ 6.4s
portal › upload 214 assets
portal › deploy to 42 regions
✔ https://acme-web.portal.app (production)
Total: 8.3s5
Ship a preview
Any non-production branch gets its own URL, automatically. Open a PR to see the Portal bot post a link.
$ git checkout -b fix/hydration
$ git commit -am "fix: hydration mismatch"
$ git push -u origin fix/hydration
✔ https://acme-web-git-fix-hydration.portal.app
✔ Comment posted on github.com/acme/web/pull/482You're done
That's the whole quickstart.
Read the CLI reference, or jump straight into your first project.