Sorry for late response, just install it using global flag - "npm install -g htpasswd" and after start using it as regular command line client by typing htpasswd in terminal. Usage is similar to Apache2 server utility, if you still need it and have problems, please let me know.
Gevorg.