Registry / ai-ml / gtx-cli

gtx-cli

JSON →
library2.14.51jsnpmunverified

CLI tool for AI-powered i18n (wrapper for gt). Current stable version: 2.14.19. Active development. Key differentiators: leverages General Translation's AI for automated localization workflows. Alternative to manual i18n tooling, integrates with gt ecosystem.

npm install gtx-cli
INSTALL
IMPORT
SIG · GTX-CLI
G
gtx-cli
ai-mljavascriptv2.14.51
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gtx
import { gtx } from 'gtx-cli'
const gtx = require('gtx-cli')
ESM-only package; CJS require not supported.
cli
import { cli } from 'gtx-cli'
Default export is deprecated; use named export.
runGtx
import { runGtx } from 'gtx-cli'
import runGtx from 'gtx-cli'
Named export, not default. Available from v2.0.0.

Example of using gtx-cli to run translation on locale files with API key.

import { gtx } from 'gtx-cli'; const result = await gtx({ source: './src/locales', target: './dist/locales', apiKey: process.env.GT_API_KEY ?? '', }); console.log('Translation completed:', result);
gtx --version
Debug
Known issues
breakingIn v2.x, the API changed from default export to named export. Use `import { gtx } from 'gtx-cli'` instead of `import gtx from 'gtx-cli'`.
fix
Update import to named export: import { gtx } from 'gtx-cli'
affects: >=2.0.0
deprecatedThe `cli` function is deprecated in favor of `runGtx`.
fix
Replace `cli` with `runGtx`
affects: >=2.14.0
gotchaThe package is ESM-only and does not support CommonJS `require()`.
fix
Use `import` syntax and ensure your project supports ESM.
affects: >=2.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/gtx-cli/index.mjs not supported.
Using CommonJS `require()` on an ESM-only package.
fix
Switch to `import { gtx } from 'gtx-cli'` and set `"type": "module"` in your package.json, or use dynamic import().
TypeError: gtx is not a function
Default import of package that only exports named exports.
fix
Use `import { gtx } from 'gtx-cli'` instead of `import gtx from 'gtx-cli'`.
Upgrade
Version history
2.14.51latest on npm
Audit
Dependencies
gtrequiredCore translation engine dependency
Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
gtx-cli — npm install gtx-cli · libregistry