string-catalog-cli
v1.0.0
Published
CLI for managing Xcode String Catalog (.xcstrings) files
Maintainers
Readme
string-catalog-cli
CLI for managing Xcode String Catalog (.xcstrings) files. Query, inspect, and update translations from the terminal.
Install
npm install -g string-catalog-cli
# or
bun add -g string-catalog-cliCommands
All commands take a path to an .xcstrings file as the first argument. Add --json to any command for machine-readable output.
scat languages <file>
List all languages with translation coverage.
scat languages App.xcstringsscat stats <file>
Detailed statistics broken down by state (translated, needs_review, new, stale).
scat stats App.xcstrings
scat stats App.xcstrings --jsonscat keys <file>
List all string keys. Supports pagination.
scat keys App.xcstrings
scat keys App.xcstrings --limit 50 --offset 0scat search <file> <query>
Case-insensitive substring search over key names.
scat search App.xcstrings "button"scat get <file> <key>
Show all translations for a specific key with their states.
scat get App.xcstrings "Cancel"
scat get App.xcstrings "Cancel" --jsonscat missing <file>
List keys with missing translations, optionally filtered to one language.
scat missing App.xcstrings
scat missing App.xcstrings --language de
scat missing App.xcstrings --language de --jsonscat stale <file>
List keys marked stale by Xcode's extraction state or by translation state.
scat stale App.xcstringsscat update <file> <json-or-path>
Update translations from an inline JSON string or a path to a JSON file.
scat update App.xcstrings translations.json
scat update App.xcstrings '{"data":[{"key":"Cancel","translations":[{"language":"de","value":"Abbrechen"}]}]}'JSON format:
{
"data": [
{
"key": "Hello %@",
"translations": [
{ "language": "de", "value": "Hallo %@" },
{ "language": "fr", "value": "Bonjour %@" }
],
"comment": "Greeting with user name"
}
]
}For plural strings, use pluralForms instead of value:
{
"data": [
{
"key": "%lld items",
"translations": [
{
"language": "de",
"pluralForms": {
"one": "%lld Element",
"other": "%lld Elemente"
}
}
]
}
]
}iOS Format Placeholders
Preserve these in all translations:
| Placeholder | Meaning |
|-------------|---------|
| %@ | String / object |
| %d, %lld | Integer |
| %f | Float |
| %1$@, %2$@ | Positional (order can change per language) |
Build from source
bun install
bun run build
node dist/cli/index.js --helpTest
bun testRelated
- string-catalog-mcp — MCP server that wraps this library for use with Claude and other AI tools
