Skip to main content
Pre-release

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

liauto

liauto 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.

Build

go build ./...
go vet ./...
go test ./...

Commands

liauto activate          # activate the current device (first activation or re-activation)
liauto login             # device login, prints an OAuth URL, then persists the pasted token JSON
liauto vehicles          # list cached vehicles
liauto status <VIN>      # query vehicle state (--json/--raw)
liauto travel <VIN> [YYYY-MM]   # monthly travel history; with YYYY-MM, that month's detail
liauto 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>)
liauto version           # print version
liauto serve             # HTTP API server (default 127.0.0.1:18001; --addr/--token/--allow-control)
liauto mcp               # MCP server, stdio (default) or --transport http (default 127.0.0.1:18002)

Run liauto with no arguments (or liauto <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 liauto command except version requires a valid activation code, set as an environment variable:

export LICLI_CODE=<activation code>
liauto login       # one-time: prints an authorization URL, then paste the token JSON from the browser's F12 developer tools
liauto 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)

liauto 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)

liauto 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.0b0

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.0b0
File
liauto-0.1.0b0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
liauto-0.1.0b0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
liauto-0.1.0b0-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
liauto-0.1.0b0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
liauto-0.1.0b0-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.0b0-py3-none-win_amd64.whl

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

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

Download URL liauto-0.1.0b0-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
518d9d4714ba151253979ce9ec7baf26ea6830273c5289f04bdb835ad96eb2d3
BLAKE2b-256 checksum
How to use checksums
e112d03dac668ba92c1292b19cbedc7ad2d87c224d7b5a3daaf21c71d1919c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Download URL liauto-0.1.0b0-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
c9ce7e63cd6a00cb8faa8eb5d0ce245e82bee858de0124371a6cf1cf1cca8f0f
BLAKE2b-256 checksum
How to use checksums
5afbe690cab0173cb0154d5f2b47c22899448ecf06a1aef285378045fd641382
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Download URL liauto-0.1.0b0-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
fcc48234d6ad64a358a9261bec0d6d321962cce4580c30db0977563caf6a5832
BLAKE2b-256 checksum
How to use checksums
dfbc9ffafec2ac9f8bc8aa873efd51387c1a235c31b0fc706340e1665df544aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

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

Download URL liauto-0.1.0b0-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
79abc92bfc383b8270046daa3c9d87052df2f9fee67761f7f70adf6968040b3b
BLAKE2b-256 checksum
How to use checksums
627b618333e251a7f0a6e24302a2afcc3a5c7854f5efa8172845fc73d4485980
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.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