birthdays
birthdays is a robust Python command-line tool designed to conveniently manage, track, and celebrate your contacts' birthdays.
Features
- Customizable Sorting: List birthdays exactly how you want to see them (by upcoming, recent, age, name, or date)
- CRUD Operations: Easily
add,edit, anddeleteentries. The deletion and edit commands feature a convenient fuzzy search so you don't have to type out exact names - Smart Imports: Import contacts directly from
.vcfvCard files or JSON databases - Interactive Merging: During imports, the CLI intelligently detects duplicates or data collisions and prompts you to safely merge them
- Leapling Support: Configure how leap year birthdays (February 29th) are handled in non-leap years, choosing to celebrate either the day before or the day after
- Festive UI: Every date is assigned a unique, deterministic emoji to keep the terminal vibe bright and colorful (can be disabled via a global flag or environment variables)
- Shell MOTD: Automatically display a summary of upcoming birthdays when opening a new terminal session, complete with safe, automated hooks for
.bashrc,.zshrc,config.fish, andPowerShellprofiles.
Requirements
- Python 3.11+
Installation
Install the package from PyPI using your favorite package management tool such as pip, pipx, or uv:
pip install birthdays-cli
Or install the latest version from source:
git clone https://github.com/l1asis/birthdays.git
cd birthdays
pip install .
Usage
birthdays uses simple subcommands to organize different operations. You can append --help to any command to see its available arguments.
Listing Birthdays
[!NOTE] By default, this sorts by upcoming birthdays in descending order so the most immediate celebrations are right at your cursor.
# Basic list
birthdays list
# List sorted by age in ascending order
birthdays list --sort age --order asc
# Temporarily read and display birthdays directly from a file without modifying your local database
birthdays list --file ./contacts.vcf
Adding an Entry
[!NOTE] The date can be formatted as
YYYY-MM-DD, or simplyMM-DDif the year is unknown.
birthdays add "John Doe" 1990-05-14 --note "Loves chocolate cake"
Editing an Entry
[!NOTE] You can use either the name or UUID. You only need to pass the flags for the specific data you want to change.
birthdays edit "John Doe" --date 1991-05-14
Deleting an Entry
[!TIP] The CLI uses fuzzy matching, so typing a partial name usually works! Append
-yto skip the confirmation prompt.
birthdays delete "John Doe"
Importing Contacts
[!TIP] The interactive prompt will guide you through any data collisions. Append
-yto automatically skip these prompts and blindly merge safe entries.
birthdays import ./contacts.vcf
Shell MOTD (Message of the Day)
[!TIP] You can automatically display a minimal summary of upcoming birthdays every time you open a new terminal session.
Display the MOTD manually:
birthdays motd
Enable the startup hook:
birthdays motd enable --days 14 --limit 5 --quiet-if-empty --once-per-day
This automatically detects your shell and injects an easily removable sentinel block. Running this command again with new flags will update the existing block in-place. The --once-per-day flag ensures the summary is only printed the first time you open a terminal each day, preventing terminal spam.
[!NOTE] You can pass a
--rc-fileflag if you use a custom shell config.
Disable the startup hook:
birthdays motd disable
This safely removes the MOTD sentinel block from your shell configuration without affecting surrounding custom code.
Configurations
Emojis
You can disable emojis globally across all subcommands by placing the --no-emoji flag before the subcommand (e.g., birthdays --no-emoji list).
For a more permanent solution, birthdays respects the following environment variables:
BIRTHDAYS_NO_EMOJI=1(ortrue,yes)NO_EMOJI=1(the widely adopted community convention)
[!NOTE] The method for setting environment variables depends on your operating system and terminal. Please search online for instructions specific to your OS.
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/amazing-feature) - Commit your Changes (
git commit -m 'feat: ✨ add some amazing-feature') - Push to the Branch (
git push origin feat/amazing-feature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file birthdays_cli-0.4.0.tar.gz.
File metadata
- Download URL: birthdays_cli-0.4.0.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b38edfca96d97179e180f2937de22e448438eaccdde136920e2d061b01d182c
|
|
| MD5 |
659740b06dbe6ef019010ba6dbbc2851
|
|
| BLAKE2b-256 |
7d8696d1b4a0e747ec8e0528c5c007912dfd8406b15606ab21762febf3b4f883
|
Provenance
The following attestation bundles were made for birthdays_cli-0.4.0.tar.gz:
Publisher:
ci-cd.yml on l1asis/birthdays
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
birthdays_cli-0.4.0.tar.gz -
Subject digest:
7b38edfca96d97179e180f2937de22e448438eaccdde136920e2d061b01d182c - Sigstore transparency entry: 2275552806
- Sigstore integration time:
-
Permalink:
l1asis/birthdays@a2515671a319434462cc8d0c2a3ba7a8d92e9e9f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/l1asis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@a2515671a319434462cc8d0c2a3ba7a8d92e9e9f -
Trigger Event:
push
-
Statement type:
File details
Details for the file birthdays_cli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: birthdays_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f78be62a867a3db274c3dd8e09bd5fb18d28c63d6a3a78ed8b76d1e1242c01e
|
|
| MD5 |
b39f365cc9e6fa4ad9a9b721e177da19
|
|
| BLAKE2b-256 |
ca558f6b97ba028f2465f93b139a2c498ead44afcab3b083a2a578d95c8fa359
|
Provenance
The following attestation bundles were made for birthdays_cli-0.4.0-py3-none-any.whl:
Publisher:
ci-cd.yml on l1asis/birthdays
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
birthdays_cli-0.4.0-py3-none-any.whl -
Subject digest:
6f78be62a867a3db274c3dd8e09bd5fb18d28c63d6a3a78ed8b76d1e1242c01e - Sigstore transparency entry: 2275553030
- Sigstore integration time:
-
Permalink:
l1asis/birthdays@a2515671a319434462cc8d0c2a3ba7a8d92e9e9f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/l1asis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@a2515671a319434462cc8d0c2a3ba7a8d92e9e9f -
Trigger Event:
push
-
Statement type: