CLI and agents
Commands
Every command the TolkBot CLI has, with its options, an example and what it prints with --json.
This page is generated from the CLI's own command definitions, so it lists exactly what tolkbot --help does. Without a terminal every command that has --json prints JSON; a failure prints one error shape on stderr and exits with a code that says what kind of failure it was. Both are on For agents.
auth
Authenticate with TolkBot.
auth login
Log in to TolkBot.
tolkbot auth login [options]
| Option | Description |
|---|---|
--no-browser | Print the login URL instead of opening a browser (for headless hosts) |
Opens tolkbot.ai in a browser to sign in with GitHub, and stores a token in ~/.tolkbot/token. Without a terminal it prints the URL and the verification code as plain lines, so an agent can pass them on. See Installation and login.
Example:
tolkbot auth login
auth logout
Log out of TolkBot.
tolkbot auth logout [options]
| Option | Description |
|---|---|
--all | Sign out every CLI session on every machine, then remove the local token |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Without --all, only the token on this machine is removed, and a copy elsewhere keeps working until it expires. warning is added when $TOLKBOT_TOKEN is still set.
Example:
tolkbot auth logout --all
With --json, the default without a terminal:
{
"loggedOut": true,
"hadStoredToken": true,
"envTokenStillSet": false,
"signedOutAllCliSessions": true,
"signedOutAt": "2026-11-14T15:40:00.000Z"
}
auth whoami
Show the current authenticated user.
tolkbot auth whoami [options]
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
tokenSource is flag, env or file.
Example:
tolkbot auth whoami
With --json, the default without a terminal:
{
"authenticated": true,
"email": "you@example.com",
"tokenSource": "env",
"tokenPath": "/home/you/.tolkbot/token",
"expiresAt": "2026-12-14T15:38:34.000Z",
"expiresInSeconds": 2591987
}
init
Initialize TolkBot in the current repo.
tolkbot init [options]
| Option | Description |
|---|---|
--force | Overwrite existing config |
-y, --yes | Skip all prompts, accepting detected settings (the default without a terminal) |
--json | Output the result as JSON (implies --yes), the default without a terminal |
--base <locale> | Base locale (default: detected, else en) |
--targets <locales> | Comma-separated target locales (default: detected) |
--framework <name> | next-intl|react-i18next|i18next|expo|vue-i18n|custom (default: detected) |
--install | Also install i18n dependencies and scaffold files. Off by default when non-interactive. |
--project <slug> | Link this project. Default: the project whose directory you are in, else a new project here. |
--agents-file [path] | Add TolkBot's instructions for coding agents to this file, by default the nearest AGENTS.md or CLAUDE.md. At a terminal init asks; otherwise it writes them only with this option |
--no-json | Output text, even without a terminal |
Links the directory to a TolkBot project and writes tolkbot.json; see Project setup. agentsFile is null unless the agent instructions were written; change is created, added, updated or unchanged.
Example:
tolkbot init --yes --agents-file
With --json, the default without a terminal:
{
"projectId": "n978qkc0arw5z7vsenm4mea83x8j647t",
"project": "web",
"repositoryId": "nd798f2a21jd1qx352g9n7h6vn8j6m1b",
"repository": "acme/app",
"framework": "next-intl",
"subpath": "apps/web",
"sourcePattern": "messages/{locale}.json",
"config": "/home/you/acme/app/apps/web/tolkbot.json",
"baseLocale": "en",
"targets": ["es", "nb"],
"createdProject": false,
"installed": false,
"agentsFile": {
"path": "/home/you/acme/app/AGENTS.md",
"change": "added"
}
}
status
Show what each language is missing, what waits for a person, the open pull requests and the credits left.
tolkbot status [options]
| Option | Description |
|---|---|
--keys | List the keys by name under each language |
--exit-code | Exit 1 when any language has missing or changed keys |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
keys is there only with --keys, and lists key names, never source strings. status changes nothing, and its counts match translate --dry-run.
Example:
tolkbot status --keys
With --json, the default without a terminal:
{
"project": {
"name": "Web",
"slug": "web",
"url": "https://tolkbot.ai/projects/web",
"baseLanguage": "en",
"pattern": "messages/{locale}.json",
"autoCreatePR": true
},
"credits": {
"balance": 48210
},
"languages": [
{
"locale": "nb",
"expected": 120,
"upToDate": 108,
"missing": 9,
"changed": 2,
"heldByPerson": {
"total": 1,
"byReason": {
"locked": 1
}
},
"keptForPerson": {
"total": 0,
"byReason": {}
},
"untracked": 0,
"pullRequest": {
"number": 42,
"url": "https://github.com/acme/app/pull/42"
},
"keys": {
"missing": ["settings.title", "settings.save"],
"changed": ["nav.home", "nav.help"],
"heldByPerson": [
{
"key": "billing.title",
"reason": "locked"
}
],
"keptForPerson": [],
"untracked": []
}
}
]
}
translate
Translate what is missing or changed, and write the results into your locale files.
tolkbot translate [options] [command]
| Option | Description |
|---|---|
--src <locale> | Source locale (defaults to the project's base language) |
--dst <locale> | Destination locale |
--all | Every target language |
--dry-run | Print what a run would translate, and start nothing |
--no-wait | Start the jobs and print their IDs without waiting; apply them later with 'tolkbot jobs apply' |
--retranslate-untracked | Also retranslate translations TolkBot has no record of (kept by default) |
--verbose | With --dry-run, include each key's source string |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Pass --dst or --all. Each language's status is a job's (succeeded, failed, cancelled, …), or up-to-date, started (with --no-wait), timed-out or not-started. notApplied lists results the files had moved on from, with the reason. With --dry-run the output is the plan instead: dryRun: true, and per language the keys a run would send, each with reason missing, changed or untracked. See Translating for what counts as work.
Example:
tolkbot translate --all
With --json, the default without a terminal:
{
"srcLocale": "en",
"languages": [
{
"dstLocale": "nb",
"status": "succeeded",
"jobId": "p57adftz694cm970tjnmgqtykd8j77h9",
"keys": 11,
"completed": 11,
"failed": 0,
"written": {
"files": 1,
"keys": 11
},
"notApplied": [],
"error": null,
"plan": {
"totalKeys": 120,
"missing": 9,
"changed": 2,
"untracked": 0,
"protected": {},
"held": 1,
"upToDate": 108,
"protectedKeys": [],
"heldKeys": [
{
"key": "billing.title",
"reason": "locked"
}
],
"untrackedKeys": []
}
}
]
}
translate adopt
Record existing translations TolkBot has no baseline for as reviewed, so they are kept until their source changes.
tolkbot translate adopt [options]
| Option | Description |
|---|---|
--src <locale> | Source locale (defaults to the project's base language) |
--dst <locale> | Destination locale |
--all | Every target language |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Records the translations TolkBot has no record of as reviewed, so they are kept until their source text changes.
Example:
tolkbot translate adopt --dst nb
With --json, the default without a terminal:
{
"adopted": [
{
"dstLocale": "nb",
"untracked": 762,
"adopted": 762,
"skipped": 0
}
]
}
set
Write a translation yourself; TolkBot keeps it until its source text changes.
tolkbot set [options] <key>
| Option | Description |
|---|---|
--locale <locale> | Target locale (e.g. nb) Required. |
--value <text> | The translation Required. |
--force | Write the value even when its placeholders do not match the source |
--learn <note> | Also store a learning for the project, e.g. "use Oversikt, not Dashbord: it is the app's word" |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
The key is named as the dashboard names it: namespace first on a project with a file per namespace. A value whose placeholders do not match the source is refused with placeholder_mismatch, and the hint suggests the repaired value when only the braces drifted. The value is recorded as written by a person and kept until its source text changes.
Example:
tolkbot set common.save --locale nb --value "Lagre" --learn "Lagre, not Spare: it stores a file"
With --json, the default without a terminal:
{
"key": "common.save",
"locale": "nb",
"file": "messages/nb.json",
"value": "Lagre",
"previous": "Spare",
"source": "Save",
"placeholderProblems": [],
"incompletePlurals": [],
"learningId": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8"
}
validate
Validate translation files and configuration.
tolkbot validate [options]
| Option | Description |
|---|---|
--json | Output the report as JSON, the default without a terminal |
--strict | Treat warnings (incomplete locales) as errors. Off by default, since a locale is normally behind the base while a translation job is in flight. |
--no-json | Output text, even without a terminal |
Needs no login and no network. Exits 1 on an error, or on a warning under --strict; the report is on stdout either way. See Validate in CI for the checks.
Example:
tolkbot validate --strict
With --json, the default without a terminal:
{
"valid": false,
"strict": false,
"stats": {
"filesChecked": 12,
"totalKeys": 340,
"format": "json",
"baseLocale": "en",
"locales": ["en", "es", "nb"],
"pattern": "messages/{locale}.json"
},
"counts": {
"error": 1,
"warning": 1,
"info": 0
},
"issues": [
{
"level": "error",
"rule": "placeholder-mismatch",
"message": "\"cart.total\" in \"nb\": \"{count}\" is missing from the translation (relative to \"en\").",
"file": "messages/nb.json",
"locale": "nb",
"key": "cart.total"
}
]
}
languages
List the project's languages and add target languages.
languages list
The base language and the target languages, with the files each one maps to and whether they exist.
tolkbot languages list [options]
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Example:
tolkbot languages list
With --json, the default without a terminal:
{
"project": {
"name": "Web",
"slug": "web"
},
"pattern": "messages/{locale}.json",
"base": {
"locale": "en",
"name": "English",
"files": [
{
"path": "messages/en.json",
"exists": true
}
]
},
"targets": [
{
"locale": "nb",
"name": "Norwegian Bokmål",
"setup": "set-up",
"files": [
{
"path": "messages/nb.json",
"exists": true
}
]
}
]
}
languages add
Add target languages to the project and set them up, as the dashboard's Add language dialog does. Translating is 'tolkbot translate'.
tolkbot languages add [options] <locales...>
| Option | Description |
|---|---|
--existing <mode> | What to do with translations the repository already has: keep them as written by a person (trust), or flag them for review (default: trust) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Codes are the ones on Supported languages, in any spelling (pt-BR, pt_BR). outcome is added, set_up, unchanged or failed (with error). An unsupported code exits 2 with unsupported_locale. Adding a language changes the project only; translate fills the files.
Example:
tolkbot languages add nb de
With --json, the default without a terminal:
{
"project": {
"name": "Web",
"slug": "web"
},
"existing": "trust",
"changed": true,
"languages": [
{
"locale": "nb",
"outcome": "added"
},
{
"locale": "de",
"outcome": "unchanged",
"setup": "set-up"
}
],
"targetLanguages": ["de", "nb"],
"next": {
"translate": ["tolkbot translate --dst nb"],
"pullRequestOnPush": true
}
}
jobs
List, inspect, apply and cancel translation jobs.
jobs list
Recent translation jobs for the project, with their status and whether their results are in this working tree.
tolkbot jobs list [options]
| Option | Description |
|---|---|
--limit <n> | How many jobs to list (default: 20) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
applied says whether a job's results are in this working tree: applied, waiting (with pending keys to write), running, or none for a cancelled job or one delivered through a pull request.
Example:
tolkbot jobs list --limit 5
With --json, the default without a terminal:
{
"jobs": [
{
"jobId": "p57adftz694cm970tjnmgqtykd8j77h9",
"srcLocale": "en",
"dstLocale": "nb",
"status": "succeeded",
"source": "cli",
"createdAt": "2026-11-14T15:39:28.371Z",
"total": 11,
"completed": 11,
"failed": 0,
"creditsUsed": 912,
"applied": "applied",
"pending": 0
}
]
}
jobs show
Show one translation job.
tolkbot jobs show [options] <id>
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Exits 1 for a failed or cancelled job, after printing it.
Example:
tolkbot jobs show p57adftz694cm970tjnmgqtykd8j77h9
With --json, the default without a terminal:
{
"jobId": "p57adftz694cm970tjnmgqtykd8j77h9",
"srcLocale": "en",
"dstLocale": "nb",
"status": "succeeded",
"source": "cli",
"createdAt": "2026-11-14T15:39:28.371Z",
"total": 11,
"completed": 11,
"failed": 0,
"creditsUsed": 912,
"applied": "applied",
"pending": 0
}
jobs apply
Write finished jobs' results into the working tree. With no ID: the finished jobs not applied yet, one per language.
tolkbot jobs apply [options] [ids...]
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Without an ID it takes the finished jobs whose results are not in the files yet, one per language. With nothing waiting it exits 1 with nothing_to_apply; with two jobs waiting for one language it exits 2 and lists them.
Example:
tolkbot jobs apply
With --json, the default without a terminal:
{
"applied": [
{
"jobId": "p57adftz694cm970tjnmgqtykd8j77h9",
"dstLocale": "nb",
"files": 1,
"keys": 11,
"notApplied": [
{
"key": "nav.home",
"reason": "target_changed"
}
]
}
]
}
jobs cancel
Cancel a running translation job.
tolkbot jobs cancel [options] <id>
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Example:
tolkbot jobs cancel p57adftz694cm970tjnmgqtykd8j77h9
With --json, the default without a terminal:
{
"jobId": "p57adftz694cm970tjnmgqtykd8j77h9",
"ok": true
}
glossary
Manage glossary terms.
glossary list
List glossary terms for the current project.
tolkbot glossary list [options]
| Option | Description |
|---|---|
--locale <locale> | Filter by source locale |
--limit <n> | Max number of results (default: 100) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
The terms translation uses for the project: its own, and the organization's it inherits. When a term is in both for the same source locale, the project's wins. With inheritance switched off, organization terms are left out and notInherited counts them. See Context for how glossaries work.
Example:
tolkbot glossary list --locale en
With --json, the default without a terminal:
{
"inheritOrgGlossaries": true,
"notInherited": 0,
"glossaries": [
{
"id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z",
"term": "Workspace",
"locale": "en",
"doNotTranslate": false,
"translations": [
{
"locale": "nb",
"text": "Arbeidsområde"
}
],
"context": "Top-level container for projects",
"scope": "project"
}
]
}
glossary show
Show details of a glossary term.
tolkbot glossary show [options] [term]
| Option | Description |
|---|---|
--id <glossaryId> | Glossary term ID, instead of the term |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
show, update and remove take the term, in any case, or its ID with --id. The term is looked up among the project's terms and the organization's. When it matches more than one, such as a project term and an organization term with the same spelling, the command lists each with its ID and exits 2; run it again with --id.
Example:
tolkbot glossary show "Workspace"
With --json, the default without a terminal:
{
"id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z",
"term": "Workspace",
"locale": "en",
"doNotTranslate": false,
"translations": [
{
"locale": "nb",
"text": "Arbeidsområde"
}
],
"context": "Top-level container for projects"
}
glossary create
Create a new glossary term.
tolkbot glossary create [options]
| Option | Description |
|---|---|
--term <text> | Source term Required. |
--locale <locale> | Source locale (e.g. en) Required. |
--context <text> | AI context for translation guidance |
--do-not-translate | Mark term as do-not-translate |
--translation <locale:text...> | Translations in locale:text format (e.g. --translation no:Hei de:Hallo) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
The term belongs to the current project. Organization-wide terms are made in the dashboard. Use --do-not-translate for brand and product names.
Example:
tolkbot glossary create --term "Workspace" --locale en --context "Top-level container for projects" --translation nb:Arbeidsområde
With --json, the default without a terminal:
{
"id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z",
"term": "Workspace"
}
glossary update
Update an existing glossary term.
tolkbot glossary update [options] [term]
| Option | Description |
|---|---|
--id <glossaryId> | Glossary term ID, instead of the term |
--term <text> | New source term |
--locale <locale> | New source locale |
--context <text> | AI context for translation guidance |
--do-not-translate | Mark term as do-not-translate |
--no-do-not-translate | Unmark do-not-translate |
--translation <locale:text...> | Translations in locale:text format (replaces all translations) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
--translation replaces every translation the term has, so pass all the ones to keep.
Example:
tolkbot glossary update "Workspace" --translation nb:Arbeidsområde
With --json, the default without a terminal:
{
"id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z",
"ok": true
}
glossary remove
Remove a glossary term.
tolkbot glossary remove [options] [term]
| Option | Description |
|---|---|
--id <glossaryId> | Glossary term ID, instead of the term |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Example:
tolkbot glossary remove "Workspace"
With --json, the default without a terminal:
{
"id": "jd7a3k9w2x8h1q4m6n0p5r7s9t2v4y6z",
"ok": true
}
learnings
Add, view and manage translation learnings.
learnings list
List translation learnings for the current project.
tolkbot learnings list [options]
| Option | Description |
|---|---|
--status <status> | Filter by status (active or archived) |
--limit <n> | Max number of results (default: 100) |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Learnings are corrections TolkBot remembers: from feedback on its pull requests, edits in the dashboard, learnings add and set --learn. See Context.
Example:
tolkbot learnings list --status active
With --json, the default without a terminal:
{
"learnings": [
{
"id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8",
"sourceText": "Dashboard",
"suggestedTranslation": "Oversikt",
"srcLocale": "en",
"dstLocale": "nb",
"feedbackType": "incorrect-term",
"reasoning": "Oversikt is the app's word for the start page",
"status": "active",
"source": "cli"
}
]
}
learnings add
Tell TolkBot how to translate for this project: a note, optionally about a source text.
tolkbot learnings add [options]
| Option | Description |
|---|---|
--locale <locale> | Target locale the learning is for Required. |
--note <text> | What to do and why, e.g. "Address the reader as du, never De" Required. |
--source <text> | Source text the note is about; without it the note applies to every string |
--translation <text> | The translation to prefer for --source |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
A note on its own applies to every string translated into the language. With --source it applies to strings that contain that text, and --translation is the wording to prefer there.
Example:
tolkbot learnings add --locale nb --source "Dashboard" --translation "Oversikt" --note "Oversikt is the app's word for the start page"
With --json, the default without a terminal:
{
"id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8",
"srcLocale": "en",
"dstLocale": "nb",
"sourceText": "Dashboard",
"suggestedTranslation": "Oversikt",
"note": "Oversikt is the app's word for the start page"
}
learnings show
Show details of a learning.
tolkbot learnings show [options]
| Option | Description |
|---|---|
--id <learningId> | Learning ID Required. |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Example:
tolkbot learnings show --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8
With --json, the default without a terminal:
{
"id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8",
"sourceText": "Dashboard",
"suggestedTranslation": "Oversikt",
"srcLocale": "en",
"dstLocale": "nb",
"feedbackType": "incorrect-term",
"reasoning": "Oversikt is the app's word for the start page",
"status": "active",
"source": "cli"
}
learnings archive
Archive a learning (keeps it but excludes from translations).
tolkbot learnings archive [options]
| Option | Description |
|---|---|
--id <learningId> | Learning ID Required. |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
An archived learning is kept for reference and no longer used when translating.
Example:
tolkbot learnings archive --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8
With --json, the default without a terminal:
{
"id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8",
"ok": true
}
learnings remove
Permanently remove a learning.
tolkbot learnings remove [options]
| Option | Description |
|---|---|
--id <learningId> | Learning ID Required. |
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
Permanent. Use archive to keep it.
Example:
tolkbot learnings remove --id k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8
With --json, the default without a terminal:
{
"id": "k17bq2c4d6f8g0h2j4k6m8n0p2r4s6t8",
"ok": true
}
telemetry
Control anonymous usage reporting.
telemetry status
Show whether telemetry is on and why.
tolkbot telemetry status [options]
| Option | Description |
|---|---|
--json | Output as JSON, the default without a terminal |
--no-json | Output text, even without a terminal |
reason is default, env ($TOLKBOT_TELEMETRY=0), do-not-track ($DO_NOT_TRACK=1), preference or no-key. What is reported is on Installation and login.
Example:
tolkbot telemetry status
With --json, the default without a terminal:
{
"enabled": false,
"reason": "env",
"preferenceFile": "/home/you/.tolkbot/telemetry"
}
telemetry off
Stop reporting usage from this machine.
tolkbot telemetry off [options]
Example:
tolkbot telemetry off
telemetry on
Resume reporting usage from this machine.
tolkbot telemetry on [options]
Example:
tolkbot telemetry on
Every command
These work with any command. --token goes before or after it.
| Option | Description |
|---|---|
-v, --version | Output the version number |
--token <token> | Auth token to use for this invocation (overrides $TOLKBOT_TOKEN and the stored token) |
-h, --help | Show help, for the program or the command before it |