Currently, there are two options for installing phpkg
.
Both of these methods are going to install it in your home directory,
so you can get access to it from any path and use it as all your projects’ package managers.
You need to have unzip
and git
installed on your machine as well as PHP version >= 8.1
with php-mbstring
, php-zip
, and php-curl
extensions installed.
First step is to download required files. You can do it automatically or manually.
Note
These installer work on Unix/Linux and macOS systems. Support for windows will be added soon.
Using the installer will be the easiest method. You can simply run the following line, and you should have it ready to use:
bash -c "$(curl -fsSL https://raw.github.com/php-repos/phpkg-installation/master/install.sh)"
This command will make a .phpkg
directory in your home directory and,
it installs the required source files under this directory.
It also adds its source directory to your $PATH
so you can easily start to use it.
You need to open a new terminal to be able to use commands on phpkg
.
You can manually install it by following these steps:
.phpkg
CLI
package from github.phpkg/Packages/php-repos/cli
Datatype
package from github.phpkg/Packages/php-repos/datatype
FileManager
package from github.phpkg/Packages/php-repos/file-manager
ControlFlow
package from github.phpkg/Packages/php-repos/control-flow
credentials.example.json
to credentials.json
$PATH
.bashrc
/.zshrc
filephpkg --help
and you should see the help.If you used the installer, a path to phpkg
has been added to your source file (.bashrc
or .zshrc
).
You need to either, open a new terminal or source your current terminal to get access to new added path.