JSPM

gtx-cli

2.3.15
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2921
  • Score
    100M100P100Q109203F
  • License FSL-1.1-ALv2

CLI tool for AI-powered i18n

Package Exports

  • gtx-cli
  • gtx-cli/api/checkFileTranslations
  • gtx-cli/api/downloadFileBatch
  • gtx-cli/api/sendFiles
  • gtx-cli/api/uploadFiles
  • gtx-cli/cli/base
  • gtx-cli/cli/commands/stage
  • gtx-cli/cli/commands/translate
  • gtx-cli/cli/flags
  • gtx-cli/cli/next
  • gtx-cli/cli/react
  • gtx-cli/config/generateSettings
  • gtx-cli/config/optionPresets
  • gtx-cli/config/resolveConfig
  • gtx-cli/config/utils
  • gtx-cli/config/validateSettings
  • gtx-cli/console/colors
  • gtx-cli/console/index
  • gtx-cli/console/logging
  • gtx-cli/formats/files/fileMapping
  • gtx-cli/formats/files/save
  • gtx-cli/formats/files/supportedFiles
  • gtx-cli/formats/files/translate
  • gtx-cli/formats/files/upload
  • gtx-cli/formats/gt/save
  • gtx-cli/formats/json/flattenJson
  • gtx-cli/formats/json/mergeJson
  • gtx-cli/formats/json/parseJson
  • gtx-cli/formats/json/utils
  • gtx-cli/formats/utils
  • gtx-cli/formats/yaml/mergeYaml
  • gtx-cli/formats/yaml/parseYaml
  • gtx-cli/formats/yaml/utils
  • gtx-cli/fs/clearLocaleDirs
  • gtx-cli/fs/config/downloadedVersions
  • gtx-cli/fs/config/loadConfig
  • gtx-cli/fs/config/parseFilesConfig
  • gtx-cli/fs/config/setupConfig
  • gtx-cli/fs/config/updateConfig
  • gtx-cli/fs/config/updateVersions
  • gtx-cli/fs/copyFile
  • gtx-cli/fs/createLoadTranslationsFile
  • gtx-cli/fs/determineFramework
  • gtx-cli/fs/findFilepath
  • gtx-cli/fs/getPackageResource
  • gtx-cli/fs/index
  • gtx-cli/fs/loadJSON
  • gtx-cli/fs/matchFiles
  • gtx-cli/fs/saveJSON
  • gtx-cli/fs/utils
  • gtx-cli/hooks/postProcess
  • gtx-cli/index
  • gtx-cli/main
  • gtx-cli/next/config/parseNextConfig
  • gtx-cli/next/jsx/utils
  • gtx-cli/next/parse/handleInitGT
  • gtx-cli/next/parse/wrapContent
  • gtx-cli/react/config/createESBuildConfig
  • gtx-cli/react/data-_gt/addGTIdentifierToSyntaxTree
  • gtx-cli/react/jsx/evaluateJsx
  • gtx-cli/react/jsx/trimJsxStringChildren
  • gtx-cli/react/jsx/utils/constants
  • gtx-cli/react/jsx/utils/parseAst
  • gtx-cli/react/jsx/utils/parseJsx
  • gtx-cli/react/jsx/utils/parseStringFunction
  • gtx-cli/react/jsx/utils/validateStringFunction
  • gtx-cli/react/jsx/wrapJsx
  • gtx-cli/react/parse/addVitePlugin/index
  • gtx-cli/react/parse/addVitePlugin/installCompiler
  • gtx-cli/react/parse/addVitePlugin/updateViteConfig
  • gtx-cli/react/parse/addVitePlugin/utils/addCompilerImport
  • gtx-cli/react/parse/addVitePlugin/utils/addPluginInvocation
  • gtx-cli/react/parse/addVitePlugin/utils/checkCompilerImport
  • gtx-cli/react/parse/addVitePlugin/utils/checkPluginInvocation
  • gtx-cli/react/parse/createDictionaryUpdates
  • gtx-cli/react/parse/createInlineUpdates
  • gtx-cli/react/parse/wrapContent
  • gtx-cli/react/utils/flattenDictionary
  • gtx-cli/react/utils/getEntryAndMetadata
  • gtx-cli/react/utils/getVariableName
  • gtx-cli/setup/userInput
  • gtx-cli/setup/wizard
  • gtx-cli/state/recentDownloads
  • gtx-cli/translation/parse
  • gtx-cli/translation/stage
  • gtx-cli/translation/validate
  • gtx-cli/types
  • gtx-cli/types/data
  • gtx-cli/types/data/json
  • gtx-cli/types/files
  • gtx-cli/types/index
  • gtx-cli/utils/addExplicitAnchorIds
  • gtx-cli/utils/constants
  • gtx-cli/utils/credentials
  • gtx-cli/utils/flattenJsonFiles
  • gtx-cli/utils/gt
  • gtx-cli/utils/hash
  • gtx-cli/utils/headers
  • gtx-cli/utils/installPackage
  • gtx-cli/utils/localizeStaticImports
  • gtx-cli/utils/localizeStaticUrls
  • gtx-cli/utils/packageInfo
  • gtx-cli/utils/packageJson
  • gtx-cli/utils/packageManager
  • gtx-cli/utils/parse/needsCJS
  • gtx-cli/utils/processAnchorIds
  • gtx-cli/utils/sanitizeFileContent
  • gtx-cli/utils/validateMdx

Readme

General Translation

gtx-cli: General Purpose CLI Tool for General Translation

gtx-cli is a command-line tool used to interface with General Translation's AI-powered i18n platform.

See our docs for more information including guides, examples, and API references.

Installation

npm install gtx-cli

Usage

Set up

For more details, check out the setup command documentation.

If you are using gt-react or gt-next, run this command to automatically insert <T> components into your project.

npx gtx-cli setup

Init

For more details, check out the init command documentation.

This command sets up your gt.config.json file. You will need to run this command in order to run the translate command.

npx gtx-cli init

Translation

For more details, check out the translate command documentation.

Before deploying to production, you need to generate translations. First, add your production api keys:

GT_API_KEY=your-production-api-key
GT_PROJECT_ID=your-project-id

Next run the translate command. This will generate translations and either publish them to the CDN or save them in your project depending on your configuration.

npx gtx-cli translate

Documentation

Full documentation, including guides, examples, and API references, can be found at General Translation Docs.

Contributing

We welcome any contributions to our libraries. Please submit a pull request!