Skip to content

Getting Started

Terminal Translator is a translation CLI that uses the Google Cloud API.

Installation

Installation is very simple, just run the following command in the terminal:

pip install tt-terminal-translator

We recommend trying pipx

pipx is a tool to help you install and run end-user applications written in Python.

pipx install tt-terminal-translator

Configuration

To start using the CLI, first we need to configure the access credentials for the Google API.

Login to the Google Cloud API, and click start free.

Step 1

A credit card will be required but don't worry, there will be no charge.

Go to the google cloud console home page and create a new project

Step 2

Step 3

Give the project any name

Step 4

Select the project, and save the project-id

Step 5

Search for Cloud Translation API and enable it

Step 6

Create an access credential

Be aware of the usage quota limit

Don't share your credentials

Step 7

Step 8

Give the service account any name

Step 9

Go back to the API page and select your service account, and create a new Json type key

A json file containing your credentials will be downloaded

Step 10

Step 11

Go back to your service accounts and copy the respective email

Step 12

In the IAM session, grant access to this email and assing the role Cloud Translation API Admin

Step 13

Step 14

Now with the configured service credentials we can go to the CLI

Use the tt-configure command passing two arguments, first the project-id followed by the path of the credentials Json file.

tt-configure <project-id> <google-api-credentials>

Step 15

Finished! Now you are ready to use the Terminal Translator CLI

See the tutorial session to learn about the basic usage