npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@taigikeyboard/taigi-cli

v0.1.5

Published

Bidirectional converter between Taiwanese phonetic systems: TL (Tai-lo), POJ (Pe-oh-e-ji), and TPS (方音符號), with tone mark / tone number conversion

Downloads

782

Readme

taigi-cli

npm version npm downloads node license

Bidirectional converter between Taiwanese phonetic systems: Tâi-lô (TL), Pe̍h-ōe-jī (POJ), and Taiwanese Phonetic Symbols (TPS), with tone mark / tone number conversion.

Demo

taigi-cli demo

Features

  • Convert between TL, POJ, and TPS
  • Tone mark ↔ tone number conversion
  • Handles mixed text with punctuation and hyphens
  • Preserves letter casing

Install

npm install -g @taigikeyboard/taigi-cli

Or run without installing:

npx -p @taigikeyboard/taigi-cli tai tl poj "peh8-oe7-ji7"

CLI

tai <from> <to|mark|number|num> [--ascii] [text...]
tai -f <system> -t <system> [--tone mark|number|num] [--ascii] [text...]

Systems: tl, poj, tps. The CLI also accepts common aliases like tailo, tai-lo, and zhuyin. Input comes from arguments, or from stdin if none given.

tai tl poj "peh8-oe7-ji7"                   # pe̍h-ōe-jī
echo "tai5-gi2" | tai tl tps                # ㄉㄞˊ ㆣㄧˋ
tai tl num "pe̍h-uē-jī"                     # peh8-ue7-ji7
tai poj mark "peh8-oe7-ji7"                 # pe̍h-ōe-jī
tai -f poj -t poj --tone number --ascii "o͘-á"

Use mark, number, or num as the second argument to convert tone format inside the same romanization system. num is an alias for number. --tone, --mark, --number, and --num are also available when --from and --to are the same (TL or POJ). --ascii / --poj-ascii rewrites POJ / as oo/nn.

Stdin and files

If no text argument is provided, tai reads UTF-8 text from stdin and writes the converted text to stdout.

echo "tai5-gi2" | tai tl tps
tai tl poj < input.txt > output.txt
cat input.txt | tai poj tl

Newlines are preserved, so tai can process multi-line files.

API

import { convert, toToneNumber, toToneMark } from "@taigikeyboard/taigi-cli";

convert("tshiu-a", "tl", "poj");       // "chhiu-a"
convert("chhiu-a", "poj", "tl");       // "tshiu-a"
convert("tshiu7 a2", "tl", "zhuyin");  // TPS output

toToneNumber("Gâu-tsá");               // "Gau5-tsa2"
toToneMark("tshiu7-a2");               // "tshiú-á"
toToneMark("tshiu7-a2", "poj");        // "chhiú-á"

Note: the programmatic API uses "zhuyin" as the system name for TPS.

Web

Live at taigikeyboard.tw.

Development

Node.js 22+, no dependencies, tests via built-in node:test.

npm test