Skip to main content

Auto-attach microcontrollers to WSL.

Project description

PicoLynx - Attach Microcontrollers to WSL

PicoLynx is a Windows-only TUI (Text-based User Interface) application for attaching and detaching microcontroller devices to WSL (Windows Subsystem for Linux) distributions. It monitors Windows WM_DEVICECHANGE messages with pywin32 and leverages usbipd-win to manage device connections.

PicoLynx TUI

https://github.com/user-attachments/assets/d5382270-cae8-4eb4-90a6-28ccb96e5250

Features

  • Manual control: Easily attach, bind, detach, or unbind devices using keyboard shortcuts.
  • Live device table: View connected and persisted devices in real time.
  • Windows message monitoring: Reacts instantly to hardware changes.
  • Thread-safe: Ensures safe device operations even with concurrent events.
  • Beautiful TUI: Built with Textual for a modern terminal experience & many theme options.
  • Auto-attachment (TODO): Detects devices as they are connected & automatically attaches to WSL.

Requirements

  • Windows 10/11 (Windows-only)
  • usbipd-win (must be installed & available in your PATH)
  • WSL with at least one running distribution (for attachment)
  • Python 3.11+ (recommended via Astral's uv package manager)

PicoLynx requires administrator privileges to interact with USB devices. If not run as administrator, it will prompt for elevation.

Installation

To install Astral uv, use the following command:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Astral uv package manager is recommended for a fast, isolated, and reliable install. You can install PicoLynx globally with the following uv command:

uv tool install picolynx

Or:

uv tool install "git+https://github.com/andyrids/picolynx.git"

You can run PicoLynx without installing, by running the following command:

uvx picolynx

Or:

uvx "git+https://github.com/andyrids/picolynx.git"

Keyboard Shortcuts

Key Action
a Attach
b Bind
d Detach
u Unbind

Select a device in the table and press the corresponding key to perform the action.

Development

The just command runner (GitHub page) is a handy way to save and run project-specific commands, which are written in a file called justfile.

If you use just, you can add use the commands below to run PicoLynx in development mode, with the textual console integration:

This command uses uv to sync the package dependencies and create a .venv:

just sync

Alias for:

uv sync

Running the command below in one terminal, will activate the textual console:

just console

Alias for:

uv run textual console -x EVENT -x SYSTEM

Running this command will run PicoLynx in development mode.

just dev

Alias for:

uv run textual run --dev src/picolynx/__main__.py

Acknowledgements

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

picolynx-0.1.dev37.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

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

picolynx-0.1.dev37-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file picolynx-0.1.dev37.tar.gz.

File metadata

  • Download URL: picolynx-0.1.dev37.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for picolynx-0.1.dev37.tar.gz
Algorithm Hash digest
SHA256 5c87ffbcfa940655494638cc4adbc9e79c277223fdcfa2912341da8632e8b4a1
MD5 f890800e36d6d0ccae4703b746719936
BLAKE2b-256 4405ac689f34ea0595b653c3a189b87781005cb90e41b46e422394b8f0236cfc

See more details on using hashes here.

File details

Details for the file picolynx-0.1.dev37-py3-none-any.whl.

File metadata

File hashes

Hashes for picolynx-0.1.dev37-py3-none-any.whl
Algorithm Hash digest
SHA256 e9293b1ab1d1108d306d35e983284c1500b8f26371874ea65261fef48fd6edf6
MD5 719dd18e4e733562ac55e46f1053cc2d
BLAKE2b-256 98e06efb9018db16ce7a3523da687331c1e90788a2303c8fe0bb3dd99757372d

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