mac-trans for Openclaw

A high-performance command-line tool for translating text and file contents with automatic language detection.

abcnull
v1.0.1
Mar 22, 2026
0
792
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install mac-trans

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 mac-trans 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 mac-trans?

mac-trans is a specialized translation utility designed for the macOS ecosystem. It leverages the power of translate-shell to provide instantaneous translations of raw text strings or entire files directly from the terminal. By integrating this capability into Openclaw Skills, developers and researchers can automate the localization of documentation, analyze foreign language logs, or quickly interpret code comments without leaving their development environment.

The tool is built to be lightweight yet versatile, supporting multiple translation engines like Bing to ensure high accuracy. It features intelligent automatic detection for Chinese and English by default, while maintaining the flexibility to target any supported global language through simple flag parameters.

mac-trans Use Cases

  • Automatically translating project README files or technical documentation between English and Chinese.
  • Extracting and translating specific lines from large log files using piped commands.
  • Localizing software string resources during the development phase.
  • Quick snippet translation during research or code reviews within the CLI.

How mac-trans Works

  1. The skill identifies the input type, determining if it is a direct string or a file path.
  2. It utilizes the translate-shell engine to process the content, applying automatic language detection unless a specific target language is defined.
  3. For file-based requests, it reads the content (or specific line ranges via head/sed) and passes the buffer to the translation engine.
  4. The translated output is returned to the terminal or the calling agent in a clean, brief format for immediate use.

mac-trans Setup

To get started with this skill for Openclaw Skills, ensure you have Homebrew installed on your Mac, then run:

# Search and install the translation engine
brew install translate-shell

mac-trans Data Schema & Taxonomy

The mac-trans skill processes data dynamically and interacts with the filesystem as follows:

Data Type Handling Method Description
Input Text Standard Input Direct strings passed via the -b flag.
Files Local Path Access Reads content from local paths (e.g., ~/document.txt).
Language Maps Internal Reference Uses ISO language codes (e.g., ja for Japanese, en for English).
Piped Data Stream Processing Supports inputs from head, tail, or sed for partial file translation.

mac-trans Advanced Features

  • Multi-Engine Support: Use the -e flag to switch between translation providers like Bing.
  • Specific Line Translation: Seamlessly integrates with Unix utilities to translate specific ranges (e.g., lines 5-20) of a document.
  • Language Discovery: Integrated -R flag to query all supported regional languages and their corresponding codes.
  • Automated Error Handling: Intelligent prompts for missing dependencies (Homebrew/Translate-shell) or invalid file paths.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*