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

Uploaded Python 3

File details

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

File metadata

  • Download URL: picolynx-0.1.dev30.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.dev30.tar.gz
Algorithm Hash digest
SHA256 90654eb5b7e16096ee0e8468f10f0f208f08c5f01cbb279fe0ef4329b806a8e8
MD5 a302b1454ab50d72c40801b8e7f10ef7
BLAKE2b-256 f4fbdeedd8aafa896fd0a602c02288d5fd948a791d409a6ab8dd0e1c7d2aa3f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for picolynx-0.1.dev30-py3-none-any.whl
Algorithm Hash digest
SHA256 468409cae210044483ae2d1d781c9cdf288ac045728a5e918cd35c8483a966cd
MD5 d2eecb5f8f7df5e6fbe6036bf174e8eb
BLAKE2b-256 6b4c812efb60980a65559a152d3eddd0f4e9d73e43e60f840356f3975002f2f9

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