Skip to content

apkg add

The add command downloads a package from the registry, extracts it into your project, and records it as a dependency in apkg.json. It also updates apkg-lock.json to pin the resolved version and integrity hash.

An apkg.json manifest must already exist in the current directory. Run apkg init first if you haven’t already.

Terminal window
apkg add <package> [--setup <tool>] [--no-setup]

The <package> argument accepts several formats:

FormatExampleBehavior
@scope/name@acme/code-reviewerInstalls the latest tagged version
@scope/name@<version>@acme/code-reviewer@1.2.0Installs an exact version
@scope/name@<tag>@acme/code-reviewer@betaInstalls the version behind a dist-tag
OptionDescription
--setup <tool>Generate configuration for a specific tool (e.g. claude-code)
--no-setupSkip post-install tool setup entirely

When no version is specified, apkg resolves the latest dist-tag. If no latest tag exists, it falls back to the highest published semver version.

The resolved version is saved in apkg.json as a caret range (e.g. ^1.2.0), allowing compatible updates via apkg update.

After installing a package of type skill or agent, apkg can automatically generate configuration files for your AI coding tools. Use --setup claude-code to target a specific tool, or --no-setup to skip setup entirely. See Tool Setup Explained for how detection, precedence, and file generation work.

Add a package:

Terminal window
apkg add @acme/code-reviewer

Add a specific version:

Terminal window
apkg add @acme/code-reviewer@1.2.0

Add a package and set up Claude Code configuration:

Terminal window
apkg add @acme/code-reviewer --setup claude-code

Add a package without running tool setup:

Terminal window
apkg add @acme/code-reviewer --no-setup
CommandDescription
initCreate an apkg.json manifest
configSet defaultSetup to control automatic tool setup
removeRemove a package from your dependencies
installInstall all dependencies from apkg.json
updateUpdate packages to latest compatible versions