CLI tool for Tesla order tracking and vehicle control
Project description
Tesla CLI
Control your Tesla and track your order from the terminal — with a live web dashboard, REST API, MQTT integration, and analytics.
tesla vehicle ready → am I ready to drive?
tesla charge status --oneline → 🔋 72% | ⚡ 11kW | 1h30m to 80%
tesla charge invoices → download Supercharging invoices
tesla scene morning → run morning scene (climate, sentry, etc.)
tesla energy status → Powerwall/Solar backup + storm watch
tesla serve → start REST API + web dashboard
Quick Start
# Requirements: Python 3.12+, uv
git clone https://github.com/dacrypt/tesla.git
cd tesla
uv tool install -e .
tesla setup
tesla setup is an interactive wizard: email + password is all you need. It handles OAuth2 authentication, VIN auto-discovery, optional vehicle control backend selection, and first data build — tiered so basic features work immediately.
Config: ~/.tesla-cli/config.toml | Tokens: system keyring (never plain text)
Optional extras
uv tool install -e ".[teslaMate]" # TeslaMate PostgreSQL integration
uv tool install -e ".[serve]" # REST API server + web dashboard
uv tool install -e ".[fleet]" # Tesla Fleet API direct
uv tool install -e ".[pdf]" # PDF dossier export
Features
Order Tracking
Track your Tesla order with change detection, push notifications, delivery ETA estimation, and a 13-gate delivery journey tracker.
Vehicle Control
Lock/unlock, charging, climate, sentry mode, windows, trunk/frunk, software updates, speed limit, and 50+ more commands. Three backends: Owner API (free), Tessie, Fleet API (with signed-command support for 2024.26+ firmware). Scene commands (tesla scene morning/goodnight/trip) apply multi-step routines in one shot. Quick status with --oneline for tmux/cron. Export state to JSON/CSV.
Charging Intelligence
Unified charging sessions from TeslaMate + Fleet API with cost tracking. Schedule preview, forecast, cost summary, CSV export. Supercharging invoices download (tesla charge invoices). 27 Prometheus gauges for Grafana dashboards.
Energy (Powerwall / Solar)
Monitor Powerwall backup reserve, grid state, solar production, and storm watch mode. Set backup percentage and energy mode without leaving the terminal.
Automation Engine
Event-driven automation with 9 trigger types (geofence, charge %, time, climate, sentry, battery, speed, odometer, custom). Daemon management — start, stop, status, and log tailing in one command group.
Fleet Telemetry
Self-hosted real-time streaming via Tesla's Fleet Telemetry protocol. Docker-managed receiver with automatic config push — low-latency alternative to polling.
Data Sources
15 registered sources with TTL caching: Tesla APIs, VIN decode (140+ option codes), NHTSA recalls, RUNT (Colombia), SIMIT, ship tracking. Historical snapshots with diff comparison and HTML/PDF export. Drive path export to GPX/GeoJSON from TeslaMate.
Portal Documents
Download MVPA, purchase invoices, and other Tesla portal documents directly: tesla portal documents.
TeslaMate Analytics
Trip history, charging sessions, cost reports, drive heatmaps, vampire drain analysis, and more — from your TeslaMate PostgreSQL database. Includes managed Docker stack (one-command install).
REST API + Web Dashboard
FastAPI server with 45+ endpoints: vehicle, charge, climate, security, notifications, dossier, TeslaMate. SSE live stream, Prometheus metrics (27 gauges), mobile-friendly React dashboard with Leaflet live map (dark tiles) and Recharts analytics visualizations.
Integrations
MQTT + Home Assistant auto-discovery (15 sensors), ABRP live telemetry, BLE local control, geofencing with alerts, Apprise notifications (100+ services), Apple Shortcuts via web+tesla:// URL scheme. Config doctor validates all connections.
Claude Code Plugin
Talk to your Tesla in natural language via Claude Code. The plugin lives in plugins/claude-code/ — eleven skills covering status, control, charging, order tracking, dossier, analytics, automations, telemetry, and the web dashboard. See the plugin README for setup.
Project Structure
tesla/
├── src/tesla_cli/ # Python CLI + FastAPI backend
│ ├── core/ # Business logic (backends, models, providers)
│ ├── cli/ # Typer CLI (14 command groups, 175+ commands)
│ ├── api/ # FastAPI REST API (45+ endpoints, SSE, Prometheus)
│ └── infra/ # Docker Compose lifecycle
├── ui/ # React 19 + Ionic web dashboard
├── plugins/
│ └── claude-code/ # Claude Code plugin (11 skills)
├── tests/ # pytest suite (1527 tests)
├── docs/ # Architecture, API ref, user guide, roadmap
└── docker/ # TeslaMate stack configs
Documentation
| Document | Description |
|---|---|
| User Guide | Complete command reference (13 command groups) |
| Architecture | System design, provider layers, data flow, design decisions |
| Configuration | Config keys, auth, tokens, environment variables |
| API Reference | REST endpoints, SSE stream, Prometheus metrics, web dashboard |
| Data Sources | Tesla API catalog, third-party services, registered sources |
| Roadmap | Upcoming features and remaining gaps |
| Competitive Analysis | 20-tool ecosystem deep dive |
| Changelog | Version history (v0.1.0 → v4.0.0) |
| Contributing | Development setup, testing, pull requests |
Docker
Quick Start
docker compose up -d
Dashboard at http://localhost:8080.
Full Stack (with TeslaMate + Grafana)
docker compose -f docker-compose.full.yml up -d
- Dashboard:
http://localhost:8080 - TeslaMate:
http://localhost:4000 - Grafana:
http://localhost:3000
Development
uv sync --extra dev --extra serve --extra teslaMate --extra fleet --extra pdf
uv run pytest -m "not integration" # unit tests (1527 tests)
uv run ruff check src/ tests/ # lint
See CONTRIBUTING.md for full development workflow.
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tesla_cli-4.8.1.tar.gz.
File metadata
- Download URL: tesla_cli-4.8.1.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d90191741cc052e8b50d80e5d97e83037b40bec53baec55f581ac3369bf04d5e
|
|
| MD5 |
07fa18854a2256da5a23426299a4efae
|
|
| BLAKE2b-256 |
b8aed12b8213294c80658a23c87e359007681744450803af96afc2f75f5e3945
|
Provenance
The following attestation bundles were made for tesla_cli-4.8.1.tar.gz:
Publisher:
publish.yml on dacrypt/tesla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tesla_cli-4.8.1.tar.gz -
Subject digest:
d90191741cc052e8b50d80e5d97e83037b40bec53baec55f581ac3369bf04d5e - Sigstore transparency entry: 1242264339
- Sigstore integration time:
-
Permalink:
dacrypt/tesla@4b5c3632a54f3102018fd337ff2a12102bbbbc33 -
Branch / Tag:
refs/tags/v4.8.1 - Owner: https://github.com/dacrypt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b5c3632a54f3102018fd337ff2a12102bbbbc33 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tesla_cli-4.8.1-py3-none-any.whl.
File metadata
- Download URL: tesla_cli-4.8.1-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b69f2c99a362b9be0cb09a851f213fd186a41774d2f9228824b46c9714a660f2
|
|
| MD5 |
742a7b79c492a6a651b4c90410c756ac
|
|
| BLAKE2b-256 |
8678d084d96e7dd2abda42bc2ce7c17a2bbf3a43f53d655d4575bc044a3c9fc9
|
Provenance
The following attestation bundles were made for tesla_cli-4.8.1-py3-none-any.whl:
Publisher:
publish.yml on dacrypt/tesla
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tesla_cli-4.8.1-py3-none-any.whl -
Subject digest:
b69f2c99a362b9be0cb09a851f213fd186a41774d2f9228824b46c9714a660f2 - Sigstore transparency entry: 1242264408
- Sigstore integration time:
-
Permalink:
dacrypt/tesla@4b5c3632a54f3102018fd337ff2a12102bbbbc33 -
Branch / Tag:
refs/tags/v4.8.1 - Owner: https://github.com/dacrypt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b5c3632a54f3102018fd337ff2a12102bbbbc33 -
Trigger Event:
push
-
Statement type: