https://github.com/potherca/cli2web
Expose a CommandLine Interface to the Web
https://github.com/potherca/cli2web
cli-utilities composer-package php php-library potherca web-app web-application
Last synced: over 1 year ago
JSON representation
Expose a CommandLine Interface to the Web
- Host: GitHub
- URL: https://github.com/potherca/cli2web
- Owner: Potherca
- Created: 2018-10-03T17:48:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-14T06:45:43.000Z (over 1 year ago)
- Last Synced: 2025-03-18T05:12:37.034Z (over 1 year ago)
- Topics: cli-utilities, composer-package, php, php-library, potherca, web-app, web-application
- Language: PHP
- Size: 84 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI2Web (CommandLine Interface to Web)
[](https://app.fossa.io/projects/git%2Bgithub.com%2FPotherca%2Fcli2web?ref=badge_shield)
## Introduction
The aim of this project is to make it trivial to expose a shell script("command-line
script" or "CLI script") as a web application.
This library offers conversion, logic and templates to gather user input, feed it
to a shell script and render the output in the browser.
All that has to be provided is a shell script and configuration. Optionally logic
can be added to compliment the input, output or render process.
## Requirements
- As this is a web application, it is assumed a web-server is available.
- This project is written in PHP. Any actively support version is fine.
## Installation
Installation is done using composer:
composer require potherca/cli2web
As this is a web application, it is assumed a web-server is available.
## Usage
- Create an index file in a public facing directory in the web-server
- Include the cli2web engine
- Feed the engine a configuration
- Done.
For more advanced scenario's any of the following steps can also be taken:
- Add logic that is called with the user input
(instead of the CLI script being called directly)
- Add logic that is called with the shell script output
(instead of the output being displayed directly, "raw", as-is)
- Add custom UI to display the returned output
(instead of the output being displayed as plain-text)
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FPotherca%2Fcli2web?ref=badge_large)