Download the PHP package danbettles/command-line-tools without Composer

On this page you can find all versions of the php package danbettles/command-line-tools. 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 command-line-tools

Command-Line Tools

Skip to installation instructions.

This library comprises just a few basic classes that make it easier to write command-line PHP scripts. There are helpers for running external programs, and methods for sending formatted messages to the output. Use this library when the might of something like Symfony Console would be like taking a sledgehammer to a thumbtack.

The main component classes are Host.

Output

Displays messages on the screen; it provides methods that output messages in different styles.

For example:

Run php tests/show_output_formats.php to see what Output can do.

MessageFormatter

Provides a fluent interface for creating formatted messages. It uses a CSS-like approach, using CSS naming conventions whenever possible, to make the job easier, more intuitive, for web developers.

For example, both of the following calls will create the same bold white message on a bright red background.

When creating a Formatter from an array of style declarations, you can use either CSS-style kebab-case names or camel-case names.

MessageFormatter will automatically use a contrasting colour for the foreground if only the background colour is set.

See the section on the available styles, below, to see what you can do.

Style Reference

Property Formatter Method Valid Values
visibility[^1] visibility hidden\|visible
font-weight fontWeight normal\|bold\|thin[^2]
font-style fontStyle normal\|italic[^1]
text-decoration textDecoration none\|underline
color[^3] color initial\|teal\|aqua\|black\|gray\|navy\|blue\|purple\|fuchsia\|green\|lime\|maroon\|red\|olive\|yellow\|silver\|white
background-color[^3] backgroundColor initial\|teal\|aqua\|black\|gray\|navy\|blue\|purple\|fuchsia\|green\|lime\|maroon\|red\|olive\|yellow\|silver\|white

[^1]: Not widely supported by terminals. [^2]: Non-standard name. [^3]: Responds to CSS Level-1 named colours.

Run php tests/show_styles.php to see the effect of each of the style settings—and whether or not a style is supported by your terminal.

Host

Provides a helpful passthru() wrapper that echoes the command it's executing in addition to its output, and, by default, throws an exception if something goes wrong.

For example:

Installation

No dependencies other than PHP 7+.

Install using Composer by running composer require danbettles/command-line-tools.

References


All versions of command-line-tools with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.1.3
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 danbettles/command-line-tools contains the following files

Loading the files please wait ....