sfdx-project.json
file which defines all the details about an unlocked package.force:package:version:create
command).sfdx:force:package:create
command, and specify its path and settings assuming all of the code exists. List Package1 as a dependency. sfdx:force:package:list
to list all of the packages in your org from the CLI. Copy down the name, and '0Ho' ID of Package2, and enter it as a field in packageAliases.sfdx:force:package:version:create
with its dependencies linked to Package1.