Download the PHP package mfonte/hte-cli without Composer

On this page you can find all versions of the php package mfonte/hte-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 hte-cli

Ubuntu/Debian compatible LAMP Test Environment Creator CLI Tool

Heads Up! This utility is intended to be used in combination with https://github.com/mauriziofonte/win11-wsl2-ubuntu22-setup Anyway, this utility can be used in any LAMP stack on Debian or Ubuntu , with Multi PHP-FPM support.


Screenshot of hte-cli create Screenshot of hte-cli remove Screenshot of hte-cli details


What is this utility for?

HTE stands for Handle Test Environment.

It eases the process of creating Test Environments on both Local or Staging environments, when using Apache on a multi PHP-FPM flavour.

Basically, this utility takes care of :

  1. creating a new VirtualHost for your.local.domain.tld
  2. configure the VirtualHost to work via php-fpm on the PHP version of User's Choice
  3. enable http/2 protocol and brotli compression
  4. configure the PHP fpm pool by adding a new specific configuration file for your.local.domain.tld, with some useful test environment presets.

Security

This tool is not intended to be used on internet-facing LAMP environments. It's intended to be used on local devices, or any other Cloud VM that is properly firewalled.

This is because this tool configures Apache and PHP with presets that are good only for local developing, testing and benchmarking.

For more informations, refer to LAMP Stack Hardening and Linux Security Bookmarks.

Installation

The easiest way to get started with Hte-Cli is to download the Phar files for each of the commands:

Global Composer Package

If you use Composer, you can install Hte-Cli system-wide with the following command:

Make sure you have the composer bin dir in your PATH.

The default value should be ~/.composer/vendor/bin/, but you can check the value that you need to use by running composer global config bin-dir --absolute

The HTE-Cli Tool will then be available on $(composer config -g home)/vendor/bin/hte-cli

It is suggested to modify your bash profile to expand your $PATH so that it includes the composer/vendor/bin directory. To do so, you can modify your .bashrc file by executing:

Composer Dependency

Alternatively, include a dependency for mfonte/hte-cli in your composer.json file on a specific project. For example:

You will then be able to run Hte-Cli from the vendor bin directory:

You can then create some Bash Aliases for your convenience:

Git Clone

You can also download the Hte-Cli source, and run your own hte-cli build:

Build setup is made possible via humbug/box. See Laravel Zero Doc for the internals of building a Laravel Zero app.

Environment Pre-requisites

As said before, this utility is intended to be used on Debian or Ubuntu , with Multi PHP-FPM support.

This means that you must configure your LAMP stack with these commands:

The important part is to:

  1. disable mpm_prefork module
  2. disable all php** handler modules
  3. enable all php**-fpm handler modules
  4. enable fcgid, mpm_event, proxy_fcgi, http2, brotli modules

Usage

Create a new test LAMP Env

To create a new LAMP local testing/developing VirtualHost, run the HTE-Cli tool with option create.

In this example, the HTE-Cli create has been aliased with the hte-create command.

After the VirtualHost setup, you can easily modify your hosts file by binding some.localdomain.test to 127.0.0.1

Delete a Test Env created via HTE-Cli

To remove a LAMP local testing/developing VirtualHost previously created with HTE-Cli Tool, run the HTE-Cli tool with option remove.

In this example, the HTE-Cli remove has been aliased with the hte-remove command.

List all Test Envs created via HTE-Cli

To list all LAMP local environments previously created with HTE-Cli Tool, run the HTE-Cli tool with option details.

In this example, the HTE-Cli details has been aliased with the hte-details command.

Credits

A big thank you goes to Nuno Maduro and Owen Voke for their Laravel Zero micro-framework.


All versions of hte-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 mfonte/hte-cli contains the following files

Loading the files please wait ....