CLI referenceverbatra export

verbatra export

Export untranslated strings into a translator handoff, as a styled Excel workbook or one CSV or TSV file per locale.

Write the strings that need translating into a styled Excel workbook a human can fill in and send back for verbatra import. By default the workbook carries only the missing and changed strings: the same keys an automated run would send to a provider. export never calls a provider and needs no API key.

Synopsis

verbatra export [flags]

Flags

FlagArgumentDefaultEffect
--cwd<path>current directoryresolve config and locale files from this directory
--config<path>search for oneload this config file instead of searching for one
--out<path>verbatra-translations.xlsx, or verbatra-translations for csv and tsvwrite the handoff here: a file path for xlsx, a directory for csv and tsv
--format<format>xlsxwrite an Excel workbook (xlsx) or one delimited file per locale (csv, tsv)
--locales<list>all configured targetscomma-separated subset of target locales to export
--include-unchangednoneoffalso export already up-to-date strings
--jsonnoneoffprint one JSON envelope on stdout carrying the export result (path and per-locale row counts) under result, or the error code on a failed run; the human-readable error line still goes to stderr

An empty or unknown --locales value is rejected with exit 2 rather than silently exporting nothing.

Examples

# write the workbook with missing and changed strings
verbatra export

# only the German and French sheets, to a specific path
verbatra export --locales de,fr --out handoff/round-2.xlsx

# one de.csv and fr.csv under handoff/
verbatra export --format csv --out handoff

CSV and TSV

--format csv and --format tsv write plain text instead of a workbook: one <locale>.csv or <locale>.tsv per exported locale, carrying the same columns in the same order as a workbook sheet. --out then names the directory the files are written into, and the directory is created if it is missing.

A delimited file is diffable and opens anywhere, but it carries no cell protection: every column is editable and the Source hash column is visible. An edited hash is never trusted, import compares it against the live source and withholds the row.

Each delimited export also writes a hidden manifest into the directory, .verbatra-export-csv.json or .verbatra-export-tsv.json, naming the locales it just wrote. It is what lets a re-export with a narrower --locales selection retire the locales it dropped: their files stay on disk, and verbatra import refuses them as leftovers rather than applying an outdated translation. The export deletes nothing from the output directory, so a file you put there yourself is never at risk.

Exit codes

CodeMeaning
0the handoff was written
2could not run: a whole-run error, or a usage error (including an empty or unknown --locales value)

export has no per-locale failure mode, so it never exits 1.

  • Manual translation covers the workbook layout, the CSV and TSV variant, the review columns, and the full round-trip.
  • verbatra import reads the filled handoff back.
Edit on GitHub