Skip to content

i18n-agent/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@i18n-agent/cli

Terminal client for the i18n-agent translation service. Translate text and files directly from your terminal.

Install

npm install -g @i18n-agent/cli

Requires Node.js >= 18.

Setup

# Save your API key (get one at https://app.i18nagent.ai)
i18nagent login

Or set via environment variable (for CI/CD):

export I18N_AGENT_API_KEY=your-key-here

Usage

Translate text

i18nagent translate "Hello world" --lang es
i18nagent translate "Hello world" --lang es,fr,ja

Translate files

i18nagent translate ./locales/en.json --lang es,fr
i18nagent translate ./docs/guide.md --lang de --namespace my-project

Interactive mode

i18nagent translate     # prompts for input
i18nagent tui           # full interactive menu

Check job status

i18nagent status <jobId>

Download translations

i18nagent download <jobId> --output ./locales

Resume failed jobs

i18nagent resume <jobId>

Check credits

i18nagent credits

Upload existing translations

i18nagent upload ./de.json --source en --target de --namespace my-project

List supported languages

i18nagent languages

Analyze content

i18nagent analyze ./en.json --lang es

JSON output

All commands support --json for machine-readable output:

i18nagent translate "Hello" --lang es --json
i18nagent credits --json

Config

Config is stored at ~/.config/i18nagent/config.json:

{
  "apiKey": "i18n_...",
  "defaultLanguages": ["es", "fr"],
  "defaultNamespace": "my-project"
}

Environment variable I18N_AGENT_API_KEY takes priority over config file.

Binary distribution

See docs/BINARY_DISTRIBUTION.md for standalone binary packaging.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors