Create a project & API keys
To drive Sonenta from your code, you need a project and an API key. It is all done in the CLI, with a browser account sign-in (gh / gcloud style, no password in the terminal).
Install the packages
Section titled “Install the packages”Install the CLI first: it is the prerequisite for sonenta login, project/key creation and sonenta init.
npm install -g @sonenta/cli # provides the `sonenta` command# one-off, no global install: npx -y @sonenta/cli <command>To render your strings in the app, add the runtime SDK for your framework (React example):
npm install @sonenta/react-i18nextAstro integration: @sonenta/astro. In-context feedback: @sonenta/feedback.
The MCP server (@sonenta/mcp) needs no manual install: sonenta init wires it into .mcp.json (run via npx -y @sonenta/mcp).
In Claude Code, quit your session and start a fresh one after sonenta init. Claude Code reads .mcp.json when the session starts, so a session that was already open keeps running without the Sonenta tools.
Create the project and key
Section titled “Create the project and key”# 1. Account sign-in: opens the browser, you approve the loginsonenta login
# 2. Create the project -> prints its UUIDsonenta projects create "My site"
# 3. Create an API key (shown once) + store it for the CLI/MCPsonenta api-keys create --name "ai-agent" --scopes "mcp:*" --save
# 4. Wire the project (MCP + config + CLAUDE.md block)sonenta init --project <PROJECT_UUID>sonenta loginopensverification_uri_completein the browser; approve via your dashboard session (SSO / MFA supported). The session is then stored and refreshed automatically.sonenta api-keys createprints the token once (formatsnt_live_<prefix>.<secret>);--savestores it as the host key.- dev keys: add at least
--ip-allowlistor--origin-allowlist. More than one organization?--org <slug>.
API key scopes
Section titled “API key scopes”| Scope | For | Used by |
|---|---|---|
mcp:* | drive the project via AI agents / the MCP server | @sonenta/mcp, sonenta agents |
project:read · project:write | read / manage content from the command line | @sonenta/cli |
project:settings:write | manage project configuration | @sonenta/cli (advanced) |
missing:write | report missing keys at runtime | @sonenta/react-i18next SDK |
cdn:write · approvals:write | publish to the CDN / manage approvals | advanced flows |
The canonical token prefix is
snt_live_; existingvrb_live_keys remain valid.