Writegeez
Web based Input Method Editor(IME) for Geez alphabets
Install / Use
/learn @ibra-sk/WritegeezREADME
@writegeez/ime
A modern Web Input Method Editor (IME) for typing Geʽez-script languages such as Tigrinya, Amharic, and Tigre — built for the web, open source, and written in TypeScript.
✨ Features
- 🪶 Lightweight – pure TypeScript, no framework dependencies.
- ⚙️ Works anywhere – supports
<input>,<textarea>, andcontenteditableelements. - 🧠 Smart transliteration – converts Latin input to Geʽez script in real time.
- 💻 Framework-agnostic – works with vanilla JS, React, Vue, or any frontend stack.
- 🧩 Extensible design – customize mappings, or build your own input method spec.
- 💬 TypeScript ready – full typings and autocomplete out of the box.
🚀 Installation
npm install @writegeez/ime
# or
yarn add @writegeez/ime
🧰 Basic Usage (Vanilla JS / TS)
import { WriteGeezIME } from "@writegeez/ime";
// Define a minimal input map for demo
const inputMap = {
h: { value: "ህ", next: { a: { value: "ሀ" } } },
b: { value: "ብ" },
};
const inputSpec = { map: inputMap };
const textarea = document.querySelector("textarea");
// Attach IME
const ime = new WriteGeezIME(inputSpec, textarea!, { enabled: true });
// Optional: toggle
ime.disable();
ime.enable();
Try typing “h” → “a” — it should become ሀ.
⚛️ React Example
Here’s a minimal React component demo (like the one in examples/basic):
import React, { useEffect, useRef, useMemo } from "react";
import { WriteGeezIME } from "@writegeez/ime";
export function App() {
const textareaRef = useRef<HTMLTextAreaElement>(null);
const spec = useMemo(
() => ({
map: {
h: { value: "ህ", next: { a: { value: "ሀ" } } },
b: { value: "ብ" },
},
}),
[]
);
useEffect(() => {
if (!textareaRef.current) return;
new WriteGeezIME(spec, textareaRef.current, { enabled: true });
}, [spec]);
return (
<div style={{ padding: 16 }}>
<h1>@writegeez/ime demo</h1>
<textarea ref={textareaRef} placeholder="Type 'h' then 'a' → ሀ" rows={4} />
</div>
);
}
📘 API Reference
class WriteGeezIME
constructor
new WriteGeezIME(
spec: InputMethodSpec,
element: HTMLElement,
options?: { enabled?: boolean }
)
spec— defines your transliteration mapping tree.element—<input>,<textarea>, or contenteditable element to attach to.options.enabled— whether to start active.
Methods
| Method | Description |
|--------|--------------|
| enable() | Enables the IME |
| disable() | Disables the IME |
| setEnabled(flag: boolean) | Enables or disables based on a boolean |
| isEnabled(): boolean | Returns whether the IME is active |
| processInput(prevChar: string, newChar: string) | Returns { output, modifiesPrev } — used for testing or custom logic |
🧩 Extending the Input Map
Define your own transliteration rules easily:
const inputMap = {
s: { value: "ስ", next: { a: { value: "ሳ" }, e: { value: "ሴ" } } },
};
new WriteGeezIME({ map: inputMap }, element);
🧪 Development
Clone the repo and run locally:
git clone https://github.com/ibra-sk/writegeez.git
cd writegeez
npm i
npm run dev -w @writegeez/ime
npm run dev -w writegeez-example-basic
This will watch-build the IME and open the live example app.
📦 Monorepo Structure
| Package | Description | Status |
|----------|--------------|--------|
| @writegeez/ime | Core Input Method Engine | ✅ Published |
| @writegeez/webui | (Planned) Web UI toolkit | 🚧 Coming soon |
| @writegeez/sentiment | (Planned) Sentiment analysis module | 🚧 Coming soon |
🔗 Links
- NPM → https://www.npmjs.com/package/@writegeez/ime
- GitHub → https://github.com/ibra-sk/writegeez
📄 License
MIT © 2025 Ibrahim Kekia
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
