Cloud and BYOC for Orca Agent Engine are in Private Preview — request an invite
Docs
CLI

ork packages

Manage versioned function, source, and sink package artifacts in your Orca Workspace with the ork packages commands.

The ork packages commands manage versioned package artifacts through the Workspace registry API. A package is an uploaded artifact - a function JAR or Python or Go binary, or a source or sink NAR - that functions, sources, and sinks deploy from. These commands require the cloud.sn.io extension and are unavailable on a self-hosted engine.

Commands read --registry-url / ORCA_REGISTRY_URL and exactly one credential: --access-token / ORCA_ACCESS_TOKEN or --api-key / ORCA_API_KEY. See ork CLI for setup.

Package URLs

Package commands identify artifacts with a package URL of the form:

<type>://<package_name>[@<version>]

<type> is one of function, source, or sink. Some commands require a version (@<version>) and some require its absence:

  • list-versions takes a URL without a version, for example function://word-count.
  • get-metadata, update-metadata, upload, download, and delete take a URL with a version, for example function://word-count@1.0.0.
ork packages
├── list             List packages of a type
├── list-versions    List versions of a package
├── get-metadata     Get version metadata
├── update-metadata  Update version metadata
├── upload           Upload a version
├── download         Download a version
└── delete           Delete a version

ork packages list

List the package URLs of a given type. The --type flag is required.

ork packages list --type <type> [flags]
FlagShorthandDefaultDescription
--typePackage type: function, source, or sink. Required.
--output-otextOutput format: text, json, or yaml.
ork packages list --type function \
  --registry-url "$ORCA_REGISTRY_URL" \
  --access-token "$ORCA_ACCESS_TOKEN"

The returned URLs have no version suffix, so you can pass them straight to list-versions.

ork packages list-versions

List all uploaded versions of a package. The package URL must not include a version.

ork packages list-versions [package-url] [flags]
FlagShorthandDefaultDescription
--output-otextOutput format: text, json, or yaml.
ork packages list-versions function://word-count

ork packages get-metadata

Get the stored metadata for a specific package version. The package URL must include a version.

ork packages get-metadata [package-url] [flags]
FlagShorthandDefaultDescription
--output-otextOutput format: text, json, or yaml.
ork packages get-metadata function://word-count@1.0.0 -o yaml

ork packages update-metadata

Update the description, contact, or custom properties of a package version without re-uploading the artifact. The package URL must include a version, and at least one of --description, --contact, --properties, or --clear-properties is required.

ork packages update-metadata [package-url] [flags]
FlagShorthandDefaultDescription
--descriptionPackage description.
--contactPackage contact.
--properties-PPackage properties as key=value. Repeatable.
--clear-propertiesRemove all package properties. Cannot be combined with --properties.
ork packages update-metadata function://word-count@1.0.0 \
  --registry-url "$ORCA_REGISTRY_URL" \
  --access-token "$ORCA_ACCESS_TOKEN" \
  --description "Word count function" \
  --properties team=streaming

ork packages upload

Upload a local artifact to a specific package version. The package URL must include the type, name, and version, and --path must point to the local file. You can attach metadata at upload time with the same metadata flags as update-metadata.

ork packages upload [package-url] --path <file> [flags]
FlagShorthandDefaultDescription
--pathPath to the local package file. Required.
--descriptionPackage description.
--contactPackage contact.
--properties-PPackage properties as key=value. Repeatable.
ork packages upload function://word-count@1.0.0 \
  --registry-url "$ORCA_REGISTRY_URL" \
  --access-token "$ORCA_ACCESS_TOKEN" \
  --path ./word-count.jar \
  --description "Word count function"

ork packages download

Download the artifact for a package version to a local file. The package URL must include a version, and --path selects where the file is written.

ork packages download [package-url] --path <file>
FlagDefaultDescription
--pathPath to write the package file to. Required.
ork packages download function://word-count@1.0.0 --path ./word-count.jar

ork packages delete

Delete a specific package version from the Workspace registry. The package URL must include the version to remove.

ork packages delete [package-url]
ork packages delete function://word-count@1.0.0 \
  --registry-url "$ORCA_REGISTRY_URL" \
  --access-token "$ORCA_ACCESS_TOKEN"

What's next

On this page