Publishing Skills

Once you have developed useful Optic Skills, we encourage you to share those capabilities with your team members and the community at large. This can be done by distributing your Skills using the OPM (Optic Package Manager). The OPM, like other package managers, can resolve Optic Skill packages and install them on your local Optic distribution based on references in your optic.yml files.

Repositories

Currently you can publish Skills to 3 repositories:

  • Public Registry: registry.useoptic.com
  • Locally: ${OPTIC_DATA_DIRECTORY}/packages
  • A Private Registry: yourteamregistry.host.com

    Private Registries are available with team accounts.

Creating an Account

Accounts can be created by running opticsdk createuser. Once you create an account, your credentials will be stored securely for later use. Each account is created with one namespace it can publish to, i.e. yourname:{packageName}@{version}. Team accounts can be given additional writing permissions for their team/project namespaces.

$ opticsdk createuser
email:  example@email.com
password:
namespace:  mynamespace

Adding Credentials

If you already have an account you can run opticsdk adduser to store your credentials. These credentials are only verified when you transact with the registry.

$ opticsdk adduser
email:  example@email.com
password:

Publishing a Package

Packages can be published by running opticsdk publish or opticsdk publishlocal.

$ opticsdk publish author:skill-name
or
$ opticsdk publishlocal author:skill-name

Rules that provide integrity on non-local registries:

  • Only valid Skills can be published.
  • You can only publish to a namespace for which you have write permissions.
  • With the exception of publishing locally, each version of a package is immutable once published.

Referencing a Package

Packages can be referenced in the knowledge section of your optic.yml file. When Optic loads your project it will resolve each package and its nested dependencies.

skills:
  - yournamespace:package
  - optic:mongoose@0.1.0