A context-aware terminal tool that displays philosophical quotes with ASCII art based on your current environment - time of day, weather conditions, and git activity.
- Context-Aware Quote Selection: Uses semantic search with embeddings to match quotes to your current situation
- Beautiful ASCII Art: Hand-curated ASCII art that adapts to terminal width (40/60/80/120 columns)
- Zero API Keys Required: Works immediately with no configuration (uses Open-Meteo weather API)
- Git Activity Analysis: Optional integration that analyzes recent commits to provide relevant wisdom
- Lightning Fast: <500ms startup, <100ms quote display
- 250+ Curated Quotes: High-quality quotes from stoic philosophers, military strategists, and wisdom traditions
# Clone the repository
git clone https://github.com/yourusername/stoic-terminal.git
cd stoic-terminal
# Install with UV (recommended)
uv tool install .
# Or install with pip
pip install -e .# Display context-aware quote
stoic-terminal
# Display random quote
stoic-terminal --random
# Force specific theme
stoic-terminal --theme meditation
# Configure location for weather
stoic-terminal --config-location "Atlanta, GA"
# Run on terminal startup (add to .bashrc or .zshrc)
echo "stoic-terminal" >> ~/.bashrcCurrently following the 7-day implementation plan. See TODOS.md for current progress.
- Day 1: Database setup + 250 quote collection β³
- Day 2: ASCII art curation (30 pieces)
- Day 3: Semantic search with embeddings
- Day 4: Context detection (time/weather/git)
- Day 5: CLI + display rendering
- Day 6: Configuration + error handling
- Day 7: Testing + documentation
- Language: Python 3.10+
- Package Manager: UV
- Database: SQLite (embedded)
- Key Libraries:
sentence-transformers- Semantic search (all-MiniLM-L6-v2 model)requests- Weather API integrationpyfiglet- ASCII text renderingpyyaml- Configuration managementnumpy- Embedding operations
- Tag-based filtering - Narrow down quotes by relevant themes
- Semantic search - Find the most contextually relevant quote using embeddings
- ASCII art selection - Match art to quote theme and terminal width
Time Detection β Weather API β Git Analysis β Tag Extraction β Semantic Search β Display
- β Startup time: <500ms
- β Quote display: <100ms
- β Memory usage: <150MB
StoicTerminal/
βββ CLAUDE.md # Project instructions for Claude Code
βββ README.md # This file
βββ TODOS.md # Current task list
βββ pyproject.toml # UV configuration
βββ secrets_template.json # Template for API keys (none needed!)
βββ .gitignore # Git ignore patterns
β
βββ src/
β βββ stoic_terminal/
β βββ __init__.py
β βββ cli.py # Command-line interface
β βββ database.py # SQLite abstraction
β βββ embeddings.py # Semantic search
β βββ context.py # Context detection
β βββ git_analyzer.py # Git activity analysis
β βββ ascii_art.py # ASCII art loading
β βββ display.py # Display orchestration
β
βββ data/
β βββ quotes_v1.db # Quote database
β βββ git_sessions.db # Git history (user-specific)
β βββ ascii_art/ # Curated ASCII art
β βββ metadata.yaml
β βββ meditation/
β βββ adversity/
β βββ exploration/
β βββ nature/
β βββ wisdom/
β βββ general/
β
βββ tests/
β βββ test_database.py
β βββ test_embeddings.py
β βββ test_context.py
β βββ test_ascii_art.py
β
βββ ClaudeUsage/ # Development workflow guides
βββ README.md
βββ git_workflow.md
βββ secrets_management.md
βββ uv_usage.md
βββ ... (18 comprehensive guides)
- No API keys required for basic functionality
- Optional features can be disabled (weather, git analysis)
- Local-only data - No telemetry or external tracking
- Open source - Full transparency
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=stoic_terminal
# Run specific test file
uv run pytest tests/test_database.py# Collect initial 250 quotes
uv run python day1_starter_code.pyAll quotes are properly attributed and sourced from:
- Quotable API - MIT licensed, public domain quotes
- Project Gutenberg - Classic texts (Marcus Aurelius, Seneca, Sun Tzu, Epictetus)
- Curated Collections - Hand-selected for quality and relevance
- Pre-1930 published works (public domain)
- Proper attribution for all quotes
- Translator credits where applicable
- Copyright status tracked in database
- Hand-curated from asciiart.eu
- asweigart's ASCII Art JSON Database
- Custom creations with proper attribution
Contributions welcome! Please read ClaudeUsage/documentation_standards.md for guidelines.
- Follow the quote schema in
database.py - Include proper attribution (author, source, year, translator)
- Add 3-5 relevant theme tags
- Verify copyright status (prefer public domain)
- Place in appropriate theme directory
- Update
metadata.yaml - Create size variants for different terminal widths
- Include artist attribution if known
Optional configuration file: ~/.config/stoic-terminal/config.toml
[location]
city = "Atlanta, GA"
# or use coordinates
latitude = 33.7490
longitude = -84.3880
[features]
weather_enabled = true
git_analysis_enabled = true
[display]
default_theme = "random" # or: meditation, adversity, exploration, etc.
terminal_width = "auto" # or: 40, 60, 80, 120- User Guide: See stoic-terminal-quick-reference.md
- Implementation Plan: See stoic-terminal-implementation-plan.md
- Development Guides: See ClaudeUsage/README.md
The sentence-transformers model (~90MB) is downloaded on first run. Subsequent runs are instant.
Check terminal encoding: echo $LANG (should be UTF-8). Use --text-only flag if issues persist.
Weather data is cached for 60 minutes. Use --force-refresh to update immediately.
Increase the quote database size or adjust tag diversity. See CONTRIBUTING.md for adding more quotes.
MIT License - See LICENSE for details
- Quotable API - Luke Peavey (quotable.io)
- Open-Meteo - Free weather API with no key required
- sentence-transformers - Hugging Face semantic search library
- Project Gutenberg - Public domain classics
- asweigart - ASCII Art JSON Database
- Complete Day 1 - Run
day1_starter_code.pyto populate the database - Follow Implementation Plan - See stoic-terminal-implementation-plan.md
- Track Progress - Update TODOS.md as you build
- Ship v1.0 - 250 quotes, 30 art pieces, full context awareness
Last updated: 2025-10-20 Status: In Development (Day 1) Target Release: v1.0 (7 days from start)