# gt: General Translation CLI tool: gt init URL: https://generaltranslation.com/en-GB/docs/cli/reference/commands/init.mdx --- title: gt init description: Run the General Translation setup wizard to configure a project. API reference for the gt init command. --- Runs the setup wizard that prepares a project for General Translation. This is the default command — running `npx gt` with no command runs `init`. The wizard detects your framework and, depending on the project, installs dependencies, configures your framework, creates a `gt.config.json`, and generates credentials. For a step-by-step walkthrough, see [Configuring the CLI](/docs/cli/guides/configuring). ```bash npx gt init ``` ## How it works [#how-it-works] 1. Detects your framework. For a Next.js App Router or Mintlify project, it offers to connect the [Locadex](/docs/platform/locadex/quickstart) AI agent instead. 2. For a React-based project, it can optionally install `gt-react` or `gt-next` and add the `GTProvider` (experimental). 3. Prompts for your default locale and target locales, and creates `gt.config.json`. For local storage, it also creates a [`loadTranslations`](/docs/react/reference/functions/load-translations) file. 4. Installs `gt` as a dev dependency if it is not already installed. 5. Optionally generates an API key and Project ID, and writes them to `.env.local`. *Note: The React setup step is experimental and may not work for every project. Review the changes it makes.* ## Flags [#flags] | Parameter | Description | Type | Optional | Default | | --------------------- | -------------------------------------------- | ---------- | -------- | ----------------------------------------- | | `--src ` | Glob patterns for the app's source code. | `string[]` | Yes | `src`, `app`, `pages`, `components` globs | | `-c, --config ` | Path to the config file. | `string` | Yes | `gt.config.json` | ## Example [#example] ```bash # Run the full setup wizard npx gt init # Running gt with no command does the same thing npx gt ``` ## Other notes [#notes] * `init` runs the same steps as [`gt configure`](/docs/cli/reference/commands/configure) and [`gt auth`](/docs/cli/reference/commands/auth) together, plus the experimental React setup wizard. Run either command on its own to repeat just that step. It does not run [`gt setup`](/docs/cli/reference/commands/setup), which uploads your source files. * The API key and Project ID are not required to use `gt-react` or `gt-next` — they are only needed to call the General Translation API. * If the experimental React setup does not work for your project, set it up manually using the [React](/docs/react/react-quickstart) docs.