Download the PHP package php-opcua/opcua-cli without Composer

On this page you can find all versions of the php package php-opcua/opcua-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package opcua-cli

OPC UA CLI

Tests Coverage Latest Version PHP Version

Linux macOS Windows


Command-line tool for OPC UA servers. Browse, read, write, watch, interactively explore, discover endpoints, manage certificates, and generate PHP code from NodeSet2.xml -- all from the terminal.

Built on top of php-opcua/opcua-client, the pure PHP OPC UA client.

Installation

Standalone binary (no PHP required)

Pre-built, self-contained executables are published on every tag release. No PHP installation, no composer, no php.ini, no extensions — one file.

Each release also ships SHA256SUMS.txt; verify with sha256sum --check SHA256SUMS.txt (Linux/macOS) or Get-FileHash -Algorithm SHA256 (PowerShell).

The binaries bundle PHP 8.4, the statically linked OpenSSL (with full ECC curve support including brainpoolP256r1/P384r1), and the compiled opcua-cli — built via static-php-cli + Box.

macOS note — unsigned binaries. The macOS artefact (v4.3.0 and v4.4.0) is not code-signed or notarized. On first launch Gatekeeper will refuse to run it ("cannot be opened because the developer cannot be verified"). Strip the quarantine flag with xattr -cr <binary> as shown above, or open the binary once via System Settings → Privacy & Security → Open Anyway. Code-signing + notarization is tracked for v4.4.0.

Intel Mac (macos-x86_64) not shipped. GitHub retired the free macos-13 runner pool during 2025, so a native Intel build is no longer producible on CI without a paid runner. Intel Mac users should install via Composer (composer global require php-opcua/opcua-cli) or build from source — see docs/building/static-binary.md. Note that the Apple Silicon binary (macos-arm64) will not run on Intel Macs: Rosetta 2 translates x86_64 → arm64, not the reverse.

Windows note — experimental. The windows-x86_64.exe leg of the release workflow runs with continue-on-error: true, so a release is published even if the Windows build fails. If the .exe is not listed on a given release page, the Windows build did not complete successfully that cycle — use docs/building/static-binary.md to produce it locally, or wait for the next release. Windows promotion to first-class support is tracked for v4.4.0.

Need a binary for a platform not in the list above (Alpine/musl, a different PHP or extension set)? See docs/building/static-binary.md — step-by-step instructions for reproducing the build locally.

Via Composer

The binary is installed at vendor/bin/opcua-cli.

For global installation:

Quick Start

Commands

browse -- Browse the address space

Option Description
--recursive Browse recursively (tree view)
--depth=N Maximum depth for recursive browse (default: 3)

read -- Read a node value

Option Description
--attribute=NAME Attribute to read: Value (default), DisplayName, BrowseName, DataType, NodeClass, Description, AccessLevel, NodeId

write -- Write a value to a node

Option Description
--type=TYPE Explicit OPC UA type: Boolean, SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float, Double, String

endpoints -- Discover server endpoints

watch -- Watch a value in real time

explore -- Interactive TUI browser

Full-screen terminal UI to walk the address space without typing commands. Tree on the left, details pane on the right (with live Value / Status / Source timestamp for Variables), log pane at the bottom.

Key Action
/ Move selection
/ Enter Expand node (browse children)
Collapse or jump to parent
r Refresh the Value of the selected Variable
q / Esc Quit

Platform support. explore currently runs on Linux and macOS. Windows support is coming soon.

Flags. --json and --debug are rejected (they would corrupt the interactive screen). Use --debug-stderr or --debug-file=<path> if you need logs while explore is running.

generate:nodeset -- Generate PHP classes from NodeSet2.xml

Generates:

Option Description
--output=PATH Output directory (default: ./generated/)
--namespace=NS PHP namespace (default: Generated\\OpcUa)

No server connection required -- reads the XML file locally.

dump:nodeset -- Export server address space to NodeSet2.xml

Option Description
--output=FILE Output XML file path (required)
--namespace=N Export only this namespace index (default: all non-zero)

The exported file can be fed directly to generate:nodeset.

trust -- Trust a server certificate

trust:list -- List trusted certificates

trust:remove -- Remove a trusted certificate

Option Description
--trust-store=<path> Custom trust store path
--trust-policy=<policy> Validation policy (fingerprint, fingerprint+expiry, full)
--no-trust-policy Disable trust validation for this command

Security Options

All commands support full security configuration — 10 policies (6 RSA + 4 ECC), 3 modes, 3 auth methods:

Option Short Description
--security-policy=<policy> -s None, Basic128Rsa15, Basic256, Basic256Sha256, Aes128Sha256RsaOaep, Aes256Sha256RsaPss, ECC_nistP256, ECC_nistP384, ECC_brainpoolP256r1, ECC_brainpoolP384r1
--security-mode=<mode> -m None, Sign, SignAndEncrypt
--cert=<path> Client certificate path
--key=<path> Client private key path
--ca=<path> CA certificate path
--username=<user> -u Username
--password=<pass> -p Password
--timeout=<seconds> -t Connection timeout (default: 5)

ECC disclaimer: ECC security policies (ECC_nistP256, ECC_nistP384, ECC_brainpoolP256r1, ECC_brainpoolP384r1) are fully implemented and tested against the OPC Foundation's UA-.NETStandard reference stack. However, no commercial OPC UA vendor supports ECC endpoints yet. When using ECC, client certificates are auto-generated if --cert/--key are omitted, and username/password authentication uses the EccEncryptedSecret protocol automatically.

Output Options

JSON

Add --json (or -j) to any command for machine-readable output:

Debug Logging

Global Options

Option Short Description
--json -j Output in JSON format
--debug -d Debug logging on stdout
--debug-stderr Debug logging on stderr
--debug-file=<path> Debug logging to file
--help -h Show help
--version -v Show version

Ecosystem

Package Description
opcua-client Pure PHP OPC UA client
opcua-cli CLI tool — browse, read, write, watch, interactively explore, discover endpoints, manage certificates, generate code from NodeSet2.xml (this package)
opcua-session-manager Daemon-based session persistence across PHP requests. Keeps OPC UA connections alive between short-lived PHP processes via a ReactPHP daemon and Unix sockets. Separate package by design — see ROADMAP.md for rationale.
opcua-client-nodeset Pre-generated PHP types from 51 OPC Foundation companion specifications (DI, Robotics, Machinery, MachineTool, ISA-95, CNC, MTConnect, and more). 807 PHP files — NodeId constants, enums, typed DTOs, codecs, registrars with automatic dependency resolution. Just composer require and loadGeneratedTypes().
laravel-opcua Laravel integration — service provider, facade, config
uanetstandard-test-suite Docker-based OPC UA test servers (UA-.NETStandard) for integration testing

Testing

### Tested against the OPC UA reference implementation The underlying [opcua-client](https://github.com/php-opcua/opcua-client) is integration-tested against **[UA-.NETStandard](https://github.com/OPCFoundation/UA-.NETStandard)** — the **reference implementation** maintained by the OPC Foundation, the organization that defines the OPC UA specification. This CLI tool is additionally integration-tested via [uanetstandard-test-suite](https://github.com/php-opcua/uanetstandard-test-suite), verifying that every command works correctly against real-world OPC UA servers. Like [opcua-client](https://github.com/php-opcua/opcua-client), the CLI unit tests run on **Linux, macOS, and Windows** across PHP 8.2–8.5 in CI on every push.

288 tests (258 unit + 30 integration) with 99.9% code coverage. Unit tests run cross-OS (Linux, macOS, Windows) × PHP 8.2–8.5 = 12 combinations; integration tests run on Linux × PHP 8.2–8.5 = 4 combinations against uanetstandard-test-suite — a Docker-based OPC UA environment built on the OPC Foundation's UA-.NETStandard reference implementation.

CI runs on PHP 8.2, 8.3, 8.4, and 8.5 via GitHub Actions.

Requirements

AI-Ready

This package ships with machine-readable documentation designed for AI coding assistants (Claude, Cursor, Copilot, ChatGPT, and others). Feed these files to your AI so it knows how to use the CLI tool correctly:

File Purpose
llms.txt Compact project summary — commands, options, architecture. Optimized for LLM context windows with minimal token usage.
llms-full.txt Comprehensive technical reference — every command, option, class, code generator, output system. For deep dives and complex questions.
llms-skills.md Task-oriented recipes — step-by-step instructions for common tasks (browse, read, write, watch, security, trust, code generation, scripting). Written so an AI can generate correct commands from a user's intent.

How to use: copy the files you need into your project's AI configuration directory. The files are located in vendor/php-opcua/opcua-cli/ after composer install.

Versioning

This package follows the same version numbering as php-opcua/opcua-client. Each release of opcua-cli is aligned with the corresponding release of the client library to ensure full compatibility.

License

MIT. See LICENSE.


All versions of opcua-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
php-opcua/opcua-client Version ^4.5.0
php-tui/php-tui Version ^0.2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-opcua/opcua-cli contains the following files

Loading the files please wait ...