CLI Tool

The Next Translator CLI makes it easy to connect your Next.js project with the Next Translator service.

You can install it from npm:
@pelag/nts on npm


Main Commands

1. Create a New Project

npx @pelag/nts create
  • Creates a new Next.js project using your project settings from the website.
  • Internally it uses the official create-next-app@latest, so your project always follows the best practices from the Next.js team.
  • After running this command, you get a ready-to-use multilingual Next.js app.

2. Initialize CLI in an Existing Project

npx nts init
  • Links your local Next.js project with the project you created on the website.
  • Creates the nts.config.json file in your project.
  • In this file, you define the path to your JSON translation files.

3. Update Translations

npx nts update
  • Downloads the latest translations from the website.
  • Updates your local JSON files

Authentication

  • When you log in through the CLI, your access tokens are stored in your user folder:~/.nts
  • This allows the CLI to work without asking you to log in every time.