@0gfoundation/trans-mgm-cli
v0.0.1
Published
CLI for trans-mgm — push source strings, pull finished translations, check per-locale status.
Readme
@0gfoundation/trans-mgm-cli
CLI for trans-mgm — an AI-first translation management platform. Push your source strings, pull finished translations, check per-locale progress.
Most projects don't need the CLI at all: with the trans-mgm GitHub App granted on your repo, pushes to your base branch are ingested automatically and translations come back as a pull request. The CLI is the alternative for repos the App can't reach, or sources that need a build step first.
Install
npm install -g @0gfoundation/trans-mgm-cli # or: pnpm dlx @0gfoundation/trans-mgm-cli <command>Requires Node 22+.
Configure
Add trans-mgm.config.json to your repo root:
{
"apiUrl": "https://trans-mgm.vercel.app",
"project": "your-project-slug",
"sourcePath": "messages/en.json",
"outputTemplate": "messages/{locale}.json"
}Provide your project token (created on the project's Settings tab, shown once) via the environment — never commit it:
export TRANS_MGM_TOKEN=tm_…Commands
trans-mgm push # upload the source file → diff → start translating
trans-mgm status # per-locale progress (final / pending / needs_attention)
trans-mgm pull # write finished translations to {locale}.json filespushtreats the source file as the complete catalog: new and changed keys are translated, keys missing from it are archived (an accidental truncation is refused). Nested objects and arrays are supported.pullwrites only finalized translations, and never overwrites an existing locale file with an empty catalog.
Full documentation: https://trans-mgm.vercel.app/docs
