CLI-referentie
Opdrachten
champollion init Interactive setup wizard (--yes for quick defaults)
champollion sync Translate & sync all locale files
champollion watch Auto-sync when the source file changes
champollion audit List all untranslated [EN] fallback values
champollion lint Scan source code for hardcoded strings
champollion wrap Auto-wrap hardcoded strings in t() calls (with undo)
champollion seo <sub> Generate hreflang, sitemap.xml, or JSON-LD schema
champollion integrity Audit locale files for format/encoding issues
champollion verify Verify translations are present and correct (CI gate)
champollion status Show pair configuration, plugins, and quality tiers
champollion provenance Audit translation resource licensing
champollion plugin <sub> Manage method plugins (install, remove, list)
champollion fonts <sub> Download web fonts for PUA script converters
champollion leaderboard Browse and install methods from the MT Eval Arena leaderboard
champollion tm <sub> Manage Translation Memory cache (stats, clear)
champollion xliff <sub> Export/import XLIFF 1.2 for professional review
Voer champollion <command> --help uit voor gedetailleerde hulp bij een opdracht.
Globale opties
--help, -h Show help (global or per-command)
--version, -v Print version and exit
--yes, -y Skip interactive prompts, use defaults
--config <path> Custom config file path
--dir <path> Override locales directory
--content-dir <path> Hugo/Docusaurus content directory for Markdown translation
--source <code> Override source locale (default: en)
--model <model> Override translation model (full slug or alias from shared/model-aliases.json)
--method <method> Translation method: llm, google-translate (default: from config)
--temperature <n> LLM temperature (0.0–2.0, default: 0.3)
--coaching-file <path> Path to free-text coaching prompt file (injected into system prompt)
--format <fmt> Locale file format: json, toml, yaml, or auto
--dry, --dry-run Preview changes without writing files
--concurrency <n> Max parallel API calls (sets both JSON and content, default: 48)
--json-concurrency <n> Max parallel locale translations for JSON keys (default: 200)
--content-concurrency <n> Max parallel API calls for content translation (default: 48)
--force-content Re-translate all content files (clears content lock)
--force-keys <keys> Comma-separated dot-notation keys to force re-translate
--no-tm Skip Translation Memory cache for this sync run
--no-verify Skip post-sync verification pass
--locale <code> Target locale (xliff export, tm clear)
--quiet Errors and warnings only — suppress banner, progress bar, and info lines
--json Machine-readable NDJSON output — one JSON object per event
init
Interactieve installatiewizard die champollion.config.json aanmaakt. Begeleidt u door de bronlocale, doeltalen, bestandsindeling en vertaalmodel.
champollion init # interactive wizard
champollion init --yes # skip wizard, use defaults
champollion init --yes --langs fr,de,ja # quick setup with specific languages
champollion init --source en --dir ./i18n # overrides with defaults
--langs optie: Kommagescheiden lijst van doeltaalcodes. Slaat de taalprompt over en past standaard registerinstellingen toe voor elke taal. Combineer met --yes voor volledig niet-interactieve installatie.
Taalvoorinstellingen: Wanneer u wordt gevraagd naar doeltalen, kunt u namen van voorinstellingen typen:
european→ fr, de, es, it, pt, nlasian→ ja, zh, koglobal→ fr, es, de, ja, zh, ko, pt, arnordic→ da, fi, nb, sv
Combineer voorinstellingen en afzonderlijke codes: european, ja → fr, de, es, it, pt, nl, ja
sync
Vertaalt ontbrekende en verouderde sleutels in alle localebestanden. Voert standaard verificatie na synchronisatie uit.
champollion sync # translate everything
champollion sync --dry-run # preview only
champollion sync --force-keys "hero.title" # force re-translate
champollion sync --force-keys "a.title,a.subtitle" # multiple keys
champollion sync --force-content # re-translate all Markdown/MDX
champollion sync --content-dir ./content # include Hugo Markdown
champollion sync --method google-translate # force Google Translate
champollion sync --concurrency 20 # 20 parallel API calls (both phases)
champollion sync --json-concurrency 30 # 30 parallel locale translations (JSON)
champollion sync --content-concurrency 8 # 8 parallel content translations
champollion sync --no-verify # skip post-sync verification
champollion sync --no-tm # skip cache, fresh API calls
Vertaalgeheugen: Standaard laadt sync het bestand .champollion/tm.json en levert gecachede vertalingen voor ongewijzigde bronwaarden. Gebruik --no-tm om de cache te omzeilen (nuttig bij het wisselen van vertaalproviders of bij het opsporen van kwaliteitsproblemen). Zie Vertaalgeheugen.
Wijzigingsdetectie: champollion slaat SHA-256-hashes op in .champollion.lock. Wanneer bronwaarden wijzigen, worden die sleutels bij de volgende synchronisatie automatisch opnieuw vertaald. Leg het vergrendelingsbestand vast zodat alle ontwikkelaars dezelfde basislijn delen.
Parallellisme: Zowel de vertaling van JSON-sleutels als de vertaling van inhoud worden parallel uitgevoerd. JSON-locales worden gelijktijdig vertaald (standaard: 200 gelijktijdige locales), waarbij batches binnen elke locale ook worden geparallelliseerd (4 gelijktijdige batches). Inhoudsvertaling (Markdown, MDX, blogberichten) wordt uitgevoerd in een platte werkitempool (standaard: 48 gelijktijdige API-aanroepen). Overschrijf met --json-concurrency, --content-concurrency of --concurrency (stelt beide in).
Uitvoer: Sync toont een versiebanner, indeling-/frameworkdetectie, kostenraming en voortgangsbalken per locale:
champollion v0.1.0
[INFO] Detected format: json (auto)
[INFO] Source: en.json (2,847 keys)
[INFO] Pairs: es-MX:llm, fr:deepl
[INFO] es-MX.json — 2,847 missing
████████████████████████████████ 2,847/2,847 keys
[INFO] fr.json — 2,847 missing
████████████████████████████████ 2,847/2,847 keys
[OK] Synced 5,694 keys total.
Voortgangsbalken worden ter plekke bijgewerkt na elke batch (~80 sleutels). Gebruik --quiet voor alleen fouten/waarschuwingen, of --json voor machineleesbare NDJSON-uitvoer. Beide onderdrukken de voortgangsbalk en banner.
watch
Automatisch synchroniseren wanneer het bronlocalebestand wijzigt. Wordt uitgevoerd totdat het wordt onderbroken met Ctrl+C.
champollion watch
audit
Geeft een lijst van alle onvertaalde terugvalwaarden met het voorvoegsel [EN] uit eerdere uitvoeringen. Sluit af met code 1 als er worden gevonden — gebruik dit als CI-poort om builds met onvolledige vertalingen te laten mislukken.
champollion audit
verify
Leest alle localebestanden opnieuw van schijf en controleert of vertalingen daadwerkelijk aanwezig en correct zijn. Dit is dezelfde verificatie die automatisch wordt uitgevoerd aan het einde van elke sync (tenzij --no-verify wordt meegegeven).
champollion verify # verify all locale files
champollion verify --warn-only # non-blocking
champollion verify && echo "All good" # CI gate
Wat er wordt gecontroleerd:
- Sleutelpariteit — alle bronsleutels aanwezig in elk doel
[EN]terugvalmarkeringen uit eerdere uitvoeringen- Lege vertalingen
- Scriptconformiteit — niet-Latijnse locales dienen niet-ASCII-vertalingen te bevatten
- Plaatshoudersbehoud — ICU-plaatshouders komen overeen met de bron
- Coderingsproblemen — BOM-markeringen, onzichtbare tekens
- Bronecho's — waarden identiek aan de bron (waarschuwing)
lint
Scant broncode op hardgecodeerde gebruikersgerichte tekenreeksen die i18n-vertaalaanroepen zouden moeten gebruiken. Detecteert automatisch uw framework (next-intl, react-i18next, vue-i18n, Hugo).
champollion lint # exits 1 if issues found
champollion lint --warn-only # always exits 0
champollion lint --src ./app # custom source directory
champollion lint --min-length 4 # minimum string length to flag
Wat er wordt gedetecteerd:
- Hardgecodeerde tekenreeksen in JSX-tekst,
placeholder,alt,aria-label,title - Bestanden met gebruikersgerichte inhoud maar zonder i18n-framework-import
- Dode sleutels — localeслeutels waarnaar geen enkel bronbestand verwijst
- Dekkingsscore — percentage tekenreeksen dat via i18n wordt verwerkt
Uitsluitingen: Maak .champollionignore aan in de hoofdmap van uw project (globpatronen, zoals .gitignore).
wrap
Omhult automatisch hardgecodeerde tekenreeksen die zijn gedetecteerd door lint in t()-aanroepen. Maakt automatisch back-ups voordat bestanden worden gewijzigd.
champollion wrap # auto-wrap with backup
champollion wrap --dry # preview wrapping changes
champollion wrap --undo # restore from .champollion-backup/
Veiligheidspoorten:
- Git-schoonheidscontrole (overgeslagen bij dry-run)
- Automatische back-up naar
.champollion-backup/ - Diff-voorbeeld vóór elke bestandsschrijfactie
--undo-ondersteuning om te herstellen vanuit back-up
seo
Genereer SEO-artefacten voor meertalige sites.
champollion seo hreflang # print hreflang tags
champollion seo sitemap --base-url https://example.com --out sitemap.xml
champollion seo jsonld --base-url https://example.com # JSON-LD schema
| Subopdracht | Uitvoer |
|---|---|
hreflang | <link rel="alternate" hreflang>-tags |
sitemap | Meertalige sitemap.xml |
jsonld | JSON-LD WebSite-taalschema |
integrity
Detecteert beschadiging en afwijkingen in vertaalde localebestanden.
champollion integrity # exits 1 if issues found
champollion integrity --warn-only # non-blocking
Wat er wordt gecontroleerd:
- Plaatshoudersbeschadiging (bijv.
{name}aanwezig in bron maar ontbrekend in doel) - Coderingsproblemen (mojibake, ongeldige Unicode)
- Onvertaalde kopieën (doelwaarde identiek aan bron)
- Verweesde sleutels (sleutels in doel die niet bestaan in bron)
- Volledigheid van ICU MessageFormat-meervoudscategorieën (bijv. Arabisch heeft 6 categorieën nodig)
tm
Beheer de cache van het vertaalgeheugen (.champollion/tm.json). TM slaat eerdere vertalingen op en levert deze bij volgende synchronisaties in plaats van de API aan te roepen.
champollion tm stats # show cache statistics
champollion tm clear # clear cache (with confirmation)
champollion tm clear --yes # clear without confirmation
champollion tm clear --locale fr # clear only French entries
| Subopdracht | Uitvoer |
|---|---|
stats | Aantal vermeldingen, bestandsgrootte, uitsplitsing per locale |
clear | Cachebestand verwijderen (volledig of per locale) |
| Optie | Effect |
|---|---|
--locale <code> | Alleen vermeldingen voor één locale wissen |
--yes | Bevestigingsprompt overslaan |
Zie Vertaalgeheugen voor de werking van TM en wanneer u het moet wissen.
xliff
Exporteer en importeer XLIFF 1.2-bestanden voor professionele vertaaldersbeoordeling. XLIFF is het universele uitwisselingsformaat dat wordt ondersteund door CAT-tools zoals memoQ, SDL Trados en Phrase.
champollion xliff export --locale fr # export French XLIFF
champollion xliff export --locale ja --out ./review/ # custom output path
champollion xliff import .champollion/xliff/fr.xliff # import reviewed file
champollion xliff import ./reviewed.xliff --dry # preview import
| Subopdracht | Uitvoer |
|---|---|
export | Genereer .xliff vanuit bron- en doellocalebestanden |
import | Voeg beoordeelde .xliff-vertalingen samen in localebestanden |
| Optie | Effect |
|---|---|
--locale <code> | Doellocale voor export (vereist) |
--out <path> | Aangepast uitvoerpad of -map |
--dry | Importvoorbeeld zonder schrijven |
Zie Werken met professionele vertalers voor de volledige workflow.
status
Toont paarconfiguratie, geïnstalleerde plugins, kwaliteitsniveaus en benchmarkscores.
champollion status
provenance
Controleert de licenties van vertaalresources voor alle geïnstalleerde plugins.
champollion provenance
plugin
Beheer plugins voor vertaalmethoden. Plugins zijn voorverpakte vertaalrecepten die worden geïnstalleerd in .champollion/methods/.
champollion plugin list # show installed plugins
champollion plugin install ./my-method/ # install from local directory
champollion plugin remove crk-coached-v1 # remove a plugin
Zie Pluginspecificatie voor het pluginmanifestformaat.
leaderboard
Blader door, zoek in en installeer vertaalmethoden vanuit het MT Eval Arena-leaderboard. Methoden die via het leaderboard worden geïnstalleerd, worden geleverd met benchmarkscores en de volledige canonieke MethodConfig — de exacte configuratie die tijdens de evaluatie is gebruikt.
champollion leaderboard # show leaderboard
champollion leaderboard --pair en:fr # filter by language pair
champollion leaderboard --install crk-coached-v8 # install a method plugin
champollion leaderboard --install crk-coached-v8 --apply # install + patch config
| Optie | Effect |
|---|---|
--pair <code> | Leaderboard filteren op taalpaar (bijv. en:fr) |
--install <name> | Een methodeplugin installeren vanuit het leaderboard |
--apply | Na installatie automatisch methodPlugin toevoegen aan champollion.config.json |
--apply-workflow: Wanneer u installeert met --apply, schrijft champollion de methodeplugin naar .champollion/methods/ en past uw champollion.config.json aan om deze te gebruiken voor het betreffende paar. Dit is de snelste weg van "wat scoort het beste?" naar "ik gebruik het in productie."
fonts
Downloadt en beheert PUA-weblettertypen voor scriptconverters van geconstrueerde talen. Talen die Private Use Area-tekens gebruiken (Klingon, Sindarin, Kryptonian) hebben aangepaste weblettertypen nodig om hun schriften weer te geven. Deze opdracht downloadt ze vanuit geverifieerde open-sourcerepositories.
champollion fonts list # show needed fonts
champollion fonts install # download all needed fonts
champollion fonts install --css # also generate CSS snippet
champollion fonts install --dir ./public/fonts # custom output directory
| Subopdracht | Uitvoer |
|---|---|
list | Toont welke PUA-lettertypen nodig zijn en hun installatiestatus |
install | Downloadt lettertypen voor geconfigureerde talen |
| Optie | Effect |
|---|---|
--dir <path> | Uitvoermap voor lettertypen overschrijven (automatisch gedetecteerd op basis van projecttype) |
--css | Een conlang-fonts.css-fragment genereren naast de lettertypen |
--config <path> | Pad naar configuratiebestand (gebruikt om te detecteren welke talen lettertypen nodig hebben) |
Automatische detectie: De uitvoermap wordt afgeleid uit uw projectstructuur:
- Docusaurus →
static/fonts/ofwebsite/static/fonts/ - Hugo →
static/fonts/ - Standaard →
public/fonts/
Systeemeigen Unicode-converters (crk → Cree-syllabeschrift, sr → Servisch Cyrillisch) vereisen GEEN lettertype-installatie.
Zie Geconstrueerde talen, schriften en orthografie voor volledige details over PUA-lettertypen.
Drielaagse pijplijn
Gebruik lint, sync en audit samen voor waterdichte i18n:
{
"scripts": {
"i18n:lint": "champollion lint",
"i18n:sync": "champollion sync",
"i18n:audit": "champollion audit"
}
}
| Laag | Opdracht | Wanneer | Doel |
|---|---|---|---|
| Lint | lint | Vóór commit | Commits met hardgecodeerde tekenreeksen blokkeren |
| Sync | sync | Na commit / CI | Ontbrekende en gewijzigde sleutels vertalen |
| Verify | verify | Na synchronisatie / CI | Bevestigen dat vertalingen aanwezig en correct zijn |
| Audit | audit | Bouwstap | Implementatie laten mislukken als een locale [EN]-markeringen bevat |
Zie ook
- Configuratie — referentie voor het configuratiebestand
- Vertaalmethoden — methodeselectie per paar
- Vertaalgeheugen — caching en kostenbesparingen
- Werken met professionele vertalers — XLIFF-workflow
- Pluginspecificatie — pluginmanifestformaat
- CI/CD-handleiding — CLI-opdrachten automatiseren in uw pijplijn
- Hoe synchronisatie werkt — inzicht in de synchronisatiepijplijn
- Kwaliteitspoort — hoe vertalingen worden gevalideerd