A Python script that syncs time tracking data from Rize to Exist.io.
- Reads time tracking metrics from Rize's GraphQL API
- Writes them as custom attributes to Exist.io
- Runs automatically on a schedule (6am-9pm, hourly)
| Exist Attribute | Source | Type | Description |
|---|---|---|---|
focus_time |
Categories (focus=true) | Duration | Time in focus categories |
tracked_time |
Categories (all) | Duration | Total tracked activity |
break_time |
Categories (focus=false) | Duration | Time in non-focus categories |
meeting_time |
Meeting sessions | Duration | Time in meetings |
coding_time |
Category "code" | Duration | Time spent coding |
design_time |
Category "design" | Duration | Time spent designing |
focus_sessions |
Sessions (started only) | Integer | Completed focus blocks |
Every sync automatically includes yesterday's data. This ensures late-night work gets captured even if you work past the last scheduled sync (9pm).
- macOS (for launchd scheduling) or Linux (use cron instead)
- Python 3.8+
- A Rize account with API key
- An Exist.io account with OAuth2 app credentials
cd exist-rize-integration
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCopy the example environment file and fill in your credentials:
cp .env.example .envEdit .env with your values:
RIZE_API_KEY=your_rize_api_key
EXIST_CLIENT_ID=your_exist_client_id
EXIST_CLIENT_SECRET=your_exist_client_secret
EXIST_ACCESS_TOKEN=your_exist_access_token
EXIST_REFRESH_TOKEN=your_exist_refresh_token
Getting credentials:
- Rize API Key: Rize app → Settings → API
- Exist OAuth2: exist.io/account/apps → Create new app
- Set OAuth2 client type to "Confidential"
- Set Redirect URI to
http://localhost:8080/callback - After creating, generate a developer token for yourself
source .venv/bin/activate
python3 sync.py --setupThis creates the custom attributes in your Exist account and acquires ownership.
python3 sync.pyYou should see output like:
=== Backfilling yesterday ===
Syncing data for 2026-01-07...
Fetching from Rize...
Rize data:
focus=143min, tracked=171min
break=28min, meeting=23min
coding=68min, design=0min
focus_sessions=3
Updating Exist...
Done: 7 updated, 0 failed
=== Syncing today ===
Syncing data for 2026-01-08...
...
./install.shThis installs a launchd service that runs the sync hourly from 6am-9pm.
# Activate the virtual environment first
source .venv/bin/activate
# Sync today + yesterday (default, catches late-night work)
python3 sync.py
# Sync only today (skip yesterday backfill)
python3 sync.py --no-backfill
# Sync a specific date only
python3 sync.py --date 2026-01-06
# Re-run setup (if attributes were deleted)
python3 sync.py --setup
# Migrate from old attribute names (one-time, if upgrading)
python3 sync.py --migrate# Check if scheduler is running
launchctl list | grep rize
# View sync logs
tail -f sync.log
# Uninstall scheduler
./uninstall.sh
# Reinstall after changing schedule
./install.shexist-rize-integration/
├── .env # Your API credentials (gitignored)
├── .env.example # Template for credentials
├── .gitignore
├── requirements.txt # Python dependencies
├── rize_client.py # Rize GraphQL API client
├── exist_client.py # Exist REST API client
├── sync.py # Main sync script
├── io.exist.rize-sync.plist # macOS launchd config
├── install.sh # Install scheduler
├── uninstall.sh # Remove scheduler
└── sync.log # Sync output log (created on first run)
- Endpoint:
https://api.rize.io/api/v1/graphql - Auth: Bearer token (API key)
- Queries used:
categories- actual tracked time per category (with focus flags)sessions- focus/break/meeting session counts (filtered to started only)
- Endpoint:
https://exist.io/api/2/ - Auth: OAuth2 Bearer token
- Endpoints used:
POST /attributes/create/- Create custom attributesPOST /attributes/acquire/- Take ownership of attributesPOST /attributes/update/- Write daily values
The Exist access token expires after 1 year. The script automatically refreshes it using the refresh token and updates .env with the new tokens.
Use python3 instead of python:
python3 sync.pyOr activate the virtual environment first:
source .venv/bin/activate
python sync.pyRun setup first:
python3 sync.py --setupCheck if it's loaded:
launchctl list | grep rizeIf not listed, reinstall:
./install.sh- Ensure Rize desktop app is running and tracking
- Check that your API key is valid
- Rize only returns data for dates with tracked activity
MIT