verbaly

v0.88.0
io.github.verbaly-i18n/verbaly Checked 11 hours ago Published 2 days ago

i18n for coding agents: extract, check and translate an app's text, with drafts a person approves

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

verbaly_init Set up Verbaly in a project

Create the config file and the locale catalogs, and detect the bundler or meta-framework so the answer names the package to add and the line to wire (what `verbaly init` does). A file already there is kept, never overwritten, so running it again is safe. Use it when verbaly_doctor finds no config; once the project is set up, verbaly_doctor is the one to run.

ParameterTypeDescription
dirstringDirectory for the catalogs (default: locales)
localesarrayEvery locale, source included
rootstringProject root holding verbaly.config (defaults to the server working directory)
sourceLocalestringThe language you write in (default: en)

verbaly_doctor Diagnose the setup

Diagnose a Verbaly project end to end (what `verbaly doctor` does). It checks the config file, the catalogs and their JSON, the bundler plugin for the detected framework, the generated types, files the parser could not read, a t imported from a package that never exports it, orphan keys, and every failure `verbaly check` would report, and it reports them all at once instead of stopping at the first. Run it first when something does not work. Read-only. For the missing or broken translations themselves, use verbaly_missing.

ParameterTypeDescription
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_wrap Wrap hardcoded JSX text

Find hardcoded user-visible text in JSX/TSX files and wrap it in a t tagged template so the compiler can extract it (what `verbaly wrap` does). This is how an existing codebase is onboarded, and verbaly_extract then adds the wrapped texts to the catalogs. It only reports unless write is set, and text already wrapped is skipped, so running it again is safe. Text it cannot wrap safely (a sentence split across markup, an expression rendering JSX) is listed as needing a human. A file that does not bind t is never written, because the rewrite would not compile. It comes back in blocked, with the bi…

ParameterTypeDescription
rootstringProject root holding verbaly.config (defaults to the server working directory)
writebooleanApply the rewrites instead of only reporting

verbaly_extract Extract messages

Scan the source files, add new messages to the locale catalogs and refresh the generated types (what `verbaly extract` does). It writes the catalogs unless dryRun is set, and with the same code a second run changes nothing. prune also drops keys the code no longer references, translations included, and waits while any source file fails to parse. In a project without Verbaly, run verbaly_init first; for text still hardcoded in JSX, verbaly_wrap.

ParameterTypeDescription
dryRunbooleanReport what would change, write nothing
prunebooleanDrop keys no longer referenced (deletes their translations)
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_status Translation coverage

Translation coverage of the Verbaly project as numbers per locale: total messages, translated, machine translations awaiting review (drafts), broken, and translations written for an older source text (outdated). It scans the source like verbaly_extract but writes nothing. Read-only. For the entries behind the numbers, use verbaly_missing (what is missing or broken) or verbaly_drafts (each draft with its source text).

ParameterTypeDescription
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_missing Missing and broken translations

The gate `verbaly check` runs in CI, as lists: missing translations, unknown keys, keys written with two texts (collisions: every place shows the first text) and translations that cannot render what the source renders. A dropped {param}, a lost rich tag or a flattened plural block is that last kind. Warnings never fail the gate and are listed too: an incomplete plural set for the locale, keys only a translation has (extra), texts the code and the source catalog disagree on (divergent: the text in the code ships) and translations written for an older source text (outdated). With drafts set, it…

ParameterTypeDescription
draftsbooleanAlso list machine translations awaiting human review
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_translate Machine-translate missing entries

Fill missing translations with the configured provider (what `verbaly translate` does). The default provider is Claude, which needs @anthropic-ai/sdk and ANTHROPIC_API_KEY. Every new translation is saved as a draft awaiting human review (`verbaly review`), which no tool here can approve. Each language is saved as soon as its last batch lands, so a run that is cut keeps the languages it finished. A batch the provider never answers, or a language whose file cannot be saved, is reported in failed and everything else stays written, so a retry only asks for what is left. dryRun lists what would be…

ParameterTypeDescription
dryRunbooleanList missing entries per locale, call no provider
localesarrayTarget locales (default: all)
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_write_drafts Save translations an agent wrote

Save translations you wrote yourself, so neither a catalog nor the state file is ever edited by hand. Each one is checked the way verbaly_translate checks a provider (params, rich tags and plural cases must survive), written only for keys the source catalog has, and marked as a draft awaiting human review. Existing translations are kept unless overwrite is set, which is how an outdated one gets rewritten. Approving is not a tool here: a human reads the drafts (verbaly_drafts lists them) and runs `verbaly review --approve`.

ParameterTypeDescription
entries *arrayThe translations, by catalog key
locale *stringTarget locale, one of the project's non-source locales
overwritebooleanReplace translations that already exist, for example outdated ones
rootstringProject root holding verbaly.config (defaults to the server working directory)

verbaly_drafts Machine translations awaiting review

Every machine translation still waiting for a human, each with the source text and what the provider wrote, so a person can read both and decide. Read-only. Approving is deliberately not a tool here and never will be: a machine translation is unreviewed by definition, so accepting one is `verbaly review --approve`, run by a human. For how many drafts each locale has, verbaly_status is enough; verbaly_missing lists them next to the gate.

ParameterTypeDescription
localesarrayTarget locales (default: all). One the project does not have is an error
rootstringProject root holding verbaly.config (defaults to the server working directory)