Alias Command

Simplify Package Names

Tired of typing out long Git URLs for every phpkg command? The alias command lets you swap them for short, memorable names. Use aliases anywhere a package URL is needed—add, remove, update—and keep your workflow smooth.


Usage

Set an alias with a name and its package URL:

phpkg alias <alias> <package-url>

Example

phpkg alias datatype https://github.com/php-repos/datatype.git

Now use it like this:

phpkg add datatype
phpkg remove datatype
phpkg update datatype
  • Multiple Aliases: Same package, different names? Go for it:
      phpkg alias observer https://github.com/php-repos/observer.git
      phpkg alias event-driven https://github.com/php-repos/observer.git
      phpkg alias ob https://github.com/php-repos/observer.git
  • Aliases are project-specific, stored in phpkg.config.json—unique per project.

Check Your Aliases

To see what aliases are set, check phpkg.config.json under the "aliases" section—aliases map to URLs there.


Related Commands

What's Next?

Share: