{"id":17068,"library":"stringify-cli","title":"Stringify CLI","description":"The Stringify CLI (Command Line Interface) is a specialized tool for managing localization strings by interacting directly with the Stringify platform. It enables developers to download locale files from and upload changes to the Stringify server via the command line. Currently at stable version 1.0.4, it facilitates key localization workflows through commands for initial configuration, project setup, and synchronization of translation files. Its primary differentiator is its tight integration with the Stringify web interface, allowing for streamlined i18n operations using an API token for secure authentication in both development and CI/CD environments. The tool is designed to simplify the process of keeping local translation files in sync with a centralized localization management system.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"git://github.com/stringify-app/stringify-cli","tags":["javascript","stringify","cli","localization","i18n"],"install":[{"cmd":"npm install stringify-cli","lang":"bash","label":"npm"},{"cmd":"yarn add stringify-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add stringify-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"npm install -g stringify-cli\nstringify --help\n\n# Configure the CLI (will guide through API token acquisition)\nstringify config\n\n# Initialize a project in the current directory, linking to a Stringify project\n# This creates a stringify.config.json file\nstringify init\n\n# Synchronize locale files (pulls from server, then pushes local changes)\n# Use process.env.STRINGIFY_API_TOKEN in CI environments\nSTRINGIFY_API_TOKEN=\"your_api_token\" stringify sync","lang":"bash","description":"Installs the Stringify CLI globally, shows help, and demonstrates basic configuration and project initialization/sync workflows."},"warnings":[{"fix":"Always run `stringify push` or `stringify sync` before `stringify pull` to ensure local changes are uploaded, or commit changes to version control.","message":"The `stringify pull` command overwrites existing locale files on your local system without confirmation. Any unsynchronized local changes in those files will be lost.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"For CI/CD environments, ensure a consistent workflow where pushes are atomic, or use `--force` (with caution) if automated conflict resolution is desired (though `--force` behavior for conflicts isn't explicitly detailed, it's generally risky).","message":"During `stringify push`, conflicts can occur if another user has modified the same string after your last pull. The CLI will prompt for interactive conflict resolution, which can block automated workflows.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run `stringify config` to configure the CLI interactively and obtain an API token, or set the `STRINGIFY_API_TOKEN` environment variable, especially for CI/CD.","message":"An API token is required for the Stringify CLI to communicate with the server. This can be configured interactively or provided via an environment variable.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure Node.js version 10 or greater is installed on your system. Use a tool like `nvm` to manage Node.js versions if necessary.","message":"The CLI is only compatible with Node.js version 10 or higher. Using older versions will lead to installation or runtime errors.","severity":"gotcha","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Run `npm install -g stringify-cli` to install it globally. If the problem persists, check your system's PATH environment variable.","cause":"The `stringify-cli` package was not installed globally, or the global npm bin directory is not in your system's PATH.","error":"stringify: command not found"},{"fix":"Execute `stringify config` and follow the interactive prompts to set up your API token, or set the `STRINGIFY_API_TOKEN` environment variable before running commands.","cause":"The Stringify API token required for authentication has not been provided or saved.","error":"Error: API token is not configured. Please run 'stringify config' to set it up."},{"fix":"Navigate to your project's root directory and run `stringify init` to link it with a project on the Stringify platform and create the configuration file.","cause":"The current working directory does not contain a `stringify.config.json` file, indicating the project has not been initialized with the CLI.","error":"No Stringify project found in this directory. Please run 'stringify init'."}],"ecosystem":"npm","meta_description":null}