--- orphan: true myst: html_meta: description: "Find OPC UA nodes in the terminal, inspect live attributes, and copy the Python code that finds them." --- # OPC UA terminal explorer {.lead} Use the explorer to find a node by name, inspect its live values, and copy its qualified browse path or the Python code that finds it. ## Install :::{note} To try the explorer without installing it, run `uvx instro-opcua-explorer` with [uv](https://docs.astral.sh/uv/) or `pipx run instro-opcua-explorer` with [pipx](https://pipx.pypa.io/), then skip to [Connect and find a node](#connect-and-find-a-node). ::: Install the explorer as a command with [uv](https://docs.astral.sh/uv/) or [pipx](https://pipx.pypa.io/), which give it an environment of its own, or with `pip` into your current environment. ::::{tab-set} :::{tab-item} uv ```bash uv tool install instro-opcua-explorer ``` ::: :::{tab-item} pipx ```bash pipx install instro-opcua-explorer ``` ::: :::{tab-item} pip ```bash pip install instro-opcua-explorer ``` ::: :::: To add the explorer to a project that uses `instro`, install the `opcua-explorer` extra with `uv add "instro[opcua-explorer]"` or `pip install "instro[opcua-explorer]"`. ## Start the explorer ```bash instro-opcua-explorer ``` In a uv project, run `uv run instro-opcua-explorer`. If your shell can't find the command after a `pip` install, run `python -m instro.opcua.explorer`. From an `instro` checkout, run `uv run --package instro-opcua-explorer instro-opcua-explorer`. ## Connect and find a node 1. Press Enter to edit **Discovery URL**. Enter the server URL and press Enter again to discover its endpoints. 2. Use `j` and `k` to move between controls. Choose the **Mode / policy** and **User identity** advertised by your server. Expand **Advanced configuration** to set the application certificate, key, or trust store. Select **Connect**. 3. In **Address space**, press `l` to expand a node or `h` to collapse it. Press `/` and type part of a browse name to filter the tree. Enter reveals the highlighted match. Esc returns to your previous selection. 4. With a node highlighted, press `y` to copy its qualified browse path or `c` to copy the Python code that finds it. To also read an attribute in that code, press Tab to focus **Attributes**, highlight the attribute, and press `c` again. The copied code uses `client.root` for Root and `client.get_node()` for other nodes. Paste it where `client` is a connected `OpcUaClient`, as in [Connect and read](/library/protocols/opcua.md#connect-and-read).