Skip to content

enderahmetyurt/datoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datoji

Ruby CLI tool: give it a date, it finds what's special about that day — powered by AI with a local fallback DB.

$ ./bin/datoji 2026-04-28
🌸 April 28 — Workers' Memorial Day & Superhero Day!
Honoring workers lost to occupational hazards, and celebrating caped heroes of all kinds.

Install

git clone https://github.com/youruser/datoji
cd datoji
bundle install

Usage

./bin/datoji 2026-04-28          # default: Anthropic
./bin/datoji "April 28, 2026"    # natural language date
./bin/datoji                     # uses today's date

Providers

DATOJI_PROVIDER=openai   ./bin/datoji 2026-04-28
DATOJI_PROVIDER=gemini   ./bin/datoji 2026-04-28
DATOJI_PROVIDER=openrouter ./bin/datoji 2026-04-28

Override model

DATOJI_MODEL=claude-sonnet-4-6 ./bin/datoji 2026-04-28

No API key

Falls back silently to local DB (~30 curated days). No crash.

Configuration

Copy .env.example to .env and fill in your keys:

cp .env.example .env
Variable Description
DATOJI_PROVIDER anthropic | openai | gemini | openrouter (default: anthropic)
DATOJI_MODEL Override model for any provider
ANTHROPIC_API_KEY Anthropic API key
OPENAI_API_KEY OpenAI API key
GEMINI_API_KEY Google Gemini API key
OPENROUTER_API_KEY OpenRouter API key

Provider defaults

Provider Default model
anthropic claude-haiku-4-5-20251001
openai gpt-4o-mini
gemini gemini-2.0-flash
openrouter openai/gpt-4o-mini

Test

ruby -Itest -Ilib -e "Dir['test/test_*.rb'].each { |f| require File.expand_path(f) }"

Architecture

bin/datoji             entry point
lib/datoji/
  version.rb           VERSION constant
  colorizer.rb         ANSI color helpers
  fallback_db.rb       local hash of ~30 notable days (MM-DD keyed)
  llm_service.rb       RubyLLM wrapper, provider switching, fallback logic
  cli.rb               arg parsing + display
test/
  test_fallback_db.rb
  test_llm_service.rb
  test_colorizer.rb
  test_cli.rb

Dependencies

  • ruby_llm ~> 1.14 — multi-provider LLM client
  • minitest — ships with Ruby
  • stdlib only otherwise: date, optparse

About

Ruby CLI that finds emojis what's special about any date Multi-provider AI with offline fallback.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages