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
Metadata
Release files for tesla-cli 4.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tesla_cli-4.9.0-py3-none-any.whl | Python 3 | none | any | Details for tesla_cli-4.9.0-py3-none-any.whl |
Release files / tesla_cli-4.9.0-py3-none-any.whl
| Download URL | tesla_cli-4.9.0-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51407b0cc35a969f734552929c42e080dc23f516054ce6a8706b2a29e450c918
|
|
BLAKE2b-256 checksum How to use checksums |
c17c12c97a5e6a32b642af9ea45b3b7c110b64eff17f8eb0b7572828fbe3cadf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logSecurity for tesla-cli 4.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for tesla_cli-4.9.0-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.