DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to translate a text string from the command line with Index Translate

Send a sentence to the free API and get a translation back in one command.

Short answer: Clone the repo with git clone https://github.com/bilibili/Index-Translate and open a terminal in the folder; then run python inference/llm/call_api.py "Hello, world!" --target zh to translate a sentence to Chinese; Replace the sentence and the --target value with the text and language you need. All steps.

  • Content
  • Beginner
  • 15 minutes
  • From the README
  • Any agent

Who it is forA developer or writer who needs a quick translation while working in a terminal and has no local GPU.

The problemSetting up a local translation model needs GPUs and model downloads, which is too much for a single short sentence.

The outcomeA translated sentence printed in the terminal, produced by the free hosted model.

What you need first

  • Python installed to run inference/llm/call_api.py
  • Internet access to call the free public API at index-translate.bilibili.com
  • A local image file (PNG or JPG) or text you want translated

Steps

  1. Clone the repo with git clone https://github.com/bilibili/Index-Translate and open a terminal in the folder. (inferred, check the README)
  2. Run python inference/llm/call_api.py "Hello, world!" --target zh to translate a sentence to Chinese.
  3. Replace the sentence and the --target value with the text and language you need.
  4. Check the output for the meaning and for any terminology that must stay fixed.

Prompt for your agent

Use the repo at https://github.com/bilibili/Index-Translate. Run `python inference/llm/call_api.py "<text>" --target <language_code>` and return the translated output. Verify that the output is in the requested language and keeps the meaning of the source text.

Caveat. The free API is a hosted service, so text you send leaves your machine, which may not suit confidential material.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for bilibili/Index-Translate and "Translate a text string from the command line"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer