Skip to main content
Get up and running with glot in just a few steps.

Installation

Glot is distributed as an npm package called glotctl. The CLI command is glot.
Verify the installation:

Initialize Configuration

Create a .glotrc.json configuration file:
This creates a default configuration:
Adjust the includes paths to match your project structure. Glot will only scan these directories.

Run Your First Check

Check your project for all i18n issues:
Or check for specific issue types:

Understanding the Output

Glot displays issues in a familiar format:
Each issue shows:
  • The problematic text in quotes
  • The issue type (e.g., hardcoded-text)
  • File path and location
  • Source code context with a pointer

Existing Projects

If your project already has many hardcoded strings, use the baseline command to suppress existing warnings and start fresh:
This inserts // glot-disable-next-line comments above each hardcoded text, so you can add glot to CI immediately and gradually fix existing issues over time.
If your project uses dynamic translation keys like t(`items.${type}`), use glot fix to auto-insert glot-message-keys declarations.

Fixing Issues

Replace hardcoded text with translation function calls:
Then add the key to your locale file:
messages/en.json

Add to package.json

For convenience, add glot commands to your package.json:

Using with CI

Glot returns exit code 1 when errors are found. Warnings return exit 0 by default, or exit 1 when you pass --error-on-warnings, making glot ideal for CI pipelines. Add a step to your workflow:
See Check Command — Severity for which check types are errors vs warnings, and Check Command — CI Examples for full GitHub Actions examples.

Next Steps

Commands

Learn all available commands

Configuration

Customize glot for your project