titlecase-cli
v1.0.0
Published
Convert text to title case from the command line
Maintainers
Readme
titlecase-cli
Convert text to title case from the command line. Zero dependencies.
Handles English small words (a, an, the, of, etc.) correctly — always capitalizing the first and last word.
Install
npm install -g titlecase-cliUsage
# Pass text as arguments
titlecase "the quick brown fox jumps over the lazy dog"
# → The Quick Brown Fox Jumps over the Lazy Dog
titlecase "a tale of two cities"
# → A Tale of Two Cities
# Pipe from stdin
echo "hello world" | titlecase
# → Hello World
cat titles.txt | titlecaseOptions
| Flag | Description |
|------|------------|
| -h, --help | Show help |
| -v, --version | Show version |
Small Words
The following words are kept lowercase (unless first or last): a, an, and, as, at, but, by, for, if, in, nor, of, on, or, so, the, to, up, yet, via.
License
MIT © 2026 kszongic
