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

cc-vietnamese

v1.0.0

Published

Fix Vietnamese input in Claude Code CLI

Readme

cc-vietnamese

Fix Vietnamese input in Claude Code CLI.

Vietnamese Input Method Editors (IMEs) like Unikey, OpenKey, EVKey, and macOS default Vietnamese input send backspace characters followed by Unicode text when composing diacritics. The Claude Code CLI processes the deletion but fails to insert the remaining characters, causing input loss.

This tool patches the CLI to handle Vietnamese input correctly.

Quick Start

# 1. Install the tool
npm install -g cc-vietnamese

sudo npm install -g @anthropic-ai/claude-code@latest

# 3. Apply the Vietnamese fix
sudo cc-vietnamese install

# 4. Add alias to your shell (auto-detects zsh/bash)
cc-vietnamese alias

# 5. Reload shell config
source ~/.zshrc

Or in one line:

sudo npm i -g cc-vietnamese @anthropic-ai/claude-code@latest && sudo cc-vietnamese install && cc-vietnamese alias && source ~/.zshrc

Important: Binary vs NPM Version

Claude Code has two installation types:

| Type | Path | Can be patched? | | -------------------- | ---------------------------- | --------------- | | Native Binary | ~/.local/bin/claude | No | | NPM (JavaScript) | /usr/local/node/bin/claude | Yes |

This tool only patches the NPM version. If you're using the binary version (default on macOS), you need to:

  1. Install/update the npm version
  2. Apply the patch
  3. Use the npm version instead

Check which version you're using:

cc-vietnamese status

Installation

npm install -g cc-vietnamese

Commands

| Command | Description | | ------------------------------ | ------------------------------------------------- | | sudo cc-vietnamese install | Apply Vietnamese IME fix (creates backup) | | sudo cc-vietnamese uninstall | Restore original Claude Code from backup | | cc-vietnamese alias | Add alias to shell config (~/.zshrc or ~/.bashrc) | | cc-vietnamese status | Show patch status and installation info | | cc-vietnamese setup | Show manual setup instructions |

Using the Patched Version

After patching, you need to use the npm version of Claude Code.

Recommended: Use the alias command

cc-vietnamese alias
source ~/.zshrc

This automatically adds the alias to your shell config.

Alternative: Manual setup

Direct path:

/usr/local/node/bin/claude

Manual alias (add to ~/.zshrc):

alias claude="/usr/local/node/bin/claude"

PATH priority (add to ~/.zshrc):

export PATH="/usr/local/node/bin:$PATH"

How it works

Vietnamese IMEs send input like this when typing "việt":

v → i → e [DEL] ê → t [DEL] ệ → t

The original code only handles the DEL character and returns early, losing the replacement text. The fix processes each character individually:

// For each character in input:
// - If DEL (127) or BS (8): backspace
// - Otherwise: insert the character

Troubleshooting

Vietnamese still not working

  1. Make sure you're using the npm version, not the binary:

    cc-vietnamese status
    which claude
  2. Update npm version to latest:

    sudo npm install -g @anthropic-ai/claude-code@latest
    sudo cc-vietnamese install
  3. Restart Claude Code completely

Permission denied

sudo cc-vietnamese install

Pattern not found

The Claude Code version may have changed. Check compatibility:

cc-vietnamese status

Supported IME methods

  • Telex: Most popular method (e.g., "vieejt" → "việt")
  • VNI: Number-based method (e.g., "vie6t" → "việt")
  • VIQR: ASCII-based method

Supported IME software

  • macOS Vietnamese Input
  • OpenKey
  • EVKey
  • Unikey (Windows, with Wine on macOS)

Credits

Inspired by claude-code-vime by @trancong12102.

License

MIT