Quick Start

Introducing OpenPackage, the package manager for AI coding.

Install CLI

Terminal
npm install -g opkg

Create a package

Terminal
opkg init <package-name>
You can also use openpackage command instead of opkg.

Add files/dirs to package

Terminal
opkg add <package-name> <path-to-dir-or-file>

Adds the specified directory or file to the package. See add for detailed usage and more ways to use the add command.
You can also manually move files into the .openpackage/packages/<package-name>/ dir under respective dirs.

Terminal
# Example opkg add essentials .cursor/rules/essentials opkg add essentials .cursor/rules/essentials-overview.md opkg add essentials .cursor/commands/essentials
Packages are essential to how OpenPackage works. We highly recommend reading Packages to understand how packages are structured and installed.

Save a package

Terminal
opkg save <package-name>

Save the marked set of files in a codebase as a package for reuse and cross-platform sync.
Using the save command creates prerelease (wip) versions for quick iteration. See save for detailed usage and more ways to use the save command.

Terminal
# Example opkg save essentials

Finalize/pack a package

Terminal
opkg pack <package-name>

Save the package as a stable version. Using the pack command creates a stable non-prerelease version ready for push (upload). See pack for detailed usage and more ways to use the save command.

Terminal
# Example opkg save essentials

List packages

Terminal
opkg list

Use the list command to show all packages currently saved to the local registry.
See list for more details and options.

Show package details

Terminal
opkg show <package-name>

The show command outputs the details of the package and lists all included files.
See show for more details.

Install a package

Terminal
opkg install <package-name>

Use the install command to add all files under the specified package to the codebase at cwd (current working directory).
See install for more details and options.

Uninstall a package

Terminal
opkg uninstall <package-name>

Use the uninstall command to remove all files for the specified package from the codebase at cwd.
See uninstall for more details and options.

Push a package to remote

Terminal
opkg push <package-name>

Use the push command to upload a package to the official OpenPackage registry. See push for more details, see configure to setup auth with api keys.

Pull a package from remote

Terminal
opkg pull <package-name>

Use the pull command to download a package from the official OpenPackage registry to the local registry. See pull for more details, see configure to setup auth with api keys.