CLI reference
AirGlot has two command-line tools. Both have sync, pull and check; the web tool also has import.
| Tool | For | Install |
|---|---|---|
airglot | Flutter apps (ARB) | dart pub global activate airglot |
@airglot/cli | Web apps (JSON) | npx @airglot/cli or npm install --save-dev @airglot/cli (Node 20+) |
Both read airglot.yaml and take the token from the AIRGLOT_TOKEN environment variable.
Global options
| Option | Does |
|---|---|
--project <dir> | Runs in a subfolder of the repository. Goes before the command: airglot --project app pull. |
sync
airglot sync [--commit <sha>]
Uploads the template, and for web apps its notes file when there is one. Needs the Sync scope. The commit defaults to GITHUB_SHA, BITBUCKET_COMMIT or CI_COMMIT_SHA. Prints the counts and any problems as warnings.
pull
airglot pull [--version <v>] [--force] [--no-platform-lists]
Writes a release's files, byte for byte, beside the template and records them in airglot.lock. Needs the Export scope.
| Option | Does |
|---|---|
--version <v> | Pulls that release instead of the latest. |
--force | Overwrites pulled files that were edited since the last pull. |
--no-platform-lists | Flutter only. Leaves the iOS and Android language lists alone. |
A release always holds every language the app has shipped, so pull keeps writing a language's file even when the latest publish left it out.
check
airglot check [--offline] [--missing fail|warn]
Checks pulled files against airglot.lock, lists template strings each language file lacks, then checks the template against AirGlot's sync rules without saving anything.
| Option | Does |
|---|---|
--offline | Skips the template check. It's also skipped when AIRGLOT_TOKEN isn't set. |
--missing fail | Fails when strings are untranslated, for this run only. |
--missing warn | Only warns, for this run only. |
import
npx @airglot/cli import <locale>
Web CLI only. Uploads the existing translations for one language, such as fr. They show in Review as imported and wait for a reviewer; nothing is approved by an import. Needs the Sync scope. Prints a link to the language's guided review.
airglot.yaml
| Key | Tools | Does |
|---|---|---|
app | both | Required. The app id from the app's settings in AirGlot. |
template | web | Required. The source-language file or folder, relative to airglot.yaml. |
format | web | icu or i18next. Guessed from the template when left out. |
descriptions | web | The notes file. Defaults to the template's name with .meta.json. |
missing | both | warn (default) or fail: what check does about untranslated strings. |
host | both | Only for a different AirGlot server. Defaults to https://app.airglot.com. |
Flutter apps don't set template: the CLI reads arb-dir and template-arb-file from l10n.yaml.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | The command failed: server error, missing release, edited files, or problems |
| 2 | Usage or configuration error: bad flags, no airglot.yaml, or no AIRGLOT_TOKEN |