# gt: General Translation CLI tool: gt save-local URL: https://generaltranslation.com/en-US/docs/cli/reference/commands/save-local.mdx --- title: gt save-local description: Sync local translation edits back to the General Translation platform. API reference for the gt save-local command. --- Sends local edits you have made to translation files back to the General Translation platform by submitting diffs. It does not enqueue any new translations — it only syncs your local changes. See [Manage translations](/docs/cli/guides/managing-translations#save-local). Use it when you or a translator edits downloaded translation files by hand and you want those changes reflected on the platform. *Note: Requires a `GT_API_KEY` and `GT_PROJECT_ID`.* ```bash npx gt save-local ``` ## How it works [#how-it-works] 1. Reads your configured files from `gt.config.json`. 2. Resolves the current git branch. 3. Identifies files that changed since the last download by comparing content hashes. 4. Fetches the original server content and computes a diff for each changed file. 5. Submits the diffs to the platform. Only changed files are processed. ## Flags [#flags] | Parameter | Description | Type | Optional | Default | | --- | --- | --- | --- | --- | | `--api-key ` | API key for General Translation. | `string` | Yes | `GT_API_KEY` | | `--project-id ` | Project ID. | `string` | Yes | `GT_PROJECT_ID` | | `-c, --config ` | Path to the config file. | `string` | Yes | `gt.config.json` | | `--publish` | Publish translations to the CDN. | `boolean` | Yes | `false` | ## Example [#example] ```bash # Send local edits to translation files back to the platform npx gt save-local # Sync edits and publish the updated translations to the CDN npx gt save-local --publish ``` ## Other notes [#notes] - The CLI tracks downloaded translations in a lock file and only processes files that changed since the last download. - To save local edits and translate in one step, pass `--save-local` to [`gt translate`](/docs/cli/reference/commands/translate). - Never store your API key in `gt.config.json`. The CLI reads `GT_API_KEY` from the environment automatically.