# gtx-cli: General Translation CLI tool: Setup Wizard URL: https://generaltranslation.com/en-US/docs/cli/init.mdx --- title: Setup Wizard description: Run the GT setup wizard --- ## Usage ```bash npx gtx-cli init ``` Use this command to run the GT setup wizard. This command is the same as running `setup`, then running `configure`. The wizard will: 1. Install the necessary dependencies for your project. 2. (If Next.js) Add the `withGTConfig` function to your `next.config.js` file and setup the `GTProvider` component. 3. Create a `gt.config.json` file in the root of your project. 4. Generate an API key and project ID for your project. ## Dependencies The `init` command will install the following dependencies for your project: - `gt-react` or `gt-next` (if your project is React-based) - `gtx-cli` as a dev dependency (if not already installed) ## React-based projects If your project is React-based, the wizard will help setup your project to use `gt-react` or `gt-next`. If you are already using a different i18n library, you may need to manually setup your project. See the [React docs](/docs/react/tutorials/quickstart) or the [Next.js docs](/docs/next/tutorials/quickstart) for more information. Since the wizard is currently experimental, it is possible that it may not work for all React-based projects. In these cases, you may need to manually setup your project. If you encounter any issues, please let us know on [GitHub](https://github.com/generaltranslation/gt/issues). This part of the wizard can also be ran independently via `npx gtx-cli setup`. ## `gt.config.json` The `init` command helps you configure your project's GT settings. It will create a `gt.config.json` file in the root of your project. The file will contain the following settings: - `defaultLocale`: The default locale for your project. - `locales`: An array of [supported locales](/docs/platform/supported-locales) for your project. - `files`: This is an object that contains information about the content you want to translate. For more specific information about the `gt.config.json` file, please see the [config docs](/docs/cli/reference/config). This part of the wizard can also be ran independently via `npx gtx-cli configure`. ## Credentials The wizard will help you generate an API key and project ID for your project (if they are not already set up). Please note that the API key and project ID are not required to use `gt-react` or `gt-next`. The wizard will add the API key and project ID to your `.env.local` file. If this file does not exist, the wizard will create it and add it to your `.gitignore` file. This part of the wizard can also be ran independently via `npx gtx-cli auth`.