Skip to content

CLI

The package installs a tarask binary. It wraps the tarask pipeline with flags that map onto TaraskConfig options.

Terminal window
npm install -g taraskevizer
# or
yarn global add taraskevizer
# or
bun add -g taraskevizer
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
Flag Description
-nec, --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.