## What is the CarsXE Extension for Gemini CLI?

Access the full suite of CarsXE vehicle data APIs directly from Gemini CLI. Decode VINs, look up license plates, get market values, vehicle history, recalls, lien and theft records, OBD codes, and more.

**GitHub Repository**: [carsxe-gemini-extension](https://github.com/carsxe/carsxe-gemini-extension)

## Features

| Command                                    | Description                                   |
| ------------------------------------------ | --------------------------------------------- |
| `/carsxe:auth <API_KEY>`                   | Validate and set your CarsXE API key          |
| `/carsxe:specs <VIN>`                      | Decode a VIN with full vehicle specifications |
| `/carsxe:plate <PLATE> <COUNTRY> [STATE]`  | Look up a vehicle by license plate            |
| `/carsxe:value <VIN>`                      | Get current market value                      |
| `/carsxe:history <VIN>`                    | Full vehicle history report                   |
| `/carsxe:images <MAKE> <MODEL> [YEAR]`     | Retrieve vehicle photos                       |
| `/carsxe:recalls <VIN>`                    | Check for open safety recalls                 |
| `/carsxe:intvin <VIN>`                     | Decode an international (non-US) VIN          |
| `/carsxe:ocr <IMAGE_URL>`                  | Extract a VIN from a photo (OCR)              |
| `/carsxe:lien <VIN>`                       | Check for liens and theft records             |
| `/carsxe:plateocr <IMAGE_URL>`             | Extract a plate number from a photo           |
| `/carsxe:ymm <YEAR> <MAKE> <MODEL> [TRIM]` | Look up by Year/Make/Model                    |
| `/carsxe:obd <CODE>`                       | Decode an OBD-II trouble code                 |

All commands also have corresponding **skills** that Gemini auto-invokes when it detects relevant context in your conversation.

## Prerequisites

Before installing the extension, make sure you have the [Gemini CLI](https://github.com/google-gemini/gemini-cli) installed and your `GEMINI_API_KEY` environment variable set.

You can get a Gemini API key from [Google AI Studio](https://aistudio.google.com/apikey).

**macOS / Linux — add to your shell profile for persistence:**

<CodeGroup title="macOS / Linux">
```bash
echo 'export GEMINI_API_KEY=your_gemini_api_key_here' >> ~/.bashrc
source ~/.bashrc
```
</CodeGroup>

If you use Zsh (default on macOS), replace `~/.bashrc` with `~/.zshrc`.

**Windows — PowerShell (current session):**

<CodeGroup title="Windows PowerShell (current session)">
```powershell
$env:GEMINI_API_KEY="your_gemini_api_key_here"
```
</CodeGroup>

**Windows — PowerShell (persist across sessions):**

<CodeGroup title="Windows PowerShell (persist)">
```powershell
[System.Environment]::SetEnvironmentVariable("GEMINI_API_KEY","your_gemini_api_key_here","User")
```
</CodeGroup>

**Windows — Command Prompt:**

<CodeGroup title="Windows Command Prompt">
```cmd
setx GEMINI_API_KEY "your_gemini_api_key_here"
```
</CodeGroup>

After `setx`, restart your terminal for the variable to take effect.

## Installation

Install the extension from the GitHub repository:

<CodeGroup title="Terminal">
```bash
gemini extensions install https://github.com/carsxe/carsxe-gemini-extension.git
```
</CodeGroup>

During installation, Gemini CLI prompts you for your CarsXE API key. If you do not have a key yet, sign up and get one from the [CarsXE developer dashboard](/dashboard/developer).

If you skipped that prompt, or you want to change your API key after installing, run:

<CodeGroup title="Configure API Key">
```bash
gemini extensions config carsxe
```
</CodeGroup>

This stores your API key securely in the system keychain.

## Usage Examples

### Decode a VIN

<CodeGroup title="Decode a VIN">
```bash
/carsxe:specs WBAFR7C57CC811956
```
</CodeGroup>

### Look up a license plate

<CodeGroup title="Look up a license plate">
```bash
/carsxe:plate 7XER187 US CA
```
</CodeGroup>

### Get market value

<CodeGroup title="Get market value">
```bash
/carsxe:value WBAFR7C57CC811956
```
</CodeGroup>

### Vehicle history report

<CodeGroup title="Vehicle history report">
```bash
/carsxe:history WBAFR7C57CC811956
```
</CodeGroup>

### Vehicle images

<CodeGroup title="Vehicle images">
```bash
/carsxe:images BMW X5 2019
```
</CodeGroup>

### Check recalls

<CodeGroup title="Check recalls">
```bash
/carsxe:recalls WBAFR7C57CC811956
```
</CodeGroup>

### International VIN

<CodeGroup title="International VIN">
```bash
/carsxe:intvin WF0MXXGBWM8R43240
```
</CodeGroup>

### VIN OCR from image

<CodeGroup title="VIN OCR from image">
```bash
/carsxe:ocr https://example.com/vin-photo.jpg
```
</CodeGroup>

### Lien and theft check

<CodeGroup title="Lien and theft check">
```bash
/carsxe:lien WBAFR7C57CC811956
```
</CodeGroup>

### Plate recognition from image

<CodeGroup title="Plate recognition from image">
```bash
/carsxe:plateocr https://example.com/plate-photo.jpg
```
</CodeGroup>

### Year/Make/Model lookup

<CodeGroup title="Year/Make/Model lookup">
```bash
/carsxe:ymm 2020 Toyota Camry LE
```
</CodeGroup>

### OBD code decode

<CodeGroup title="OBD code decode">
```bash
/carsxe:obd P0300
```
</CodeGroup>

## Skills (Auto-invoked)

Gemini will automatically use the CarsXE tools when it detects relevant queries. For example:

- *"What can you tell me about VIN WBAFR7C57CC811956?"* — triggers the `vehicle-specs` skill
- *"Does this car have any recalls? VIN: WBAFR7C57CC811956"* — triggers the `vehicle-recalls` skill
- *"My check engine light is on with code P0300"* — triggers the `obd-decoder` skill
- *"How much is a 2012 BMW X5 worth? VIN WBAFR7C57CC811956"* — triggers the `market-value` skill

## API Documentation

Full API documentation is available at [api.carsxe.com/docs](/docs).
