Skip to content

quicklywilliam/evcopilot

Repository files navigation

EV Daddy

Voice-powered EV charging assistant for iOS and CarPlay using Gemini Live API.

Setup

API Keys

This project requires API keys for:

Once you have those, create a .env file in the project directory with the keys: export GEMINI_API_KEY="YOUR_KEY_HERE" export NREL_API_KEY="YOUR_KEY_HERE"

A build script generates APIKeys.swift from your environment variables at build time. These keys will be sanitized from your local copy of APIKeys.swift out after the build, and both it and .env are in .gitignore. Still, be careful not to commit these files!

Build and Run

Once you've done that you can simply open EV Daddy.xcodeproj in Xcode and build.

Features

  • Voice interaction with Gemini Live API
  • Real-time audio streaming
  • CarPlay support
  • EV charger search using NREL database
  • Location-aware recommendations
  • Save car model and connector type

Demo Mode

Demo mode allows you to record and replay app interactions without requiring API keys or network access. Useful for App Store review videos, trade show demos, and testing.

Recording a Demo

  1. In Xcode, edit the scheme: Product → Scheme → Edit Scheme
  2. Under Run → Arguments → Environment Variables, add DEMO_RECORD = 1
  3. Run the app and go through the flow you want to capture
  4. When finished, save the recording:
    • From the debug menu, tap "Save Demo Script" (saves to temp directory)
    • Or tap "Copy Demo Script" to copy JSON to clipboard
  5. Add the resulting demo-script.json file to the Xcode project bundle

Playing a Demo

  1. Ensure demo-script.json is included in the app bundle
  2. In Xcode, edit the scheme and add environment variable DEMO_PLAY = 1
  3. Run the app
  4. Tap the PTT button to advance through each recorded step

Demo Script Format

The recorded script is a JSON file with this structure:

{
  "version": 1,
  "recorded_at": "2026-01-16T14:32:00Z",
  "actions": [
    {
      "type": "tool_call",
      "duration": 0.5,
      "function_calls": [{ "id": "...", "name": "save_car_model", "args": {...} }]
    },
    {
      "type": "speaking",
      "duration": 3.0
    },
    {
      "type": "turn_complete",
      "duration": 0.2
    }
  ]
}

Action types:

  • tool_call: replays a Gemini tool call after waiting duration seconds
  • speaking: shows speaking state for duration seconds (simulates AI audio response)
  • turn_complete: marks where PTT release pauses until next press

The duration field specifies seconds to wait before/during the action (capped at 5s during playback).

About

EV CoPilot is an iPhone and CarPlay app for road trips that helps you find the right charger while you remain focused on the road

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors