# gt: General Translation CLI tool: gt auth URL: https://generaltranslation.com/en-GB/docs/cli/reference/commands/auth.mdx --- title: gt auth description: Generate General Translation API credentials for a project. API reference for the gt auth command. --- Generates an API key and Project ID and writes them to your `.env.local` file. If `.env.local` does not exist, the command creates it and adds it to `.gitignore`. If you do not pass `--key-type`, the command prompts you to choose which key type to generate. ```bash npx gt auth ``` ## How it works [#how-it-works] 1. Prompts you to sign in to the General Translation Dashboard. 2. Generates the requested API key type and Project ID. 3. Creates `.env.local` (and adds it to `.gitignore`) if needed. 4. Writes `GT_API_KEY` and `GT_PROJECT_ID` to `.env.local`. ## Flags [#flags] | Parameter | Description | Type | Optional | Default | | ----------------------- | ------------------------------------------------------------ | -------- | -------- | ---------------- | | `-c, --config ` | Path to the config file. | `string` | Yes | `gt.config.json` | | `-t, --key-type ` | Key type to generate: `production`, `development`, or `all`. | `string` | Yes | Prompted | ## Example [#example] ```bash # Prompt for the key type, then write credentials to .env.local npx gt auth # Generate a production key without the prompt npx gt auth --key-type production ``` ## Other notes [#notes] * 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. * `auth` is the credentials step of the [`gt init`](/docs/cli/reference/commands/init) wizard. Run it on its own to generate credentials for an already-configured project.