kana-ascii
v0.1.0
Published
Render hiragana, katakana, and kanji as ASCII art. Dot-grid canvas + stroke order + mnemonics.
Maintainers
Readme
kana-ascii
Render Japanese hiragana, katakana, and kanji as ASCII art in your terminal.
Dot-grid canvas · stroke order · mnemonics · guaranteed monospace.
あ (a) — ah as in father
. . . . . . . . . . . . .
. . - - - [1] - - - . . .
. . . . | . . | . . . . .
. . . . | [2] | . . . . .
. . . . - - - - . . . . .
. . . . . | . . . . . . .
. . . . ( . ) [3] . . . .
. . . . . . \ . . . . . .
. . . . . . ~[4] . . . . .
Strokes:
[1] horizontal bar — left to right across top
[2] box enclosure — down, across bottom, up (open top-left)
[3] drop + loop — straight down, curves into circle
[4] hook sweep — sweeps right and flicks up
Mnemonic: Someone tied the letter 'a' into a knot. Messy — but it IS an 'a' in there.Install
npm install kana-asciiOr run directly:
npx kana-ascii あ
npx kana-ascii aCLI
# By character
kana-ascii あ
kana-ascii ア
# By romaji — lowercase → hiragana, UPPERCASE → katakana
kana-ascii a # → あ
kana-ascii A # → ア
kana-ascii aiueo # → renders あいうえお in sequence
kana-ascii AIUEO # → renders アイウエオ in sequence
kana-ascii konnichiwa # → こんにちわ (shows coverage for unsupported chars)
# Render everything
kana-ascii --all
# List all supported characters
kana-ascii --listRomaji conversion powered by hepburn.
Programmatic API
import { render, lookup, renderWord, renderAll, list } from "kana-ascii";
// Single character (by char or single romaji syllable)
const output = render("あ"); // or render("a")
console.log(output); // → formatted string
// Multi-syllable word from romaji or kana
const results = renderWord("aiueo");
// → [{ char: "あ", romaji: "a", output: "...", supported: true }, ...]
results.forEach(r => console.log(r.output));
// Render everything
console.log(renderAll());
// Raw data lookup
const char = lookup("a");
console.log(char?.grid);
console.log(char?.strokes);
console.log(char?.mnemonic);
// List supported characters
const chars = list();
// [{ char: "あ", romaji: "a", type: "hiragana" }, ...]Coverage
v0.1.0: Hiragana vowel row (あいうえお) + Katakana vowel row (アイウエオ).
More characters added weekly. Watch the repo for updates.
Roadmap:
- v0.2.0 — か行 / カ行 (ka row)
- v0.3.0 — Full hiragana + katakana
- v1.0.0 — Common kanji (JLPT N5)
Why ASCII art?
Because your terminal doesn't render brushstroke fonts. And because recognizing a character by its structure — not just its shape — is how stroke memory actually works.
The [1] [2] labels are there so you trace the character correctly, not just recognize it passively.
Pair with
mager/beginner-japanese on Loooom — a conversational Japanese skill for Claude Code.
npx loooom add mager/kana-ascii
npx loooom add mager/beginner-japaneseLicense
MIT
