Developing with Other Packages

At times you may wish to develop with another package, whether you want to fix a bug, add a new feature, or simply fork it and make it your own. This page explains all the commands available for these types of operations.

Checkout Package

You may checkout any package you have write access to, which includes all packages that have an access level of "public". To checkout a package simply use the package checkout CLI Command, for example to checkout the users package:

apex package checkout users

This will download the package from the repository, and place it under version control. Unless you have write access to the main / trunk branch, you will need to create a new branch with thebranch create CLI command, such as:

apex branch create <PACKAGE> <BRANCH_NAME>

You may then begin developing as normal, and run the standard apex commit CLI command when necessary. Once you have completed the desired modifications, you may submit a PR. To do so, login to your Apex account within your web browser, then visit the code repository at:<AUTHOR>/<PACKAGE>/

From the issues tab there will be a link allowing you to create a new issue.

Close Package

When you are done with a package, you may close it with the package close CLI command, such as:

apex package close <PACKAGE>

Once closed, any future work you complete on the package will not be tracked as the package is no longer under version control.

Fork Package

Sometimes you may wish to fork a package and make it your own. This can be done with the package fork CLI command, for example:

apex package fork <FROM_PACKAGE> <TO_PACKAGE>

The first argument is the package you would like to fork, and the second argument is the alias of the package you would like to create on your local machine and have the package forked into. This will also refactor the code as necessary and modify the namespace and use statements with the correct package alias as necessary.