To install a Composer package from this website, you first need to register the package repository in your composer.json
file. There are two ways to do this:
Open your terminal or command prompt, navigate to your project directory, and run the following command:
composer config repositories.package-name.hexters.com \
'{"type": "composer", "url": "https://package-name.hexters.com"}' \
--file composer.json
This will add the custom repository source directly to your composer.json
.
Alternatively, you can manually add the repository by editing your composer.json
file at the root of your project:
{
"repositories": [
{
"type": "composer",
"url": "https://package-name.hexters.com"
}
]
}
Once the repository is configured, you can install the package just like any other Composer package. For example:
composer require hexters/package-name
During installation, Composer will prompt you for a username and password to authenticate your license:
Authentication required (package-name.hexters.com):
Username: 370463422
Password: e887ea23-515d-4622-a088-1f0911a84673
These credentials are provided after you complete a purchase on the website and can be found in the License Keys section of your account dashboard.
Once authentication is successful, Composer will save the credentials to your system, so you won’t have to enter them again for future installs or updates.
If you ever need to replace or update the stored license credentials on your system, we’ll cover that process in a separate article.