Translate CLI for Openclaw

A robust command-line interface for translating text, files, and code catalogs using various AI providers and custom prompt templates.

atacan
v0.2.0
Feb 28, 2026
0
5.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install translate-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install translate-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Translate CLI?

Translate CLI is a professional-grade tool designed for developers who need to integrate high-quality AI translation directly into their terminal workflows. As a featured part of the Openclaw Skills library, it provides a unified interface for multiple LLM providers, including OpenAI, Anthropic, Ollama, and DeepL. It is specifically built to handle complex tasks such as translating documentation, source code comments, and specialized localization files like Apple .xcstrings.

By utilizing Openclaw Skills like this CLI, users gain the ability to automate localization pipelines with precision. The tool supports persistent configuration via TOML files, allowing for fine-grained control over model selection, base URLs, and network settings, making it an essential utility for internationalized software development.

Translate CLI Use Cases

  • Translating markdown documentation files while maintaining structure and frontmatter.
  • Localizing software project strings and .xcstrings catalogs for iOS or macOS applications.
  • Integrating automated translation into CI/CD pipelines using stdin and stdout piping.
  • Batch processing entire directories of files using glob patterns and parallel execution.
  • Testing and comparing translation quality across different AI models using the dry-run mode.

How Translate CLI Works

  1. The user initiates a command specifying the target language and the input source, which can be a string, a file, or piped input.
  2. The CLI checks the local config.toml to determine the active provider and associated API credentials.
  3. A prompt is constructed based on internal logic or user-defined presets, wrapping the source text with translation instructions.
  4. The tool sends the request to the chosen AI provider (e.g., Anthropic or a local Ollama instance) and handles the response stream.
  5. The translated content is output to the terminal or saved to the filesystem, optionally overwriting the source file in-place.

Translate CLI Setup

To get started with this tool from the Openclaw Skills collection, follow these configuration steps:

# Set your default provider to OpenAI
translate config set defaults.provider openai

# Configure your API key as an environment variable
export OPENAI_API_KEY="your-api-key-here"

# Run your first translation
translate --to fr README.md

Translate CLI Data Schema & Taxonomy

The Translate CLI manages its operations through a structured configuration schema and supports various input/output formats.

Data Component Format Purpose
config.toml TOML Stores global defaults, provider endpoints, and model settings.
Presets TOML/Template Defines custom system prompts and placeholders for specific contexts.
Input Files Markdown, Text, .xcstrings Source content to be processed by the translation engine.
Metadata CLI Flags Controls runtime behavior like parallel jobs and dry-runs.

Translate CLI Advanced Features

  • Custom prompt templates using the @file syntax for complex, context-aware translations.
  • Parallel job processing to handle large-scale translation tasks across multiple files simultaneously.
  • Flexible output management with --in-place editing or custom filename suffixes.
  • Deep integration with local LLMs via Ollama for private, offline translation workflows.
  • Advanced dry-run capabilities to validate prompt construction and provider connectivity without token usage.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*