stevethorpe.dev How to build your own

Charge Pilot

A Claude-run assistant for my Model Y. Charging, warm-ups and directions, planned from my week.

My week, planned

Claude's plan for my week

Charged by morning

  • MonOffice, leaves 7:30Warms the car first, it's 18°80%
  • TueHome all dayNo drive, light top-up70%
  • WedClient visit, leaves 8:10Warms the car first, it's 22°80%
  • ThuOffice, leaves 7:30Charges extra overnight for Friday80%
  • FriRoad trip to Moab, leaves 6:00Long drive, so a fuller battery95%

When plans change, it texts me

Charge Pilot

Wed 8:42 PM

Your calendar changed, you're headed up north tomorrow. I'll charge to 80% tonight.

Leaving at 6 instead.

Done. 80% by 5:30, the cabin warms up at 5:45, and directions will be on the screen.

Charges for where I'm going

Reads my calendar and charges just enough, finished right before I leave.

Warms up when it's cold

Checks the forecast and preheats the car on cold mornings.

Sends directions ahead

My first stop is already on the screen when I get in.

Message it anytime

It has its own connector in Claude, so I just send a message to change plans.

How it works

  1. Calendar + weather
  2. Claude plans
  3. Rules check
  4. Signed command
  5. Car runs it

Claude proposes, code decides. It can charge, warm up and navigate. It can't unlock or drive.

How to build your own

The setup in eight steps. I'm cleaning up the code to open source it, so for now this is the map.

  1. 01

    Register a Tesla developer app

    Sign up for the Fleet API and ask only for what you need: charging, commands and location.

  2. 02

    Make a key pair

    The public half lives on your app's domain so Tesla can find it. The private half never leaves your password manager.

  3. 03

    Pair it with your car

    Sign in with your Tesla account, then approve the app's virtual key in the Tesla app. You can remove it from the car anytime.

  4. 04

    Sign every command

    Newer Teslas only accept signed commands. Run Tesla's signing proxy next to your app and send everything through it.

  5. 05

    Connect your calendar and the weather

    Read-only Google Calendar access for where you're going, and a forecast for how cold the mornings get.

  6. 06

    Let Claude plan, let code decide

    Claude turns the week into a charge plan. Plain code checks every number and command before anything reaches the car.

  7. 07

    Pick where it runs

    Anywhere that can run on a schedule and host the signing proxy. I use Cloudflare Workers, so it runs while my laptop is off.

  8. 08

    Talk to it

    Add an MCP connector so you can change plans from Claude, and have it text you when your calendar changes.

Download the build guideThe same steps with my safety rules, in one Markdown file

Using Claude? Paste stevethorpe.dev/chargepilot/guide.md into a chat and ask it to walk you through the build. It's the full guide in a format Claude reads cleanly.

I build software for companies and nonprofits.

See more of my work