Observed since 21 Oct, 09:04 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Modern Traduora CLI with TypeScript and client_credentials support
A modern CLI and JavaScript SDK for Traduora with first-class client_credentials support.
init flow to bootstrap credentials and default statevalue as the user-facing key (instead of UUIDs)client_credentials as the default auth modeljson/js/ts) and environment variable fallbackpnpm add @0xlimao/traduora-cli
pnpm add -g @0xlimao/traduora-cli
git clone https://github.com/flyinglimao/traduora-cli.git
cd traduora-cli
pnpm install
pnpm build
Initialize interactively:
traduora init
Show help:
traduora --help
traduora project --help
traduora term --help
traduora translation --help
traduora export --help
Typical flow:
traduora project status
traduora translation use en_GB
traduora term add form.email.required
traduora translation add --term form.email.required --value "E-mail input is required"
traduora export --format jsonnested --output ./i18n/en_GB.json
traduora init --help
init supports:
client_credentials), then prompt for project ID--role admin|editor|viewer)traduora project --help
traduora project status --help
project only provides status.
It always uses the current project from state/config.
For term/translation/export commands, project is resolved from currentProjectId in state.
traduora term --help
traduora term add --help
traduora term list --help
traduora term update --help
traduora term delete --help
traduora translation --help
traduora translation use --help
traduora translation add --help
traduora translation list --help
traduora translation update --help
traduora translation delete --help
traduora export --help
Priority order:
Supported config files:
traduora.config.jsontraduora.config.tstraduora.config.jstraduora.config.mjstraduora.config.cjsSupported environment variables:
TRADUORA_BASE_URLTRADUORA_GRANT_TYPETRADUORA_CLIENT_IDTRADUORA_CLIENT_SECRETTRADUORA_USERNAMETRADUORA_PASSWORDTRADUORA_ACCESS_TOKENState (currentProjectId, currentLocale) is stored in .traduora.state.json.
import { createApi } from "@0xlimao/traduora-cli";
const { api } = await createApi();
const terms = await api.listTerms("<projectId>");
console.log(terms);
const { createApi } = require("@0xlimao/traduora-cli");
(async () => {
const { api } = await createApi();
const terms = await api.listTerms("<projectId>");
console.log(terms);
})();
For full method details, see the SDK TypeScript Reference in the docs site.
docs/Run locally:
cd docs
pnpm install
pnpm start
pnpm install
pnpm build
pnpm typecheck
pnpm dev -- --help
Local Docker integration test (CLI + SDK against real Traduora instance):
pnpm test:e2e:local
See test instructions in test/README.md.
Issues and pull requests are welcome:
MIT. See LICENSE.
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:04 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:01fca44f66ec08913a37c967b3220d26a22648f09945a162c02a14d7f6ce9852