Installation
Install via Composer for development; download a PHAR or static binary from GitHub Releases for deployment. Three install paths, one binary called opcua-cli.
opcua-cli is distributed in three forms, ordered by use case:
| Form | Best for | Where |
|---|---|---|
| Composer package | PHP developers, project-local install | Packagist |
| PHAR | Single-file distribution, dev boxes | GitHub Releases / build it yourself |
| Static binary | Servers without PHP installed | GitHub Releases / build it yourself |
Composer
The path most application developers will pick. Adds the CLI as a
dev dependency of your PHP project, exposes vendor/bin/opcua-cli.
composer require --dev php-opcua/opcua-cli
The runtime is whichever PHP you use for the project (≥ 8.2).
opcua-cli's own composer.json only declares php,
php-opcua/opcua-client and php-tui/php-tui; ext-openssl is
pulled in transitively by the OPC UA stack but is not an explicit
CLI-level requirement. After install, the CLI is at:
vendor/bin/opcua-cli --version
# → opcua-cli 4.3.0
Add vendor/bin to $PATH if you want to invoke opcua-cli
directly without the prefix.
PHAR
Single-file, self-contained, requires PHP 8.2+ on the host. Suitable for dev workstations that already have PHP available.
# From GitHub Releases
curl -L https://github.com/php-opcua/opcua-cli/releases/latest/download/opcua-cli.phar \
-o /usr/local/bin/opcua-cli
chmod +x /usr/local/bin/opcua-cli
opcua-cli --version
To build it from source, see Building · PHAR.
Static binary
A pre-compiled standalone executable bundling PHP + the OPC UA stack. Targets hosts that do not have PHP — operator workstations, field maintenance laptops, hardened servers.
Available on GitHub Releases for Linux x86_64, Linux aarch64, macOS (Intel + Apple Silicon), Windows x86_64.
# Linux x86_64
curl -L https://github.com/php-opcua/opcua-cli/releases/latest/download/opcua-cli-linux-x86_64 \
-o /usr/local/bin/opcua-cli
chmod +x /usr/local/bin/opcua-cli
opcua-cli --version
To build it from source, see Building · Static binary.
Requirements
| Form | Runtime requirement |
|---|---|
| Composer | PHP ≥ 8.2. ext-openssl is required transitively by opcua-client for any secured-channel use. |
| PHAR | PHP ≥ 8.2, ext-phar. ext-openssl transitively required for secured channels. |
| Static binary | OS only — modern Linux / macOS / Windows. The exact minimum kernel / OS version depends on how the binary was built; consult the release notes. |
The Composer install brings these in transitively:
php-opcua/opcua-client— the OPC UA stackpsr/log— logging interfaces (Composer provides a null logger)php-tui/php-tui— terminal-UI library for theexplorecommand
No additional configuration. No system service to install.
Verify the install
opcua-cli --version
opcua-cli --help
--version prints the running build's version string. --help
prints the command catalogue and global options — your map of the
tool's surface.
Updating
| Form | Update command |
|---|---|
| Composer | composer update php-opcua/opcua-cli |
| PHAR | Re-download from GitHub Releases |
| Static binary | Re-download from GitHub Releases |
The version-bump policy follows
opcua-client —
major and minor versions track the library. See the release
notes for what
changed.
Next
Open First browse and run the canonical "hello, OPC UA" against any server.