Skip to content
CAI
Software that uses CAICheck a score

timdorr/tesla-api

59.7

Adequate · 6 November 2026

503

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Ruby gem that serves as a client wrapper for the Tesla JSON API, enabling interaction with Tesla vehicles. It provides capabilities for vehicle state monitoring, command execution, and real-time telematics streaming via asynchronous WebSocket connections. The implementation utilizes modern authentication flows, including SSO with PKCE, and is supported by a comprehensive test suite using recorded API interactions.

Behavioural changes

Repository restructuring and initial commit of documentation and tooling

The repository has been restructured with an initial commit that establishes the project's foundational files. This includes a new README detailing the Tesla JSON API and Ruby gem usage, a .gitbook.yml configuration for documentation hosting, and a .gitignore file tailored for Ruby development environments. Tooling configurations have been added, including .prettierrc for code formatting, .standard.yml for Ruby linting, .rspec for test runner settings, and .tool-versions specifying Ruby 3.2.2. The commit also introduces the MIT LICENSE, a Rakefile for running specs and an interactive console, and data files such as apiary.apib (noting a migration to a new documentation site) and ownerapi\_endpoints.json containing API endpoint definitions. Additionally, a vault.proto file defining protobuf structures for vault-related data has been added.

(repo-wide) · high confidence

Tesla API client upgraded to v3.1.0 with SSO authentication and async streaming

The \lib/tesla\_api\ gem has been updated to version 3.1.0, introducing a new authentication flow that uses Tesla's Single Sign-On (SSO) with PKCE and enforces TLS 1.2 for login requests. The HTTP client has switched from HTTParty to Faraday, and the library now supports asynchronous WebSocket connections for real-time vehicle data streaming and autopark features via the \async\ gem. Existing vehicle control commands remain available, but the underlying connection and authentication mechanisms have changed to support these new capabilities.

_lib/tesla\api · high confidence

Test coverage

Added test coverage for Tesla API client authentication and vehicle control; Initial test infrastructure setup.

Dependencies

Initial release of tesla\_api gem

The tesla\_api gem is introduced as a wrapper for the Tesla JSON API, enabling users to check vehicle state, issue commands, and stream telematics data. The package declares runtime dependencies on async-websocket, faraday, and faraday\_middleware, while establishing a development environment with bundler 2, rspec, standard, vcr, webmock, dotenv, rotp, and rake.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 57 → 60 (+2.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 75 → 75 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 43 → 49 (+5.9)
  • Readiness 64 → 64 (+0.1)
  • Security 99 → 98 (-0.7)

Resolved (4)

  • Ambiguous duplication: It is unclear if 'streaming_endpoint()' returns a URL string (same as 'streaming_endpoint_url()') or a connection object/URL object. If both return the same string representation, one is redundant. If they return different types, the naming is misleading (one should likely be 'streaming_endpoint_url' and the other 'streaming_endpoint_connection' or similar).
  • Documentation: contradicts the code (docs/api-basics/authentication.md)
  • Duplicate intent: Both methods appear to retrieve the current state/data of the vehicle. There is no clear semantic distinction provided between 'vehicle_data' and 'data', suggesting one is redundant or an alias.
  • Outdated: faraday

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

timdorr/tesla-api was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 08ad7b1b41ef1b35900e21fda660712568fd30b9 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.