Skip to content

enulus/OpenPackage

Repository files navigation

OpenPackage

Npm package for OpenPackage OpenPackage Discord

OpenPackage is the package manager for AI coding.

Save and sync rules, slash commands, agents, and more.
Build reusable packages for use across multiple projects and AI coding platforms.

Learn more in the official docs: openpackage.dev/docs.

Looking to discover, download, or publish packages?
Check out the official OpenPackage registry: openpackage.dev/packages.

Note

For latest news and updates, follow the creator's X (Twitter) account @hyericlee

Installation

npm

npm install -g opkg 

Use Cases

Reuse files across multiple codebases

Reuse rules, slash commands, and more across multiple codebases.

# In current codebase
opkg save essentials
# In another codebase
opkg install essentials

Note

You can also use command openpackage instead of opkg

Sync files across multiple platforms

Automatically sync your rules, slash commands, and more across multiple platform.

# Current codebase has .cursor, .claude, .opencode directories
opkg save essentials .cursor/commands/essentials
# OpenPackage CLI automatically generates/syncs the same command files across all platforms.

# Before save:
# .cursor/commands/essentials/clean-code.md

# After save:
# .cursor/commands/essentials/clean-code.md
# .claude/commands/essentials/clean-code.md
# .opencode/command/essentials/clean-code.md

Modular management of files

Create domain specific packages for modular reuse.

# Create typescript package
opkg add typescript .cursor/rules/typescript
opkg save typescript

# Create scalable-nextjs package
opkg add scalable-nextjs .cursor/rules/nextjs
opkg save scalable-nextjs

# Create scalable-nestjs package
opkg add scalable-nestjs .cursor/rules/nestjs
opkg save scalable-nestjs

# Create mongodb package
opkg add mongodb .cursor/rules/mongodb
opkg save mongodb

# In your NextJS codebase
opkg install typescript
opkg install scalable-nextjs

# In your NestJS codebase
opkg install typescript
opkg install scalable-nestjs
opkg install mongodb

Usage

Tip

Formulas are essential to how OpenPackage works. We highly recommend reading What are Formulas? to understand how packages work.

Add files/dirs to package

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

Adds dirs or files to the package.

Save a package

opkg save <package>

Save the set of dirs and files as a package for reuse and cross-platform sync (prerelease).

Finalize/pack a package

opkg pack <package>

Save the package as a stable non-prerelease version ready for push (upload).

List packages

opkg list

Use the list command to show all packages currently saved to the local registry.

Show package details

opkg show <package>

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

Install a package

opkg install <package>

Use the install command to add all files under the specified package to the codebase at cwd.

Uninstall a package

opkg uninstall <package>

Use the uninstall command to remove all files for the specified package from the codebase at cwd.

Push a package to remote

opkg push <package>

Use the push command to upload a package to the official OpenPackage registry.

Pull a package from remote

opkg pull <package>

Use the pull command to download a package from the official OpenPackage registry to the local registry.

Tip

Learn more by heading over to the official docs.

Supported Platforms

OpenPackage performs installation and platform sync of files for supported AI coding platforms outlined by the table below.
Files and paths will be automatically converted to platform specific designations during save and install.

Note

OpenPackage only searches and includes markdown files under supported platform directories and the root ai/ directory.

Platform Directory Root file Rules Commands Agents Skills
Augment Code .augment/ rules/ commands/
Claude Code .claude/ CLAUDE.md commands/ agents/ skills/
Codex .codex/ AGENTS.md prompts/
Cursor .cursor/ AGENTS.md rules/ commands/
Factory .factory/ AGENTS.md commands/ droids/
Kilo Code .kilocode/ AGENTS.md rules/ workflows/
Kiro .kiro/ steering/
OpenCode .opencode/ AGENTS.md command/ agent/
Qwen Code .qwen/ QWEN.md agents/
Roo .roo/ AGENTS.md commands/
Warp .warp/ WARP.md
Windsurf .windsurf/ rules/

Contributing

We would love your help building the future of package management for AI coding.

Feel free to create PRs and Github issues for:

  • Bugs
  • Feature requests
  • Support for new platforms
  • Missing standard behavior
  • Documentation

Links

About

The package manager for AI coding. Sync and reuse rules, slash commands, agents, and more.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •