Skip to content

CLI

The tarask command runs the prebuilt Rust binary for your platform — the same converter as the JS API, but faster, and able to stream multi-GB inputs with parallel processing. Its flags map onto TaraskConfig options.

Installing the package also installs the tarask command. The binary matching your platform is downloaded automatically from GitHub releases on install (or, failing that, on first run).

Terminal window
npm install -g taraskevizer
# or
yarn global add taraskevizer
# or
bun add -g taraskevizer

If the binary cannot be downloaded (offline install, --ignore-scripts), download the asset for your platform manually (see below) and place it into <package>/dist/bin/. Set TARASKEVIZER_SKIP_BINARY_DOWNLOAD=1 to skip the download.

Every release ships standalone tarask executables for these platforms:

OS Architecture Asset
Linux x64 tarask-x86_64-unknown-linux-gnu
Linux ARM64 tarask-aarch64-unknown-linux-gnu
macOS x64 (Intel) tarask-x86_64-apple-darwin
macOS ARM64 (Apple Silicon) tarask-aarch64-apple-darwin
Windows x64 tarask-x86_64-pc-windows-msvc.exe

Download the file from GitHub releases, make it executable (not needed on Windows) and run it:

Terminal window
chmod +x tarask-x86_64-unknown-linux-gnu
./tarask-x86_64-unknown-linux-gnu --latin 'планета'
Terminal window
tarask [options] text

For the full option list, run tarask --help.

Terminal window
npx taraskevizer [options] text
# or
bunx taraskevizer [options] text

Convert and latinize a word:

Terminal window
tarask --latin 'планета'
# p{\fix l}a{\fix ne}ta

Read from a file and write the converted text to another:

Terminal window
tarask < ./cyr-text.txt > ./lat-text.txt

Interactive mode (no text argument) — prompts for input line by line:

Terminal window
tarask
# Enter the text:
Flag Description
-h, --help Show help
-v, --version Show version
Flag Description
-l, --latin Use the Latin alphabet
-lj, --latin-ji Use the Latin alphabet with і/ј
-a, --arabic Use the Arabic alphabet

When to replace і(i) by й(j) after vowels

Section titled “When to replace і(i) by й(j) after vowels”
Flag Description
-jr, --jrandom Random
-ja, --jalways Always

Replace ґ(g) by г(h) in the Cyrillic alphabet

Section titled “Replace ґ(g) by г(h) in the Cyrillic alphabet”
Flag Description
--h Use г instead of ґ
Flag Description
-nv, --no-variations Use the main spelling
-fv, --first-variation Use the first variation
Flag Description
-html, --html HTML mode (emit tarF/tarL/tarH tags)
-abc, --alphabet-only Alphabet-only conversion
-ph, --phonetic Phonetic conversion
Flag Description
-nec, --no-escape-caps (--not-escape-caps) Don’t protect capitalized runs
-nc, --no-color Disable ANSI color wrapping
-st, --single-thread Force single-threaded execution

Ня should appear before a word where the first syllable is stressed. At the moment there is no reliable way to check whether it is stressed. The algorithm applies heuristics, but they do not cover all cases.