Look up word definitions right from your terminal.
define <word>
Example:
define prudent
Output:
Prudent <adjective>
1. Careful or wise in handling practical matters; exercising good judgment or common sense.
"a prudent manager of money."
2. Characterized by or resulting from care or wisdom in practical matters.
"a prudent investment."
Pronunciation: /ˈpruːd(ə)nt/
- Node.js v18 or higher
1. Clone the repository and install dependencies:
git clone https://github.com/Anomalous55/define-cli.git
cd define-cli
npm install2. If npm link fails with a permissions error, configure npm to use a local directory:
bash — add to ~/.bashrc:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$HOME/.npm-global/bin:$PATH"Then source ~/.bashrc.
zsh — add to ~/.zshrc:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$HOME/.npm-global/bin:$PATH"Then source ~/.zshrc.
fish:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
set -Ux fish_user_paths $HOME/.npm-global/bin $fish_user_paths3. Link globally:
npm linkNow run define from anywhere:
define serendipity
define ephemeral
define prudentnpm unlink -g define-cliFetches definitions from the free DictionaryAPI — no API key needed. Results are grouped by part of speech, showing up to 4 definitions each with example sentences where available.