# gt: General Translation CLI tool: Stage URL: https://generaltranslation.com/en-US/docs/cli/stage.mdx --- title: Stage description: How to stage your translations for review --- ## Overview `gt stage` is a command that generates translations for your project and stages them for review. This command is only useful if you've enabled human review on your project. ## Usage Run this in your CI pipeline **before** you build your app for production. ```bash npx gt stage ``` **Note:** This command requires a production API key! Get one on the [platform](https://generaltranslation.com/dashboard). The `gt stage` command works in the same way as the `translate` command, but instead of downloading the completed translations or publishing them to the CDN, it stages them for review. After running `gt stage`, you should run `gt translate` to complete the process and download the translations (if configured to do so). **For Production Use Only!** This command is meant for production builds and **should not be used in development**. Before running this command, please make sure you are on the branch that will be used for production. Remember to also specify your production API key (`GT_API_KEY`) and Project ID (`GT_PROJECT_ID`) in your environment variables. --- ## Flags | Parameter | Description | Type | Optional | Default | |-----------------|--------------------------------------------------|---------|----------|-----------------| | `--api-key` | Specify a production API key | `string` | `true` | | | `--project-id` | Specify the project ID | `string` | `true` | | | `--version-id` | Specify a version ID (by default, a hash of the content) | `string` | `true` | | | `--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` | | | `--src ` | Space-separated list of glob patterns to match source files. Should be relative to root directory. | `[string]` | `true` | `[ 'src/**/*.{js,jsx,ts,tsx}', 'app/**/*.{js,jsx,ts,tsx}', 'pages/**/*.{js,jsx,ts,tsx}', 'components/**/*.{js,jsx,ts,tsx}', ]` | | `--dictionary ` | Specify a path to the dictionary file | `string` | `true` | | | `--inline` | Include inline `` tags in addition to the dictionary | `boolean` | `true` | `true` | | `--timeout` | The timeout for the translation request in seconds | `number` | `true` | `900` | | `--new, --locales `| Locales to translate your project into | `[string]` | `true` | | | `--default-locale `| The source locale for the project | `string` | `true` | `en` | | `--ignore-errors` | Ignore errors and force translation for valid content | `flag` | `true` | `false` | | `--tag [value]` | Tag this translation run (auto-resolves from git if no value provided) | `string` | `true` | | | `-m, --message ` | Message to attach to the translation tag | `string` | `true` | | | `--dry-run` | Dry run the command | `flag` | `true` | `false` | All of these parameters are optional. Do not add your API key to the `gt.config.json` file! You should set it as an environment variable instead. The CLI will automatically read `GT_API_KEY` if it is set. There are a few key parameters: | Parameter | Description | |-----------------|--------------------------------------------------| | `--dry-run` | This flag will cause the CLI to parse and validate your project, but will not communicate with the GT API. This is useful for validating your codebase. | `--api-key` | Unless you are using `--dry-run`, you must provide a production API key. | `--project-id` | Similarly, unless you are using `--dry-run`, you must provide a project ID. | `--new, --locales ` | Locales to translate your project into. These will be appended to the locales specified in your `gt.config.json` file. ### Configuration file When running `gt stage`, the CLI will automatically add the `stageTranslations : true` property to your `gt.config.json` file. This property ensures that if `translate` is run without first running `stage` for a specific deployment version, the CLI tool will error and exit.