Sozame / Setup guide Home Open portal
Setup guide

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.

Node 18 or newer No install required 100 MB per deploy Free to start
01

Create your account

Open the portal and pick one of two ways in.

  1. 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.
  2. Name your workspace. This is the container for your projects, keys, members and domains. Whatever you call it, you are its admin.
  3. 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.

02

Your first project

A project is one site with its own versions, members, domains and deploy key.

  1. On the dashboard press + New project.
  2. 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.
  3. 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.

03

Deploy it

From the root of the folder you want to publish — usually the one containing your build output:

terminal
$ 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:

FileWhat it holdsCommit it?
sozame.jsonThe project slug and build folder.Yes — it is your project's config.
~/.sozame/config.jsonThe API URL and your tokens.Never — it lives outside the repo.
.sozameignoreOne glob per line for files to skip when uploading.Optional

Then deploy:

terminal
$ 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.

04

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.

05

Share it and invite people

Visibility

Each project is private or public. Public means anyone with the link can open the preview. Private means sign-in plus membership — the portal embeds a signed grant in the preview link that expires after seven days, and without a valid grant the preview returns 403.

Members and roles

Invite by email from the project page. Someone with an existing account joins immediately; anyone else sits as pending until they sign up.

RoleCan do
ClientView projects shared with them and follow deploys.
DeveloperCreate projects, deploy, roll back, manage project keys.
AdminFull workspace control: members, roles, keys, domains.
06

Custom domain

On the project page, find Domains, enter the hostname you want (for example portal.school.ac.ke) and add it.

  1. Sozame shows the target host for the project.
  2. At your DNS provider, create a CNAME record for that hostname pointing at the target.
  3. Come back and check the status next to the hostname. Added domains start as pending and 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.

07

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

ScopeGrants
projects:readList and view projects, deployments and members.
projects:writeCreate and edit projects, invite members, rotate deploy tokens.
deploy:writeUpload new deployments and roll back to older versions.

Use it

List your projects:

bash
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:

bash
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:

bash
$ 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.

08

Reference

CLI

CommandWhat it does
npx sozameInteractive setup: token, slug, build folder.
npx sozame deployDeploy 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

VariableEffect
SOZAME_TOKENUse this token instead of the saved config — ideal for CI and agents.
SOZAME_PROJECTProject slug when it is not passed or in sozame.json.
SOZAME_APIPortal 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.

09

Troubleshooting

SymptomWhat it means
401 on deployThe token was rotated or revoked. Rotate on the project page and run npx sozame again.
403 with a scope nameThe agent token is missing that scope. Scopes are fixed at creation — create a new token.
Deploy succeeds, preview is blankThe build folder has no index.html at its root. Point --dir at the folder that contains it.
403 on a private previewThe signed grant expired (seven days). Reopen the project from the portal to get a fresh link.
npx cannot find the packageNode is older than 18. Check with node -v.
Domain stuck on pendingDNS has not propagated, or the CNAME points somewhere else. Allow up to a few hours.