Skip to main content
Use prismy push and prismy pull when you use Prismy Hosted without native GitHub/GitLab. You upload source files to Prismy and download translated files (locally or in CI).
Using GitHub or GitLab with Prismy? Use prismy generate instead.

Authentication

The CLI looks for an API token in this order:
  1. --api-token (flag)
  2. PRISMY_API_TOKEN environment variable
  3. Stored key from prismy auth (only when not in CI)
In CI, you must set --api-token or PRISMY_API_TOKEN; the CLI will not prompt. Get your token from Prismy Settings.

prismy push

Upload a local translation file to Prismy.
Required: --repo-id, --language, --bundle-name Example:

Push options

File formats

  • JSON, .arb, .xcstrings: Parsed and sent as structured JSON.
  • Other (.yaml, .po, .resx, .xml, .ts, .js): Sent as raw content with format metadata.

prismy pull

Download a translation file from Prismy. The CLI writes JSON to the path you give.
Example:
Options: --repo-id, --language, --bundle-name (required); --branch (default: main); --api-token. The file is created or overwritten. If the file does not exist on Prismy, you get an empty object {}. For non-JSON formats (e.g. YAML, PO), use the CDN URL from your Prismy Hosted configuration.

CI setup

Use a pipeline to push the source file, wait for translations, then pull translated files.

Secret / variable

Optional: PRISMY_REPO_ID, PRISMY_BUNDLE_NAME (or pass --repo-id / --bundle-name in the script).

GitHub Actions

.github/workflows/prismy-sync.yml
Add PRISMY_API_TOKEN in Settings → Secrets and variables → Actions. Optionally add variables PRISMY_REPO_ID and PRISMY_BUNDLE_NAME, or hardcode them in the YAML.

GitLab CI

Add a job (or merge into .gitlab-ci.yml):
Add PRISMY_API_TOKEN in Settings → CI/CD → Variables (masked). Adjust git push if you use a deploy token or project access token.

Bitbucket Pipelines

Use a step that installs the CLI, runs prismy push with --wait-for-translations, then prismy pull for each language, and finally commits and pushes. Set PRISMY_API_TOKEN, PRISMY_REPO_ID, and PRISMY_BUNDLE_NAME as repository variables.

Run only when i18n changes

  • GitHub Actions: Under on.push, add paths: ["src/i18n/en.json"].
  • GitLab CI: In rules, use changes: ["src/i18n/en.json"].
Adjust paths and branch names to match your project. Reference: prismy-cli — PRISMY_PUSH_PULL_CI, CI_SETUP