scent-cli
v1.2.2
Published
CLI tool to look up fragrance profiles from Fragrantica
Maintainers
Readme
scent brings the world of fragrances to your terminal. Search any perfume by name and get instant access to its main accords, fragrance pyramid, ratings, and more — all beautifully formatted with color.
✨ Features
- 🔍 Fuzzy Search — Smart auto-selection for strong matches, interactive picker when unsure
- 📊 Main Accords — Color-coded intensity bars for every accord
- 🧪 Fragrance Pyramid — Top, middle, and base notes in a clear visual hierarchy
- ⭐ Ratings & Votes — Star ratings, vote counts, and gender classification
- 🔗 Similar Perfumes — Shows "People who like this also like" and "This perfume reminds me of" recommendations
- 📝 Descriptions — Clean, concise descriptions (auto-skipped ads and disclaimers)
- ⏳ Caching — Results cached for 24 hours so you never wait twice
- 🎨 Beautiful Output — Colorful terminal output with chalk
📦 Install
npm install -g scent-cliOr run directly without installing:
npx scent-cli "Creed Aventus"🚀 Usage
scent-cli <name> [options]| Option | Description |
|--------|-------------|
| -V, --version | Show version number |
| -p, --pick | Always show the picker instead of auto-selecting |
| -h, --help | Display help |
Examples
# Auto-select the best match
scent-cli "Creed Aventus"
# Force the interactive picker
scent-cli "Bleu de Chanel" --pick
# Quick lookup
scent-cli "Sauvage"🎯 How It Works
- Search — Opens Fragrantica in a headless browser and scrapes results
- Select — Picks the best match automatically, or lets you choose from a list
- Scrape & Stream — Pulls profile data progressively — accords, notes, and description appear instantly, then similar perfumes load as the page scrolls
- Display — Shows everything with beautiful colored terminal output
🧰 Tech Stack
| Package | Role | |---------|------| | Commander | CLI argument parsing | | Playwright | Headless browser for scraping | | Chalk | Terminal colors | | Fuse.js | Fuzzy string matching | | Ora | Loading spinners | | Cheerio | HTML parsing | | TypeScript | Type safety |
📁 Project Structure
src/
├── index.ts # CLI entry point & orchestration
├── types.ts # TypeScript interfaces
├── search.ts # Search & caching logic
├── scraper.ts # Perfume page scraping
└── display.ts # Terminal output formatting📄 License
MIT © Hasin Hayder
