gtx-cli is a command-line tool used to interface with General Translation's AI-powered i18n platform.
See our docs for more information including guides, examples, and API references.
npm install gtx-cli
For more details, check out the setup command documentation.
If you are using gt-react or gt-next, run this command to automatically insert <T>
components into your project.
npx gtx-cli setup
For more details, check out the init command documentation.
This command sets up your gt.config.json
file.
You will need to run this command in order to run the translate command.
npx gtx-cli init
For more details, check out the translate command documentation.
Before deploying to production, you need to generate translations. First, add your production api keys:
GT_API_KEY=your-production-api-key
GT_PROJECT_ID=your-project-id
Next run the translate command. This will generate translations and either publish them to the CDN or save them in your project depending on your configuration.
npx gtx-cli translate
Full documentation, including guides, examples, and API references, can be found at General Translation Docs.
We welcome any contributions to our libraries. Please submit a pull request!