Napari Listener


Control napari via local socket.

License MIT PyPI tests napari hub

Opens a socket to listen for commands to control napari from other processes. This can be useful for controlling napari programmatically from other applications, or for improving general OS integration (e.g. opening data from a file or UrL in a running instance of napari).

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.


You can install napari-listener via pip:

pip install napari-listener


Once installed, napari-listener can be started from the napari > Plugins > Start Listening menu. You will see a new docked widget that displays the address and port for the listener.

The listener is a TCP server that expects app-model command IDs. It will execute any valid app-model command, but napari-listener registers its own additional commands for demonstration purposes in

You can test napari-listener using a TCP client such as netcat or curl to send an app-model command (and optional args). For example:

% nc 40256 <<< "napari:open-file /path/to/local/file"
quick demo of napari-listener


Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.


Distributed under the terms of the MIT license, "napari-listener" is free and open source software


If you encounter any problems, please [file an issue] along with a detailed description.


  • 0.1.0b1.post1

Last updated:

  • 21 March 2023

First released:

  • 21 March 2023


Supported data:

  • Information not submitted

Plugin type:

GitHub activity:

  • Stars: 1
  • Forks: 0
  • Issues + PRs: 0

Python versions supported:

Operating system:


  • napari
  • qtpy

Sign up to receive updates