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.dev34.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.dev34-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for picolynx-0.1.dev34.tar.gz
Algorithm Hash digest
SHA256 9bf03ecc322b6ecf787c74aa957cb3e7254725ff315a5baab0f16e54870bc0a2
MD5 c0161856dad6d5f950b323a276bfdaa4
BLAKE2b-256 abec53fe7ef5c635152393d04372ade2a0e51314b16edcebd69c35f91b03f810

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for picolynx-0.1.dev34-py3-none-any.whl
Algorithm Hash digest
SHA256 5fc488cb60569abe0636f0eec5373528f183ecd92019f070ecb641a04de36e19
MD5 dafe09884682a991b1d7483bd69d2d2f
BLAKE2b-256 92d1d1e5afc88d0d0235784446c7c44c30811475597e5aeda20f15b8663bba9b

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