zalas / toolbox
Helps to discover and install tools
Fund package maintenance!
jakzal
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 187
Watchers: 4
Forks: 27
Open Issues: 7
Type:project
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0
- psr/container: ^2.0
- symfony/console: ^5.4.31 || ^6.3
Requires (Dev)
- infection/infection: ^0.27
- phpunit/phpunit: ^10.4
- zalas/phpunit-globals: ^3.2
- dev-master / 1.x-dev
- v1.84.1
- v1.84.0
- v1.83.2
- v1.83.1
- v1.83.0
- v1.82.1
- v1.82.0
- v1.81.0
- v1.80.3
- v1.80.2
- v1.80.1
- v1.80.0
- v1.79.1
- v1.79.0
- v1.78.0
- v1.77.1
- v1.77.0
- v1.76.1
- v1.76.0
- v1.75.1
- v1.75.0
- v1.74.0
- v1.73.0
- v1.72.0
- v1.71.2
- v1.71.1
- v1.71.0
- v1.70.0
- v1.69.0
- v1.68.1
- v1.68.0
- v1.67.1
- v1.67.0
- v1.66.0
- v1.65.3
- v1.65.2
- v1.65.1
- v1.65.0
- v1.64.0
- v1.63.1
- v1.63.0
- v1.62.0
- v1.61.0
- v1.60.0
- v1.59.0
- v1.58.0
- v1.57.0
- v1.56.0
- v1.55.1
- v1.55.0
- v1.54.2
- v1.54.1
- v1.54.0
- v1.53.0
- v1.52.0
- v1.51.1
- v1.51.0
- v1.50.2
- v1.50.1
- v1.50.0
- v1.49.0
- v1.48.0
- v1.47.1
- v1.47.0
- v1.46.1
- v1.46.0
- v1.45.5
- v1.45.4
- v1.45.3
- v1.45.2
- v1.45.1
- v1.45.0
- v1.44.0
- v1.43.1
- v1.43.0
- v1.42.0
- v1.41.0
- v1.40.1
- v1.40.0
- v1.39.1
- v1.39.0
- v1.38.0
- v1.37.0
- v1.36.0
- v1.35.1
- v1.35.0
- v1.34.0
- V1.33.1
- v1.33.0
- v1.32.0
- v1.31.1
- v1.31.0
- v1.30.0
- v1.29.1
- v1.29.0
- v1.28.0
- v1.27.9
- v1.27.8
- v1.27.7
- v1.27.6
- v1.27.5
- v1.27.4
- v1.27.3
- v1.27.2
- v1.27.1
- v1.27.0
- v1.26.1
- v1.26.0
- v1.25.0
- v1.24.2
- v1.24.1
- v1.24.0
- v1.23.3
- v1.23.2
- v1.23.1
- v1.23.0
- v1.22.1
- v1.22.0
- v1.21.0
- v1.20.1
- v1.20.0
- v1.19.1
- v1.19.0
- v1.18.1
- v1.18.0
- v1.17.2
- v1.17.1
- v1.17.0
- v1.16.2
- v1.16.1
- v1.16.0
- v1.15.3
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.1
- v1.14.0
- v1.13.1
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.9
- v1.6.8
- v1.6.7
- v1.6.6
- v1.6.5
- v1.6.4
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.5
- v1.5.4
- v1.5.3
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.7
- v1.4.6
- v1.4.5
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.0
- v0.0.2
- v0.0.1
- dev-build-fix
This package is auto-updated.
Last update: 2024-11-06 22:18:03 UTC
README
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 -Ls https://github.com/jakzal/toolbox/releases/latest/download/toolbox.phar -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:8.2 --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:8.2 --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:8.2 --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:8.1
,exclude-php:8.2
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.