A command-line interface tool for Norwegian namedays (navnedager). This CLI allows you to search for namedays, check today's nameday, and list all namedays in the database.
- 🔍 Search namedays by month and/or day
- 📅 Today's nameday - quickly check what names are celebrated today
- 📋 List all namedays - view the complete database of Norwegian namedays
- ⚡ Fast execution - built with Bun for optimal performance
- 🗄️ SQLite database - local storage with Norwegian nameday data
- Bun runtime (v1.2.10 or higher)
- Clone the repository:
git clone <repository-url>
cd navnedag-cli- Install dependencies:
bun install- Link the CLI for development:
bun link
bun link navnedag-clibunx navnedag <command> [options]bun run navnedag <command> [options]or if you are a bit lazy
bun navnedag <command> [options]Get today's nameday(s).
bunx navnedag todaybunx navnedag tOutput: Displays the names celebrated today.
Search for namedays by month and/or day.
bunx navnedag search [options]bunx navnedag s [options]Options:
--name, -n <string>- Search for a name.--month, -m <number>- Filter by month (1-12)--day, -d <number>- Filter by day (1-31)
Examples:
# Search for the nameday of a name
bunx navnedag search --name adrian
# Search for namedays in March
bunx navnedag search --month 3
# Search for namedays on March 15th
bunx navnedag s --m 3 --d 15
# Search for today's namedays (default behavior)
bunx navnedag searchList all namedays in the database.
bunx navnedag listbunx navnedag lOutput: Displays all names with their corresponding dates in the format Name (day/month).
navnedag-cli/
├── src/
│ ├── index.ts # CLI entry point
│ ├── command.ts # Command definitions
│ ├── db.ts # Database operations
│ └── init.ts # Initialization logic
├── navnedag.db # SQLite database with nameday data
├── package.json # Project configuration
└── README.md # This file
bun run build- Build the project for distributionbun run dev- Run in development mode with watchbun run publish- Build and publish the package
The CLI uses a local SQLite database (navnedag.db) containing Norwegian nameday data. The database schema:
CREATE TABLE navnedager (
name TEXT PRIMARY KEY,
month INTEGER,
day INTEGER
);