From a blank account to a live project.
Everything you need in order: sign in, create a project, deploy from your terminal, attach a domain, then hand your AI agent a scoped key. Roughly ten minutes end to end.
Create your account
Open the portal and pick one of two ways in.
- Continue with Google, or fill in an email and a password of at least six characters and switch the form to Create an account. Google accounts never get a password — keep using Google.
- Name your workspace. This is the container for your projects, keys, members and domains. Whatever you call it, you are its admin.
- Create your first project (next section), and invite teammates if you have them. You can skip the invite step and come back later.
Onboarding is three screens: workspace, first project, team. If you close the tab halfway through, everything you finished is already saved.
Your first project
A project is one site with its own versions, members, domains and deploy key.
- On the dashboard press + New project.
- Give it a name. The slug is derived from it automatically — that slug is the project's identity in the CLI and in every preview URL.
- Sozame shows a deploy token once, starting with
sk_. Copy it somewhere safe now.
Lost the token? Open the project and rotate it. Rotating invalidates the old key immediately, so any machine or script still using it will start failing.
Deploy it
From the root of the folder you want to publish — usually the one containing your build output:
$ npx sozame
The setup walks you through three things: paste the sk_ token, confirm the project slug,
and point it at your build folder (for example dist or build).
It writes two files with very different jobs:
| File | What it holds | Commit it? |
|---|---|---|
sozame.json | The project slug and build folder. | Yes — it is your project's config. |
~/.sozame/config.json | The API URL and your tokens. | Never — it lives outside the repo. |
.sozameignore | One glob per line for files to skip when uploading. | Optional |
Then deploy:
$ npx sozame deploy # or target a specific project / folder $ npx sozame deploy my-site --dir ./dist
Your site goes live at sozame-preview.nairobitravel.workers.dev/p/<slug>.
Previews are served from a separate origin that never sees your portal session.
node_modules, .git, sozame.json and .DS_Store are
skipped automatically, so you rarely need an ignore file.
Versions and rollback
Every npx sozame deploy creates a new version — nothing is overwritten. The project page
keeps a history timeline with file and byte counts for each one.
- Roll back by picking an older version; it goes live instantly.
- Preview any version in the embedded canvas, switchable between desktop, tablet and phone.
- Compare what changed before promoting anything.
Because versions are immutable, a bad deploy is never a disaster — it is one click to undo.
Custom domain
On the project page, find Domains, enter the hostname you want (for example
portal.school.ac.ke) and add it.
- Sozame shows the target host for the project.
- At your DNS provider, create a
CNAMErecord for that hostname pointing at the target. - Come back and check the status next to the hostname. Added domains start as
pendingand are verified after DNS propagates.
Only the project owner, a workspace admin or a developer can add or remove a domain. A hostname can belong to exactly one project at a time.
Agent access (MCP)
Give an AI agent — Claude Code, a CI bot, a cron job — the ability to list projects, deploy and roll back without handing over your password or a full session. Same idea as a scoped API token.
Create a token
Open MCP in the portal,
press Create token, give it a name, tick the scopes it needs and set an expiry.
The token starts with sza_ and is shown once — store it in your agent's
secret store, never in a repository.
Scopes
| Scope | Grants |
|---|---|
projects:read | List and view projects, deployments and members. |
projects:write | Create and edit projects, invite members, rotate deploy tokens. |
deploy:write | Upload new deployments and roll back to older versions. |
Use it
List your projects:
curl -s https://sozame-portal.nairobitravel.workers.dev/api/projects \ -H "authorization: Bearer sza_YOUR_TOKEN"
Create a project — needs projects:write, and your role must allow it:
curl -s -X POST https://sozame-portal.nairobitravel.workers.dev/api/projects \
-H "authorization: Bearer sza_YOUR_TOKEN" \
-H "content-type: application/json" \
-d '{"name":"Agent Site"}'
# -> {"project":{"slug":"agent-site"},"token":"sk_..."}
Deploy with the CLI, which handles chunking, retries and finalisation for you:
$ SOZAME_TOKEN=sza_YOUR_TOKEN npx sozame deploy agent-site --dir ./dist
Three rules. Least privilege — a read-only bot does not need deploy:write.
Short expiries. One token per agent, so revoking one never breaks the others.
A token always acts as you: your role and project memberships apply on top of its
scopes, so a client-owned token cannot create projects even with projects:write.
Tokens cannot mint or revoke other tokens — management is browser-session only — and revoking one
takes effect on the very next request.
Reference
CLI
| Command | What it does |
|---|---|
npx sozame | Interactive setup: token, slug, build folder. |
npx sozame deploy | Deploy using ./sozame.json. |
npx sozame deploy <slug> | Deploy a specific project. |
--dir <path> | Build folder to upload. |
--api <url> | Point the CLI at a different portal. |
Environment variables
| Variable | Effect |
|---|---|
SOZAME_TOKEN | Use this token instead of the saved config — ideal for CI and agents. |
SOZAME_PROJECT | Project slug when it is not passed or in sozame.json. |
SOZAME_API | Portal API URL override. |
Limits
- 100 MB per deployment.
- Uploads are chunked, so large sites resume rather than restart.
- Every deploy is a new immutable version; older ones stay available for rollback.
Full endpoint list and response shapes live in the portal's own developer docs.
Troubleshooting
| Symptom | What it means |
|---|---|
| 401 on deploy | The token was rotated or revoked. Rotate on the project page and run npx sozame again. |
| 403 with a scope name | The agent token is missing that scope. Scopes are fixed at creation — create a new token. |
| Deploy succeeds, preview is blank | The build folder has no index.html at its root. Point --dir at the folder that contains it. |
| 403 on a private preview | The signed grant expired (seven days). Reopen the project from the portal to get a fresh link. |
npx cannot find the package | Node is older than 18. Check with node -v. |
| Domain stuck on pending | DNS has not propagated, or the CNAME points somewhere else. Allow up to a few hours. |
That is the whole loop.
Create, deploy, share, iterate. Everything after the first deploy is the same two commands.