@witblox/witpro-cli
v1.2.0
Published
CLI tool to diagnose and fix common Arduino development environment issues for WitPro projects. Works on Windows, macOS, and Linux.
Readme
WitPro Doctor
CLI tool to diagnose and fix common Arduino development environment issues for WitPro projects. Works on Windows, macOS, and Linux.
Features
- Checks for Arduino CLI installation
- Verifies required cores:
arduino:avrandesp8266:esp8266 - Detects CP210x USB-to-UART driver presence (OS-specific)
- Offers to fix issues automatically (installs missing cores, guides driver setup)
- Interactive mode when no arguments are given
Requirements
- Node.js 18+ recommended
- Arduino CLI installed or available in a known location
- Windows:
%APPDATA%/wit-pro/arduino-cli/arduino-cli.exe - macOS/Linux (fallbacks used if not on PATH):
~/.local/share/wit-pro/arduino-cli/arduino-cli/usr/local/bin/arduino-cli
- Windows:
Install
Global install (recommended):
npm i -g witproLocal usage without global install:
npx witpro doctorUsage
Run doctor checks:
witpro doctorRun checks and attempt automatic fixes:
witpro doctor --fixShow version:
witpro version
witpro -vRun with no arguments to use the interactive menu:
witproFix flow
- If any checks fail, you will be prompted to Fix or Exit
- With
--fix, fixes run automatically - Fixes implemented:
- Update core index:
arduino-cli core update-index - Install cores:
arduino-cli core install arduino:avr,arduino-cli core install esp8266:esp8266 - CP210x driver: shows OS-specific guidance and download instructions
- Update core index:
Note: Arduino CLI installation itself is not performed automatically; you will be guided to install it if missing.
Platform support
- Windows: Uses PowerShell-friendly commands and avoids Unix pipes
- macOS/Linux: Uses native tools (
kextstat,lsmod) and parses output in Node
Troubleshooting
- Arduino CLI not found
- Ensure it is installed and accessible by the resolved paths above or on your PATH
- On Windows, restarting the terminal after installation may be required
- Core installation fails
- Try running
arduino-cli core update-indexand re-running the doctor - Ensure you have network connectivity
- Try running
- CP210x issues
- Windows: Install the "CP210x Universal Windows Driver" from Silicon Labs and reboot
- macOS: Install the CP210x VCP driver from Silicon Labs and reboot if necessary
- Linux: Ensure the
cp210xkernel module is available (usually built-in)
Development
git clone <repo-url>
cd witpro-doctor
npm i
# Link globally for local testing
npm link
# Run
witpro doctorLicense
ISC
