๐Ÿ› ๏ธ Admin & Developer Guide

This page is a technical reference for the site owner. It explains how to package and distribute the command-line tool and provides a reference for its usage and core script.

Distributing the NPM Package

There are two primary ways to make the hownz tool available for installation. The method you choose determines the command users will run.

Option A: Publish to Public NPM Registry

This is the standard method for distributing public packages. It makes your tool discoverable on npmjs.com and installable for anyone.

Steps to Publish:

  1. Login to NPM: If this is your first time, run npm adduser. Otherwise, run npm login.
  2. Publish: Run the command npm run publish:npm from your project directory. This script is an alias for `npm publish --access public`.

User Installation Command:

npm install -g hownz

Option B: Host Package on This Website

This method allows users to install the package directly from your server. It's useful for providing a specific version or when the NPM registry is not an option.

Steps to Host:

  1. Create the Package: Run the command npm pack in your project directory.
  2. Get the File: This creates a file named hownz-2.0.0.tgz.
  3. Upload: Upload this .tgz file to the root directory of your website, making it available at https://hownz.com/hownz-2.0.0.tgz.

User Installation Command:

npm install -g https://hownz.com/hownz-2.0.0.tgz

Using the Command-Line Tool (CLI)

Once installed globally, the hownz command can be used in any terminal. It's highly flexible, allowing you to clean text directly, pipe content from other commands (like echo or curl), or process entire files. By default, it prints to the console, but its behavior can be modified with the flags below.

hownz "text"

Cleans a string → console output.

hownz -a "text"

Cleans a string → random .txt file.

echo "text" | hownz

Cleans piped text → random .txt file.

hownz < in.txt --here

Redirects `in.txt` as input; `--here` forces output to console, ideal for piping to other commands.

hownz -s < article.txt

Summarizes `article.txt` using the Gemini API (`-s`); automatically saves the output to a new file.

hownz -m "text"

Marks unrecognized chars with '#'.

hownz -l "text"

Includes language characters (app.json).

hownz -e "text"

Includes emoji characters (admin.json).

hownz --list

Shows all contraction replacements.

hownz -t

Shows all approved characters.

hownz --lg

Shows language dictionary (app.json).

hownz --ej

Shows emoji dictionary (admin.json).

hownz -v

Shows the current version number.

hownz -h

Displays the detailed help guide.

hownz "text with รฑ and รถ" -lm

Combines language (`-l`) and mark (`-m`) flags to process special characters.

curl -sL ip.im | hownz -s --here

Pipes web content from `curl` to be summarized by the AI and prints the result to the console.

hownz "text with emoji ๐Ÿ˜€"

Removes emojis and other unrecognized characters by default.

cat log.txt | hownz -s -o summary.txt

Pipes a local file to the AI summarizer (`-s`) and saves the output to a specified file (`-o`).

hownz < document.txt

Cleans a file's content and saves it to a new, randomly named .txt file.

hownz "some text" -o result.txt

Cleans a string and saves it to the specified 'result.txt' file.

Core Application Script Reference

Loading script...

Full instructions and tips for cmd (cli) users. Developers

Explore the technical documentation, CLI usage, and distribution guide.

View Admin & Developer Guide

Troubleshooting Installation

Diagnosing `npm error TAR_BAD_ARCHIVE`

This error means the install URL is wrong. It happens when npm gets an HTML error page (like "404 Not Found") instead of the expected .tgz package file.

To fix this, check three things:

  1. Verify URL: Open the installation URL (e.g., https://hownz.com/hownz-2.0.0.tgz) in a browser. It must start a file download, not show a webpage.
  2. Check Filename & Version: The filename must exactly match the version in your package.json. If you update the version, run npm pack and upload the new file.
  3. Confirm Location: The .tgz file must be in the website's root directory to be accessible at the direct URL.