Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

licli

licli is a CLI for Li Auto vehicle APIs. It covers device activation/login, real-time status, monthly travel history, control commands, an HTTP API server, and an MCP server.

Published on PyPI as liauto; the command is licli. Try it without installing anything:

alias licli='uvx liauto'
licli help

For a persistent install, pip install liauto (any Python) and run licli.

Commands

licli activate          # activate the current device (first activation or re-activation)
licli login             # device login, prints an OAuth URL, then persists the pasted token JSON
licli vehicles          # list cached vehicles
licli status <VIN>      # query vehicle state (--json/--raw)
licli travel <VIN> [YYYY-MM]   # monthly travel history; with YYYY-MM, that month's detail
licli control <VIN> <action>   # lock/unlock/find/wake + ac <on|off|auto|temp|fast-cool|fast-heat> + seat-vent/seat-heat [pos] <1-3|off> + wheel-heat <on|off> + window [pos] <0-99> + trunk <open|close> (action: result <id>)
licli version           # print version
licli serve             # HTTP API server (default 127.0.0.1:18001; --addr/--token/--allow-control)
licli mcp               # MCP server, stdio (default) or --transport http (default 127.0.0.1:18002)

Run licli with no arguments (or licli <unknown>) to print the command list.

Global flags: --json (JSON output), -v / --verbose (verbose logging to stderr).

Exit codes: 0 success, 1 user input error, 2 network failure, 3 HTTP non-200, 4 activation failure, 5 config permission/corrupt, 6 missing/invalid/expired activation code.

Activation code

Running any licli command except version requires a valid activation code, set as an environment variable:

export LICLI_CODE=<activation code>
licli login
licli vehicles    # list vehicles

A code is issued by the tool's publisher (offline license-keygen). It is an Ed25519-signed token: the binary only verifies it with the built-in public key and cannot forge codes. Missing/invalid/expired codes exit with code 6.

HTTP API server (serve)

licli serve runs a foreground HTTP server (default 127.0.0.1:18001, override with --addr) exposing JSON endpoints for the vehicles/status/travel/control surface. Bind to a loopback address, set --token, or pass --allow-control to enable the control endpoints.

MCP server (mcp)

licli mcp serves the Model Context Protocol over stdio (default) or Streamable HTTP (--transport http, default 127.0.0.1:18002). It exposes six tools: vehicles, status, travel_months, travel_month, control, control_result. The two control* tools are enabled by default under stdio; under --transport http they require --allow-control or --token.

Configuration

Credentials are stored under the XDG config directory (~/.config/licli by default, or $XDG_CONFIG_HOME/licli) with 0700 directory and 0600 file permissions:

  • device.json — activated device + key suite
  • auth.json — API token, ID token, refresh token, expiry

Release files for liauto 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for liauto 0.1.0b1
File
liauto-0.1.0b1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
liauto-0.1.0b1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
liauto-0.1.0b1-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
liauto-0.1.0b1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
liauto-0.1.0b1-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details

Total release size: 34.6 MB

Release files / liauto-0.1.0b1-py3-none-win_amd64.whl

Download URL liauto-0.1.0b1-py3-none-win_amd64.whl
Size 7.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b53e5ec39fe1bd1f79c031b0cbae8b69192977cef9b4caa494a0047091c7ea66
BLAKE2b-256 checksum
How to use checksums
ede8dc6358380c78eec676ad4e5a511dd49c4ccabebb91ac50c755b717b093c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / liauto-0.1.0b1-py3-none-manylinux_2_17_x86_64.whl

Download URL liauto-0.1.0b1-py3-none-manylinux_2_17_x86_64.whl
Size 7.0 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
262f66e62d3ccb328f6fa240dc9975f1c0a2305b1405c4126b32cfd67af1ad3f
BLAKE2b-256 checksum
How to use checksums
9bcf26bad43cd35b5972a49f7497c98547a9d56c6d7d4672b37ab3bf20b46849
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / liauto-0.1.0b1-py3-none-manylinux_2_17_aarch64.whl

Download URL liauto-0.1.0b1-py3-none-manylinux_2_17_aarch64.whl
Size 6.3 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5b138d28d4133d8d0f3bdfaa2b68a3894a26d73b0033311c067f70797a82b324
BLAKE2b-256 checksum
How to use checksums
1a9077a4cd8eab022529a3c1fc7beadc08e48dcaf1237a90731505df2ad09b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / liauto-0.1.0b1-py3-none-macosx_11_0_arm64.whl

Download URL liauto-0.1.0b1-py3-none-macosx_11_0_arm64.whl
Size 6.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
59181065d73309215ed56b38bcfd8a2adf1544ee05e21edba77cbe1be95b63c7
BLAKE2b-256 checksum
How to use checksums
e148d528c69420218f092fa4a0ad8272d0448039f6e66e50414909648f5d34c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / liauto-0.1.0b1-py3-none-macosx_10_9_x86_64.whl

Download URL liauto-0.1.0b1-py3-none-macosx_10_9_x86_64.whl
Size 7.1 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
85d0c900e972436e751894304a5d3a00189650e942c0b0de5ebf1b6e637ffe8f
BLAKE2b-256 checksum
How to use checksums
279ee8086b7850937ab65f092ba0e944ec7270426a427b12bec05a67814244dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page