How rudrodip/gitday works
Main Components
a. CLI Interface (User)
b. Core Application Process (Node/Bun runtime)
• Command Dispatcher
• Git Client Module
• Diff & Commit Fetcher
• Noise Filter
• Prompt Builder
• AI Client (Google Gemini API wrapper)
• Output Handler (Console or File Writer)
• Config Manager (reads/writes ~/.gitday-config.json or env var)
c. External Dependencies
• Local Git executable & repository
• Google Gemini AI service (HTTPS API)
• File system (config file + output files)
Relationships & Data Flow
• User invokes gitday <command> in terminal →
Command Dispatcher routes to the appropriate workflow (today, unpushed, both, config).
• For summary commands:
1. Git Client Module calls git log / git diff to fetch commits & diffs.
2. Diff & Commit Fetcher parses raw data.
3. Noise Filter removes lock-file changes, trivial diffs.
4. Prompt Builder creates a structured prompt (features, refactors, issues).
5. AI Client sends prompt to Google Gemini API, receives generated summary.
6. Output Handler writes summary to prompt.txt (or user-specified file) or prints to console.
• Config commands read/update ~/.gitday-config.json or environment variable.
Architectural Patterns & Principles
• Modular Design: each responsibility (git access, filtering, prompting, AI integration, I/O) lives in its own module.
• Single-Process, Event-Driven CLI: the whole workflow executes sequentially within one Bun/Node process.
• External Service Integration: clear boundary between local (git, file system) and remote (Gemini API).
• Configuration Abstraction: Config Manager hides file vs. env-var storage.
Key Technologies & Frameworks
• Language & Runtime: TypeScript on Bun
• Git: local binary invoked via child process
• AI: Google Gemini API (HTTPS)
• File I/O: Node fs through Bun stdlib
• Config Storage: JSON file in user’s home directory
• Internal modules
• External systems (Git, Google Gemini, File System)