hadees-cli
v0.1.1
Published
CLI tool for Islamic hadith entries with daily reminders and context-based recommendations
Maintainers
Readme
hadees-cli
Command-line tool that shows a hadith in your terminal and supports local hadith cache sync.
Requirements
- Node.js
>=18 - npm
Installation
# one-off run
npx hadees-cli startup
# global install
npm install -g hadees-cliInstalled binaries:
hadees-clihadees
Usage
# default command (same as "daily")
hadees-cli
# show today's entry
hadees-cli daily
# random entry
hadees-cli random
# search text
hadees-cli search "patience"
# list categories
hadees-cli category --list
# show entries for a category
hadees-cli category --category daily
# show specific entry by id
hadees-cli show morning-1
# favorites
hadees-cli favorites --add morning-1
hadees-cli favorites --list
hadees-cli favorites --remove morning-1
# show startup hadith now
hadees-cli startup
# show one random hadith on demand (without startup hooks)
hadees-cli hadith-now
# scrape full english hadith cache
hadees-cli scrape-hadithMost content commands support:
-j, --jsonfor JSON output-p, --plainfor compact output
Auto-show Hadith On Terminal Open
The npm package does not edit your shell profile automatically. Configure it once in your shell startup file.
Bash (Linux/macOS)
Add to ~/.bashrc:
hadees-cli startup 2>/dev/null || trueReload:
source ~/.bashrcZsh (Linux/macOS)
Add to ~/.zshrc:
hadees-cli startup 2>/dev/null || trueReload:
source ~/.zshrcPowerShell (Windows)
Open profile:
notepad $PROFILEAdd:
hadees-cli startup 2>$nullRestart PowerShell.
Cache and Config
startupandhadith-nowread from local hadith cache.- If cache is missing/stale, it tries to sync from remote source.
- If sync fails (offline/network issue), it falls back to seed hadiths.
Environment variable:
HADEES_CLI_CONFIG_DIR- custom directory for config and hadith cache.
Development
npm install
npm run lint
npm run typecheck
npm test
npm run build
npm run checkPublishing
npm login
npm publish --access publicprepublishOnly runs npm run check, so publish fails if quality checks fail.
License
MIT
