Skip to main content

Command-line tool for managing WiCAN Pro OBD-II devices

Project description

wican-cli

Command-line tool for managing WiCAN Pro OBD-II WiFi devices.

View and save device configuration, toggle sleep mode, switch protocol modes, query SD card logs, check AutoPID values, and reboot — all from your terminal.

Installation

pip install wican-cli

Or with uv:

uv tool install wican-cli

Quick start

# Connect to WiCAN on its default AP address (192.168.80.1)
wican status

# Or specify a device address
wican --wican 192.168.1.100 status

# Set up a config file to avoid typing the address every time
mkdir -p ~/.config/wican-cli
cat > ~/.config/wican-cli/config.yaml << 'EOF'
wican_addresses:
  home: "192.168.1.100"
  vpn: "10.8.0.50"
default_wican: home
EOF

# Now just use the named alias
wican status
wican --wican vpn status

Commands

Command Description
wican config View device configuration (optionally save to file)
wican sleep View or modify sleep/power settings
wican status Device status summary
wican protocol View or switch CAN protocol mode
wican logs List, download, or query SD card OBD log databases
wican autopid Show latest AutoPID cached values
wican reboot Reboot the device

Examples

# Save a config snapshot with credentials stripped
wican config --save --redact

# Enable sleep mode with 12.5V threshold
wican sleep --enable --voltage 12.5

# Switch to ELM327 mode for use with Torque/Car Scanner
wican protocol --set elm327

# Download all log databases from the SD card
wican logs --download

# Query a specific parameter from the latest log
wican logs --query SOC_BMS --limit 20

# Show AutoPID values filtered by name
wican autopid -f tyre

Configuration

wican-cli looks for configuration in this order:

  1. WICAN_URL environment variable (overrides everything)
  2. ./wican-cli.yaml (project-local)
  3. ~/.config/wican-cli/config.yaml (user-global)

If none is found, it defaults to 192.168.80.1 (WiCAN's built-in AP).

Config file format

wican_addresses:
  home: "192.168.1.100"    # Device on local LAN
  vpn: "10.8.0.50"         # Device via VPN tunnel
  ap: "192.168.80.1"       # Direct AP connection (WiCAN default)
default_wican: home         # Which address to use by default

Use --wican <name> to select a different address, or pass an IP/URL directly: --wican 192.168.1.100.

Global flags

Flag Description
--wican ADDR Device address: named alias or IP/URL
--timeout SEC Request timeout in seconds (default: 10)
--json JSON output (available on most commands)
--version Show version and exit

Shell completions

wican-cli uses argcomplete for tab completions in bash, zsh, and fish.

Global activation (all argcomplete-enabled tools)

# bash (add to ~/.bashrc)
activate-global-python-argcomplete

# zsh (add to ~/.zshrc)
autoload -U bashcompinit && bashcompinit
activate-global-python-argcomplete

# fish
register-python-argcomplete --shell fish wican | source

Per-command activation

# bash (add to ~/.bashrc)
eval "$(register-python-argcomplete wican)"

# zsh (add to ~/.zshrc)
autoload -U bashcompinit && bashcompinit
eval "$(register-python-argcomplete wican)"

# fish (add to ~/.config/fish/completions/wican.fish)
register-python-argcomplete --shell fish wican | source

Local development

Prerequisites: Python 3.10+ and uv.

# Clone the repository
git clone https://github.com/philipkocanda/wican-cli.git
cd wican-cli

# Install dependencies (including dev extras)
uv sync --extra dev

# Run the CLI locally
uv run wican --help

# Run tests
uv run pytest

# Run tests with coverage
uv run pytest --cov

# Lint and format
uv run ruff check .
uv run ruff format .

What is WiCAN?

WiCAN Pro is an ESP32-based WiFi/BLE OBD-II adapter that supports multiple protocols (AutoPID, SLCAN, ELM327, SavvyCAN, RealDash). It can publish vehicle data via MQTT to Home Assistant, log to SD card, and provide a WebSocket terminal interface.

This CLI tool manages the device itself — it does not send CAN/OBD requests to the vehicle. For that, use tools like python-can, SavvyCAN, or Torque.

License

Public domain — see LICENSE (Unlicense).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wican_cli-0.1.0.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wican_cli-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file wican_cli-0.1.0.tar.gz.

File metadata

  • Download URL: wican_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wican_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd04c5e3a734ea2e92a9a94d271c06097b19becc3450694e5ca351c8936aab58
MD5 776942ccb756576a7e9e014d71287d74
BLAKE2b-256 3dfcb369bd7a7a920eea65c3fb6f92976a1a97b3b931eec92d36601a62c49dbd

See more details on using hashes here.

File details

Details for the file wican_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wican_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wican_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03931a6451e3058f79f2e2115682e3aee99bd4b7f2b1b7e903b85b5b21867405
MD5 09d8c98fab5d58a8255cd38b317b9a46
BLAKE2b-256 361e8f0c05a3a7e7f2d28ea3aa44bad04f133a877e1a3e214a0203ad253f2cc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page