technodelight / php-cli-cross-platform-open
Opens a file or URL in the user's preferred application in CLI (cross platform)
Package info
github.com/technodelight/php-cli-cross-platform-open
pkg:composer/technodelight/php-cli-cross-platform-open
1.0
2019-07-03 12:40 UTC
Requires
- technodelight/shell-exec: ^1.0
This package is auto-updated.
Last update: 2026-03-01 00:13:13 UTC
README
Opens a file or URL in the user's preferred application in CLI (cross platform)
usage
<?php
use Technodelight\CliOpen\OsAdaptingFactory;
$cliOpen = OsAdaptingFactory::create();
$cliOpen->open('https://packagist.com');
requirements
You need one of the following terminal applications available:
- open (OS X default)
- xdg-open (default in some linux distros)
- opn / open-cli (https://github.com/sindresorhus/open-cli)