Need help with toolbox?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jakzal
135 Stars 14 Forks MIT License 671 Commits 9 Opened issues

Description

Helps to discover and install tools

Services available

!
?

Need anything else?

Contributors list

# 14,012
PHP
Symfony
php-fra...
flex
370 commits
# 13,390
PHP
Symfony
api-pla...
php7
11 commits
# 122,036
PHP
Symfony
HTML
Compose...
6 commits
# 42,160
PHP
Laravel
guzzle
curl
3 commits
# 11,955
PHP
Symfony
framewo...
templat...
2 commits
# 117,957
Symfony
http2-p...
php7
oauth2
2 commits
# 73,386
Symfony
MySQL
nginx
php7
2 commits
# 116,639
PHP
Symfony
securit...
rabbitm...
1 commit
# 18,724
Symfony
CSS
css-fra...
bitbuck...
1 commit
# 58,799
PHP
Compose...
PHPUnit
php7
1 commit
# 12,431
PHP
Symfony
symfony...
PHPUnit
1 commit
# 60,078
Vue.js
PHP
Front e...
php7
1 commit

Toolbox

Build Status Build Status

Helps to discover and install tools.

Use cases

Toolbox started its life as a simple script in the phpqa docker image. Its purpose was to install set of tools while building the docker image and it's still its main goal. It has been extracted as a separate project to make maintenance easier and enable new use cases.

Available tools

Removed tools

Installation

Get the

toolbox.phar
from the latest release. The command below should do the job:
curl -s https://api.github.com/repos/jakzal/toolbox/releases/latest \
  | grep "browser_download_url.*toolbox.phar" \
  | cut -d '"' -f 4 \
  | xargs curl -Ls -o toolbox \
  && chmod +x toolbox

Usage

List available tools

./toolbox list-tools

Filter tools by tags

To exclude some tools from the listing multiple

--exclude-tag
options can be added. The
--tag
option can be used to filter tools by tags.
./toolbox list-tools --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar

Install tools

./toolbox install

Install tools in a custom directory

By default tools are installed in the

/usr/local/bin
directory. To perform an installation in another location, pass the
--target-dir
option to the
install
command. Also, to change the location composer packages are installed in, export the
COMPOSER_HOME
environment variable.
mkdir /tools
export COMPOSER_HOME=/tools/.composer
export PATH="/tools:$COMPOSER_HOME/vendor/bin:$PATH"
./toolbox install --target-dir /tools

The target dir can also be configured with the

TOOLBOX_TARGET_DIR
environment variable.

Dry run

To only see what commands would be executed, use the dry run mode:

./toolbox install --dry-run

Filter tools by tags

To exclude some tools from the installation multiple

--exclude-tag
options can be added. The
--tag
option can be used to filter tools by tags.
./toolbox install --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar

Test if installed tools are usable

./toolbox test

Dry run

To only see what commands would be executed, use the dry run mode:

./toolbox test --dry-run

Filter tools by tags

To exclude some tools from the generated test command multiple

--exclude-tag
options can be added. The
--tag
option can be used to filter tools by tags.
./toolbox test --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar

Tools definitions

By default the following files are used to load tool definitions:

  • resources/pre-installation.json
  • resources/architecture.json
  • resources/checkstyle.json
  • resources/compatibility.json
  • resources/composer.json
  • resources/deprecation.json
  • resources/documentation.json
  • resources/linting.json
  • resources/metrics.json
  • resources/phpstan.json
  • resources/psalm.json
  • resources/refactoring.json
  • resources/security.json
  • resources/test.json
  • resources/tools.json

Definitions can be loaded from customised files by passing the

--tools
option(s):
./toolbox list-tools --tools path/to/file1.json --tools path/to/file2.json

Tool definition location(s) can be also specified with the

TOOLBOX_JSON
environment variable:
TOOLBOX_JSON='path/to/file1.json,path/to/file2.json' ./toolbox list-tools

Tool tags

Tools can be tagged in order to enable grouping and filtering them.

The tags below have a special meaning:

  • pre-installation
    - these tools will be installed before any other tools.
  • exclude-php:7.3
    ,
    exclude-php:7.1
    etc - used to exclude installation on the specified php version.

Contributing

Please read the Contributing guide to learn about contributing to this project. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.