# gt: General Translation CLI tool: gt validate URL: https://generaltranslation.com/en-GB/docs/cli/reference/commands/validate.mdx --- title: gt validate description: Check a General Translation project for translation errors without calling the API. API reference for the gt validate command. --- Scans your project for inline content — such as [``](/docs/react/reference/components/t) components and [`useGT`](/docs/react/reference/hooks/use-gt) calls — and dictionary entries, then checks for issues that would prevent successful translation. It does not call the General Translation API, so it is safe to run at any time, including in development and CI. Because it exits with a non-zero status code on errors, it works well as a CI check. *Note: Available for the framework and inline libraries — `gt-next`, `gt-react`, `gt-react-native`, `gt-tanstack-start`, `gt-node`, `gt-flask`, and `gt-fastapi`. It is not registered for base (non-framework) projects.* Validate the whole project, or pass file paths to validate only those files. ```bash npx gt validate npx gt validate src/components/Header.tsx src/pages/Home.tsx ``` ## What it checks [#checks] * **Inline content** in your `src` globs — `` components, `useGT`/[`useTranslations`](/docs/react/reference/hooks/use-translations) calls, and other inline translation patterns — for syntax that would break translation. * **Dictionary entries** — parses your dictionary file (found at `dictionary.[js|json|ts]` in `./` or `./src` when `--dictionary` is not set) to check for correct syntax. `validate` never calls the General Translation API, so it is safe to run at any time, including in development and CI. ## Outputs [#outputs] * **Warnings** — logs a count and list of non-fatal issues found while scanning. Warnings alone do not cause the command to fail. * **Errors** — logs a count and list of syntax errors, then exits with a non-zero status code. This is what makes `validate` a useful CI gate. * **Summary** — on success, reports the number of translatable entries found; if none are found, it reports that no inline content or dictionaries were detected. ## Flags [#flags] | Parameter | Description | Type | Optional | Default | | ------------------------------- | ------------------------------------- | ---------- | -------- | ----------------------------------------- | | `-c, --config ` | Path to the config file. | `string` | Yes | `gt.config.json` | | `--src ` | Glob patterns for source files. | `string[]` | Yes | `src`, `app`, `pages`, `components` globs | | `--dictionary ` | Path to the dictionary file. | `string` | Yes | — | | `--tsconfig, --jsconfig ` | Path to a TS or JS config file. | `string` | Yes | Auto-detected | | `--inline` | Include inline content in validation. | `boolean` | Yes | `true` | ## Example [#example] ```bash # Validate the whole project npx gt validate # Validate specific files only npx gt validate src/components/Header.tsx src/pages/Home.tsx ``` ## Other notes [#notes] Passing `[files...]` validates only those files rather than the whole project. Run `validate` in CI before [`gt translate`](/docs/cli/reference/commands/translate) to catch syntax errors early — a non-zero exit on error fails the build.