Serverless Registry Developer Tools

中文 | English

This tool is a Serverless Registry management tool based on Serverless Devs Component. With this tool, you can:

For how to develop Package, please refer to related questions:

  1. For the relationship between Serverless Package, Serverless Devs and Serverless Registry, please refer to SDM Specification Document
  2. About what is Serverless Registry and Serverless Registry Model Specification, please refer to SRM Specification Document

  • It should be noted that this tool only supports publishing packages to the default registry ( If you want to publish to other registries, you can refer to:
  • If it is a Github or Gitee source, you only need to create a repository and release a version. For example, a demo repository is created under the devsapp organization of Github, and a Release is released. At this time, you can directly switch the source to Github source , and write the component as organization name/repository name, such as devsapp/demo, the system can automatically detect and load related components;
  • If it is another Registry that complies with the SRM specification, you can provide the Registry according to the The platform determines the relevant tools;

Login function: login

Before operating the Registry, there needs to be an identity verification logic (for example, you can only update packages belonging to you, etc.), so before using the Registry function, you need to perform login-related operations.

There are two modes of login:

  • Mode 1: You already have the token information after login, you can use s cli registry login --token <token> to directly configure the token;
  • Mode 2: There is no token information after login, or the Serverless Registry has not been registered. At this time, you can directly open the browser through s cli registry login, and log in and authorize according to the operation prompts. When the page is displayed as follows, it means that Successful landing: picture alt At this point, you can also see a successful reminder on the client side: picture alt
  • It should be noted that Serverless Registry does not provide additional registration functions, and only relies on Github authorization operations for user identity identification. If you have any questions in the later use process, please send an email to for communication communicate with.

todo: Since China opens Github, it will be tested by the network, so there is room for optimization in the login link

Publish Package: publish

This operation needs to be done after completing the login link.

Under the project that conforms to the specification of Serverless Package, you can pass the publish command, Publish the component.

For example, you can directly execute: s cli registry publish

For the directory structure of Package and related values ​​and specifications, please refer to Package Model;

View the list of Package: list

This operation needs to be done after completing the login link.

Use the list command to view the components published by the currently logged in Serverless Registry account, for example: s cli registry list:

$ s cli registry list
- package: ros-test
  description: Deploy the project through Alibaba Cloud ROS
  version: 0.0.10
- package: fc-core
  description: FC public component
  version: 0.0.7
- package: fc
  description: Alibaba Cloud Function Computing Basic Components
  version: 0.1.38

View the version information of a package: versions

Use the versions command to view the valid version information of the specified package.

The command has one parameter:

  • name: Indicates the Package name

Operation example: s cli registry versions --name fc:

$ s cli registry versions --name fc
PackageName: fc
  - tag_name: 0.1.38
    published_at: '2022-01-18T03:32:08.511Z'
  - tag_name: 0.1.37
    published_at: '2022-01-07T07:57:17.327Z'
  - tag_name: 0.1.36
    published_at: '2022-01-04T13:53:16.579Z'
  - tag_name: 0.1.35
    published_at: '2021-12-30T07:30:11.873Z'

View the specified version information of a Package: detail

Use the detail command to view information about a package of a specified version.

The command has one parameter:

  • name-version: The name and version of the Package, linked by the @ symbol, for example: demo@0.0.1

Operation example: s cli registry detail --name-version fc-builda@0.0.1:

$ s cli registry detail --name-version fc-builda@0.0.1
tag_name: 0.0.1
published_at: '2022-01-21T03:58:55.316Z'

Delete Package: delete

This operation needs to be done after completing the login link.

The delete command can delete the specified version of the specified package. For example, in some cases, the release version fails, and the rollback operation can be performed by deleting the version.

It should be noted here that the version is the only one that exists. Even if it is deleted here, the package with the changed version number cannot be released. For example, due to some circumstances, the 0.0.3 version of the demo component is deleted. After the deletion is completed, when a new version is republished, the version number needs to be greater than 0.0.3;

The command has two parameters:

  • name-version: the name and version of the Package, linked by the @ symbol, e.g. Such as: demo@0.0.1
  • type: Package type, the value is Component or Application

Operation example: s cli registry delete --name-version wordpress@0.0.1 --type Component

$ s cli registry delete --name-version wordpress@0.0.1 --type Component
result: Succeed

Update Token: retoken

This operation needs to be done after completing the login link.

If the Token information of the Serverless Registry is leaked due to some circumstances, you can reset it through the retoken command. For example: s cli registry retoken

Execution effect:

$ s cli registry retoken
Serverless Registry login token reset succeeded.
End of method: retoken

Get login token

This operation needs to be done after completing the [login link](#login function login).

The token information can be obtained through the token command.

Execution effect:

$s cli registry token
Token: Swf*********At

Scenarios of using token independently: you need to publish some packages in the pipeline, you can get the token, and configure the token through s cli registry login --token xxxxx in the pipeline.

Use the search command to search for related package information.

The command has two parameters:

  • keyword: search keyword
  • type: Package type, the value is Component or Application, Plugin

Operation example: s cli registry delete --name-version wordpress@0.0.1 --type Component

$ s cli registry search --type plugin
  name: core
  description: Serverless Devs Demo
    tag_name: dev
    published_at: 2022-03-27T10:13:40.131Z
  name: fc-package
  description: demo
    tag_name: 0.0.3
    published_at: 2022-01-17T09:07:04.315Z

Package development best practices:

Exchange community

If you have feedback about bugs or future expectations, you can post them in Issues and Discussions for feedback and exchanges. If you'd like to join our discussion group or keep up to date with Serverless Devs, you can do so through the following channels:

Follow WeChat Official Account: serverless
Contact WeChat Assistant: xiaojiangwh
Join DingTalk Group: 33947367

Edit this page on GitHub Updated at Fri, Nov 24, 2023