# gt: General Translation CLI tool: Validate URL: https://generaltranslation.com/en-GB/docs/cli/validate.mdx --- title: Validate description: How to validate your project for translation errors --- ## Usage ```bash npx gt validate ``` ## Overview The `gt validate` command scans your project for inline content (such as `` components and `useGT` hooks) and dictionary entries, then checks for syntax errors or issues that would prevent successful translation. Unlike [`gt translate`](/docs/cli/translate), this command does **not** communicate with the General Translation API. It only performs local validation, making it safe to run at any time — in development, in CI, or before a production build. This command is available for projects using [`gt-next`](/docs/next), [`gt-react`](/docs/react), [`gt-react-native`](/docs/react-native), or [`gt-tanstack-start`](/docs/tanstack-start). ### Validate the entire project [#validate-project] ```bash npx gt validate ``` This scans your source directories and dictionary file (if configured) for translatable content and reports any errors or warnings. ### Validate specific files [#validate-files] ```bash npx gt validate src/components/Header.tsx src/pages/Home.tsx ``` You can pass one or more file paths as arguments to validate only those files rather than the entire project. ## What it checks * **Inline content:** Scans source files for `` components, `useGT` hooks, and other inline translation patterns. * **Dictionary entries:** Validates dictionary files for correct syntax. * **Syntax errors:** Reports any issues that would cause `gt translate` or `gt stage` to fail. If validation succeeds, you'll see a summary like: ``` Success! Found 12 translatable entries for gt-next. ``` If there are errors, the command will list them and exit with a non-zero status code, making it suitable for use in CI pipelines. *** ## Flags | Parameter | Description | Type | Optional | Default | | ------------------------------- | ----------------------------------------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | | `-c, --config ` | Specify a path to the GT config file | `string` | `true` | `"gt.config.json"` | | `--tsconfig, --jsconfig ` | Specify a path to the TS or JS config file | `string` | `true` | | | `--dictionary ` | Specify a path to the dictionary file | `string` | `true` | | | `--src ` | Space-separated list of glob patterns to match source files | `[string]` | `true` | `['src/**/*.{js,jsx,ts,tsx}', 'app/**/*.{js,jsx,ts,tsx}', 'pages/**/*.{js,jsx,ts,tsx}', 'components/**/*.{js,jsx,ts,tsx}']` | | `--inline` | Include inline content in validation | `boolean` | `true` | `true` | All of these parameters are optional.