Skip to content

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 CLI first: it is the prerequisite for sonenta login, project/key creation and sonenta init.

Fenêtre de terminal
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):

Fenêtre de terminal
npm install @sonenta/react-i18next

Astro 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.

Fenêtre de terminal
# 1. Account sign-in: opens the browser, you approve the login
sonenta login
# 2. Create the project -> prints its UUID
sonenta projects create "My site"
# 3. Create an API key (shown once) + store it for the CLI/MCP
sonenta api-keys create --name "ai-agent" --scopes "mcp:*" --save
# 4. Wire the project (MCP + config + CLAUDE.md block)
sonenta init --project <PROJECT_UUID>
  • sonenta login opens verification_uri_complete in the browser; approve via your dashboard session (SSO / MFA supported). The session is then stored and refreshed automatically.
  • sonenta api-keys create prints the token once (format snt_live_<prefix>.<secret>); --save stores it as the host key.
  • dev keys: add at least --ip-allowlist or --origin-allowlist. More than one organization? --org <slug>.
ScopeForUsed by
mcp:*drive the project via AI agents / the MCP server@sonenta/mcp, sonenta agents
project:read · project:writeread / manage content from the command line@sonenta/cli
project:settings:writemanage project configuration@sonenta/cli (advanced)
missing:writereport missing keys at runtime@sonenta/react-i18next SDK
cdn:write · approvals:writepublish to the CDN / manage approvalsadvanced flows

The canonical token prefix is snt_live_; existing vrb_live_ keys remain valid.