Status: Spec Complete | Implementation In Progress
Last Reviewed: 2025-12-30
- Python 3.11+
uv(modern Python package manager)
# Clone the repository (already done)
cd personal-todo
# Install uv if not already installed
pip install uv
# Install dependencies (PR-001: Database & Configuration)
# This installs all development dependencies including FastAPI (needed for backend and tests)
# Uses 'uv sync' if uv.lock exists, otherwise 'uv pip install'
make dev
# Or manually (if uv.lock exists):
# uv sync --extra dev
# Or manually (if no uv.lock):
# uv venv && uv pip install --python .venv/bin/python -e ".[dev]"
# Note: After modifying pyproject.toml dependencies, update the lock file:
# uv lock
# To install all available optional dependencies:
# make install-all
# Copy environment file
cp .env.example .env
# Edit .env with your configuration
nano .env
# Or use any editorThe CLI is tgenie.
# Start the backend API server
uv run python -m backend.main
# Health check (in another terminal)
curl http://127.0.0.1:8080/health
# Run CLI commands (scaffolded; backend integration in progress)
uv run tgenie --help
uv run tgenie add "My first task"
uv run tgenie list# Install development dependencies (core + dev tools)
make dev
# Run linting
make lint
# Format code
make format
# Type checking
make typecheck
# Run tests
make test
# Run all checks
make checkTaskGenie supports multiple configuration sources with the following precedence (highest to lowest):
- Environment variables (highest priority)
.envfile (development convenience)~/.taskgenie/config.toml(user configuration file)- Built-in defaults (lowest priority)
Set environment variables directly:
export APP_NAME=TaskGenie
export DATABASE_URL=sqlite+aiosqlite:///./data/taskgenie.db
export LLM_API_KEY=your-key-hereCreate a .env file in the project root:
APP_NAME=TaskGenie
APP_VERSION=0.1.0
DEBUG=true
HOST=127.0.0.1
PORT=8080
DATABASE_URL=sqlite+aiosqlite:///./data/taskgenie.db
# LLM Configuration
LLM_PROVIDER=openrouter
LLM_API_KEY=your-openrouter-api-key-here
LLM_MODEL=anthropic/claude-3-haiku
# Gmail (optional)
GMAIL_ENABLED=false
GMAIL_CREDENTIALS_PATH=
# GitHub (optional)
GITHUB_TOKEN=
GITHUB_USERNAME=
# Notifications
NOTIFICATIONS_ENABLED=true
NOTIFICATION_SCHEDULE=["24h","6h"]For persistent user configuration, create ~/.taskgenie/config.toml:
app_name = "TaskGenie"
app_version = "0.1.0"
debug = false
host = "127.0.0.1"
port = 8080
[database]
url = "sqlite+aiosqlite:///./data/taskgenie.db"
[llm]
provider = "openrouter"
api_key = "your-openrouter-api-key-here"
model = "anthropic/claude-3-haiku"
[gmail]
enabled = false
credentials_path = ""
[github]
token = ""
username = ""
[notifications]
enabled = true
schedule = ["24h", "6h"]Note: You can override the config file location using the TASKGENIE_CONFIG_FILE environment variable.
By default, TaskGenie stores data in ~/.taskgenie/:
~/.taskgenie/
├── config.toml # User configuration (optional)
├── data/
│ ├── taskgenie.db # SQLite database
│ └── chroma/ # ChromaDB vector store
├── logs/ # Application logs
└── cache/
└── attachments/ # Cached attachment content
Override the data directory using TASKGENIE_DATA_DIR environment variable.
personal-todo/
├── .env # Configuration (copy from .env.example)
├── .gitignore
├── pyproject.toml # Dependencies and tooling config
├── README.md
├── backend/
│ ├── __init__.py
│ ├── main.py # FastAPI application entry point
│ ├── config.py # Settings management
│ ├── database.py # Database connection and setup
│ ├── models/ # SQLAlchemy models
│ ├── schemas/ # Pydantic schemas
│ ├── services/ # Business logic
│ └── cli/ # CLI commands
└── data/ # SQLite database and ChromaDB vector store
On first run, the database will be created automatically. To manually initialize or upgrade:
# Upgrade database to latest migration
uv run tgenie db upgrade
# Upgrade to latest migration
uv run tgenie db upgrade
# Upgrade to specific revision
uv run tgenie db upgrade --rev <revision>
# Downgrade by one step
uv run tgenie db downgrade --rev -1
# Create a new migration
uv run tgenie db revision -m "Add new field" --autogenerate
# Dump database to SQL file
uv run tgenie db dump --out backup.sql
# Restore database from SQL file (WARNING: overwrites existing)
uv run tgenie db restore --in backup.sql
# Reset database (WARNING: deletes all data)
uv run tgenie db reset --yesSee docs/02-implementation/MIGRATIONS.md for detailed migration guide.
- ✅ Install dependencies:
uv pip install -e . - ✅ Configure environment: Edit
.envfile or create~/.taskgenie/config.toml - ✅ Initialize database:
uv run tgenie db upgrade - ✅ Start backend:
uv run python -m backend.main - ✅ Test CLI:
uv run tgenie list - ✅ Check health:
curl http://127.0.0.1:8080/health