# gtx-cli: General Translation CLI tool: GT JSX
URL: https://generaltranslation.com/en-US/docs/cli/formats/gt.mdx
---
title: GT JSX
description: Automatically translate your gt-next, gt-react, or gt-react-native project
---
## Overview
This tutorial will show you how to automatically manage your project's translation files when using [`gt-next`](/docs/next), [`gt-react`](/docs/react), or [`gt-react-native`](/docs/react-native).
**Note:** This should only be used when you are shipping a production build.
If you are using gt-next, gt-react, or gt-react-native in development, this
command is not needed.
We will follow these 3 steps:
Add your environment variables
Configure your project with the [`npx gtx-cli
configure`](/docs/cli/configure) command
Run [`gtx-cli translate`](/docs/cli/translate#translate)
---
## Step 1: Add your environment variables
Add your production API key and project ID to your environment variables.
This is necessary to use the `gtx-cli` tool.
You get these from the [General Translation dashboard](https://generaltranslation.com/dashboard).
```bash title=".env"
GT_API_KEY=
GT_PROJECT_ID=
```
## Step 2: Configure your project with the `npx gtx-cli configure` command
Run the `gtx-cli configure` command to configure your project.
```bash
npx gtx-cli configure
```
## Step 3: Add the `gtx-cli translate` command to your build process
Add the `gtx-cli translate` command to your build or CI process before the build command to automatically add translations to your project.
```json title="package.json"
{
"scripts": {
"translate": "npx gtx-cli translate",
"build": "npm run translate && "
}
}
```
This will generate translations for all of your locales and save them to your project.
If you want to commit these files to your repo, you can instead run this command before committing.
You're done! Now your project will automatically update all of your translation JSON files any time your project changes.
---
## Notes
- You can automatically add translations to your project with the [`gtx-cli translate`](/docs/cli/translate#translate) command.
- If you want to commit your translation files, you can instead run the `gtx-cli translate` command before committing.
- To configure the output path for your translations, see the [configuration](/docs/cli/reference/config) docs.
## Next steps
- See the [usage guide](/docs/cli/reference/usage) for the cli tool.