# gt: General Translation CLI tool: Upload URL: https://generaltranslation.com/en-US/docs/cli/upload.mdx --- title: Upload description: How to upload source files and translations to the General Translation platform --- ## Usage ```bash npx gt upload ``` **Note:** This command requires a production API key! Get one on the [platform](https://generaltranslation.com/dashboard). ## Overview The `gt upload` command uploads your project's source files and any existing translations to the General Translation platform. This syncs your local files with the platform so they can be managed, enqueued for translation, and tracked. The typical workflow for split CI/CD pipelines is: 1. **`gt upload`** — upload source files to the General Translation platform 2. [`gt enqueue`](/docs/cli/enqueue) — enqueue the uploaded files for translation 3. [`gt download`](/docs/cli/download) — download the completed translations **For Production Use Only!** This command is meant for production builds and **should not be used in development**. Remember to specify your production API key (`GT_API_KEY`) and Project ID (`GT_PROJECT_ID`) in your environment variables. ## How it works 1. Reads your `gt.config.json` to determine which files to upload 2. Collects all translatable source files (JSON, YAML, Markdown, MDX, etc.) 3. Hashes each file to generate a `fileId` (based on path) and `versionId` (based on content) 4. Queries the General Translation API to determine which files are new or changed 5. Detects file moves (same content, different path) and preserves existing translations 6. Uploads new and changed source files to the platform 7. If existing translation files are found locally, uploads those as well ## Flags The `upload` command accepts the same flags as [`translate`](/docs/cli/translate#flags). | Parameter | Description | Type | Optional | Default | | ------------------------------- | -------------------------------------------------------------------------------------------------- | ---------- | -------- | ---------------------- | | `--api-key` | Specify a production API key | `string` | `true` | | | `--project-id` | Specify the project ID | `string` | `true` | | | `--version-id` | Specify a version ID (by default, a hash of the content) | `string` | `true` | | | `--config ` | Specify a path to the GT config file | `string` | `true` | `"gt.config.json"` | | `--new, --locales ` | Locales to translate your project into | `[string]` | `true` | | | `--default-locale ` | The source locale for the project | `string` | `true` | `en` | | `--dry-run` | Dry run the command | `flag` | `true` | `false` | | `--timeout` | The timeout for the request in seconds | `number` | `true` | `600` | ## Example: Split CI pipeline ```bash # Stage 1: Upload source files npx gt upload # Stage 2: Enqueue translations npx gt enqueue # Stage 3: Download when ready npx gt download ```