@zack/translate-text

Translate text into a target language using LLM.

Z
@zack
Publication time unavailable51 installs · all versions

Get started

Install, run, or load this Tool.

Run directly with the CLI or call from an SDK

01Install

Resolve this exact Tool version and its prepared dependencies.

agentpm install @zack/translate-text@0.1.4

02Run Tool

Send JSON to its declared input contract and receive JSON output.

agentpm run @zack/translate-text@0.1.4 --input '{"text":"The text to be translated","target_language":"The language to translate the text into"}'

Schema-derived starter input. Replace sample values with your own before running.

This Tool declares required environment variables. Review requirements in Runtime & execution before running it.

ORLoad via SDK

Call the installed Tool through an SDK.

import { load } from '@agentpm/sdk';
const t = await load('@zack/translate-text@0.1.4');
CLI version & updates

CLI 0.1.36+ reads and preserves standard declarations. New publications require an explicit supported standard; use the latest CLI for current authoring checks. Historical releases remain installable as published. This floor does not establish selected-release installation support or Harness readiness.

Check agentpm --version, then follow the CLI installation and update guide. See the publication compatibility requirements.

translate-text

What it does

Translates text to a target language using OpenAI.

AgentPM manifest

See agent.json in this folder. It declares:

  • "kind": "tool", "runtime": { "type": "node", "version": "20" }
  • "entrypoint": { "command": "node", "args": ["dist/index.js"] }
  • JSON Schema for inputs and outputs

Quirks

  • Requires OPENAI_API_KEY.

Entrypoint reads JSON from stdin and prints a single JSON object to stdout.

Setup & run

# install and build
pnpm -C tools-node/translate-text build

# set env and run
NODE_OPTIONS=--no-deprecation \
pnpm --dir tools-node/translate-text exec dotenv -e .env.local -- \
node dist/index.js <<'JSON'
{"text":"Hello world","target_language":"Spanish"}
JSON
@zack/translate-text v0.1.4 · AgentPM™