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.
Vendor php-opcua Package opcua-cli Short Description CLI tool for OPC UA — browse, read, write, watch, discover endpoints, manage certificates, and generate code from NodeSet2.xml License
MIT Homepage https://github.com/php-opcua/opcua-cli
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.
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.
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
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:
NodeId constants -- one class with all node IDs as string constants
PHP enums -- BackedEnum for each OPC UA enumeration type
DTOs -- readonly classes with typed properties for structured DataTypes
Codecs -- ExtensionObjectCodec implementations for binary encoding/decoding
Registrar -- batch-registers all codecs with the client
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.
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:
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.
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.
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.
Claude Code: reference per-session with --add-file vendor/php-opcua/opcua-cli/llms-skills.md
Cursor: copy into your project's rules directory — cp vendor/php-opcua/opcua-cli/llms-skills.md .cursor/rules/opcua-cli.md
GitHub Copilot: copy or append the content into your project's .github/copilot-instructions.md file (create the file and directory if they don't exist). Copilot reads this file automatically for project-specific context
Other tools: paste the content into your system prompt, project knowledge base, or context configuration
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.
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 ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.