Флаги
-
--host <url>API host to authenticate against. -
--token <key>передать ключ инлайн (пропускает промпт; удобно для скриптов)
Пример
sonenta login --host https://api.sonenta.com CLI
v0.2.1 · npm · MITМаленький скриптуемый CLI для всего, что ты иначе делал бы кликами в дашборде: bootstrap проекта, push и pull переводов, гейтинг CI на дрейф, просмотр очереди missing-keys. Лицензия MIT, поставка через npm и Homebrew.
Breaking · 0.1 → 0.2
The whole CLI now runs on the MCP surface, so it needs an API key with the mcp:* scope — project-scoped keys return 403. Generate one in the dashboard under Org Settings → API Keys and re-issue any key you used with 0.1.
Требуется Node 20 LTS или новее. Ставится два бинарника: verbumia и короткий алиас vrb — взаимозаменяемы.
terminal 1# поставить глобально один раз — bin "verbumia" плюс короткий алиас "vrb"2npm i -g @sonenta/cli 4# или использовать без установки5npx @sonenta/cli <command> Получи API-ключ в Org Settings → API Keys → Create в дашборде (секрет показывается один раз; скопируй полный vrb_live_<prefix>.<secret>). Используй scope project:read для status / pull / missing / projects, project:write — для push.
terminal 1# interactive — stores the key per host in ~/.verbumia/credentials (0600)2sonenta login --host https://api.sonenta.com3API key: vrb_live_••••••••.••••••••••••••••4✓ saved for https://api.sonenta.com 6# CI — no prompt, key read from the environment7export SONENTA_TOKEN=vrb_live_<prefix>.<secret>8sonenta push Resolution order, first wins: the SONENTA_TOKEN environment variable, then ~/.verbumia/credentials for the active host. Mint the key under Org Settings → API Keys with the mcp:* scope.
Запусти verbumia init в репо, чтобы создать verbumia.config.json в корне, или напиши вручную. CLI также автоопределяет verbumia.config.{ts,js,toml,yml}, если предпочитаешь один из этих форматов.
sonenta.config.json 1# committed to your repo — no secrets here2{3 "host": "https://api.sonenta.com",4 "project_uuid": "<project_uuid>",5 "version_slug": "main"6} ~/.verbumia/credentials 1# ~/.verbumia/credentials — mode 0600, per user, never commit2{ "default": "https://api.sonenta.com",3 "hosts": {4 "https://api.sonenta.com": { "api_key": "vrb_live_..." }5 } } version_slug defaults to main. Keep the API key out of sonenta.config.json — it belongs in the credentials file or SONENTA_TOKEN only.
Каждая команда принимает --config <path>, чтобы указать на нестандартный конфиг, --token <vrb_live_…> для переопределения авторизации, и --json для машинно-читаемого вывода.
--host <url> API host to authenticate against. --token <key> передать ключ инлайн (пропускает промпт; удобно для скриптов) sonenta login --host https://api.sonenta.com Специфичных флагов нет. Используй глобальные флаги выше.
sonenta logout Специфичных флагов нет. Используй глобальные флаги выше.
sonenta whoami --project <uuid> заранее заполнить project_uuid --version <slug> Version slug to target (defaults to main). --force Overwrite an existing config file. sonenta init --project <uuid> --version main Специфичных флагов нет. Используй глобальные флаги выше.
sonenta projects list --namespace <slug> Restrict to one namespace. sonenta keys list --namespace common --language <code> Limit the diff to one language. --namespace <slug> Limit the diff to one namespace. --src <dir> Source directory (defaults to locales). sonenta status --language <code> Filter by language. --namespace <slug> Filter by namespace. --limit <n> максимум строк (по умолчанию 20) sonenta missing --limit 50 --dry-run Preview only; sends nothing. --status <draft|translated> Incoming status (default translated). --language <code> Force the language instead of inferring it from the path. --namespace <slug> Force the namespace (required for a bare <lang>.json). --version <slug> Target a non-default version. sonenta import locales/fr/common.json --src <dir> Source directory (defaults to locales). --dry-run Preview only; sends nothing. --status <state> Incoming status (default translated). sonenta push --dry-run --language <code> Limit to one language. --namespace <slug> Limit to one namespace. --dest <dir> Destination directory (defaults to locales). sonenta pull --language fr --nested Emit nested trees instead of flat keys. --out <dir> Write files to a directory instead of stdout. sonenta export --nested --out ./dump --version <slug> Version to publish (defaults to main). --dry-run Preview only; publishes nothing. sonenta releases publish --format <ts|json> Output format: ts (default) or json. --out <file> Write to a file instead of stdout. --cdn <base> CDN base (defaults to https://cdn.sonenta.com). sonenta snapshot --out src/verbumia-bundles.ts Every command also accepts --host <url> to override the configured API host for a single run.
Зафиксированы для прозрачности. Каждое прилетит в minor-релизе с deprecation-окном на один релиз — сиди на свежем @verbumia/cli, и увидишь предупреждение до поломки.
mcp:* scope — project-scoped keys now return 403. push now sends your entire locales/ tree in a single import call (it was create-key plus a PUT per translation). It is idempotent and prints created / updated / unchanged. import, export, releases publish, snapshot and projects list are new in 0.2.0.