diff --git a/docs/en/_sidebar.md b/docs/en/_sidebar.md index 89e3d2c..1e12e00 100644 --- a/docs/en/_sidebar.md +++ b/docs/en/_sidebar.md @@ -13,6 +13,8 @@ - [Create a Tool](tutorials/create_a_tool.md) + - [Submit Your Tooth to Lip Registry](tutorials/submit_your_tooth_to_lip_registry.md) + - Commands - [lip](commands/lip.md) diff --git a/docs/en/commands/lip_install.md b/docs/en/commands/lip_install.md index 169b5fc..0dd5dd1 100644 --- a/docs/en/commands/lip_install.md +++ b/docs/en/commands/lip_install.md @@ -34,10 +34,16 @@ Note that `lip install` prefers to leave the installed version as-is unless `--u When looking at the items to be installed, Lip checks what type of item each is, in the following order: -1. Tooth repository, which can be accessed via Goproxy. +1. Remote tooth file with suffix `.tth` and prefix `http://` or `https://`. 2. Local tooth file with suffix `.tth`. +3. Tooth repository, which can be accessed via Goproxy. +4. Tooth alias, which can be looked up in Lip registry. -In the first case, all letters will be converted to lowercase before processing. +In 3 and 4, all letters will be converted to lowercase before processing. + +### Lip Registry + +Since v0.8.0, Lip supports Lip registry, which enables you to use aliases to install teeth. By default, Lip will use the registry at . You can also use your own registry by setting environment variable `LIP_REGISTRY` to the URL of your registry. ### Satisfying Requirements @@ -104,4 +110,10 @@ Install from a local tooth: ```shell lip install example.tth lip install ./example/example.tth +``` + +Install with an alias: + +```shell +lip install liteloaderbds ``` \ No newline at end of file diff --git a/docs/en/tutorials/submit_your_tooth_to_lip_registry.md b/docs/en/tutorials/submit_your_tooth_to_lip_registry.md new file mode 100644 index 0000000..bc6fb72 --- /dev/null +++ b/docs/en/tutorials/submit_your_tooth_to_lip_registry.md @@ -0,0 +1,49 @@ +# Tutorial: Submit Your Tooth to Lip Registry + +Since v0.8.0, Lip supports looking up teeth from a registry and installing them. You can submit your tooth to the registry to make it easier for others to install your tooth. + +In this tutorial, we will submit a tooth to the official Lip registry (). + +## Create a Lip Tooth + +Follow the [Create a Lip Tooth](tutorials/create_a_lip_tooth.md) tutorial to create a Lip tooth. Make sure that you have a `tooth.json` file in the root directory of your tooth. And the **tooth** field is right the repository path of your tooth. + +## Submit Your Tooth to Lip Registry + +To submit your tooth to the registry, you need to create a pull request to the registry repository (). + +You should create a new file in the `teeth` directory. The file name should be the alias of your tooth. The file content should be a simplified version of your `tooth.json`. The file content should be in JSON format and should contain the following fields. In this example, the alias of the tooth is `exampletool`. Therefore, the file name is `exampletool.json`. + +```json +{ + "format_version": 1, + "tooth": "example.com/exampleuser/exampletool", + "information": { + "name": "Example Tool", + "description": "An example tool", + "author": "Example User", + "license": "MIT", + "homepage": "example.com" + } +} +``` + +Unlike the `tooth.json` under your tooth repository, every field in the registry file is required. The `format_version` field should be `1`. + +After you create the file, you can create a pull request to the registry repository. The registry maintainers will review your pull request and merge it if it is valid. + +## Install Your Tooth from Lip Registry + +After your tooth is submitted to the registry, everyone can install it from the registry. You can use the `lip install` command to install your tooth from the registry. + +```bash +lip install exampletool +``` + +## Update Your Tooth in Lip Registry + +If you want to update your tooth in the registry, you need to update the registry file. You can update the registry file in the same way as submitting your tooth to the registry. The registry maintainers will review your pull request and merge it if it is valid. + +## Remove Your Tooth from Lip Registry + +If you want to remove your tooth from the registry, you need to remove the registry file. You can remove the registry file in the same way as submitting your tooth to the registry. The registry maintainers will review your pull request and merge it if it is valid. \ No newline at end of file diff --git a/docs/zh-Hans/_sidebar.md b/docs/zh-Hans/_sidebar.md index e7fe13c..9a9e016 100644 --- a/docs/zh-Hans/_sidebar.md +++ b/docs/zh-Hans/_sidebar.md @@ -11,6 +11,8 @@ - [创建一个Tooth包](tutorials/create_a_lip_tooth.md) - [创建一个工具](tutorials/create_a_tool.md) + + - [Submit Your Tooth to Lip Registry](tutorials/submit_your_tooth_to_lip_registry.md) - 命令 diff --git a/docs/zh-Hans/commands/lip_install.md b/docs/zh-Hans/commands/lip_install.md index 9d8a13e..ec8f59c 100644 --- a/docs/zh-Hans/commands/lip_install.md +++ b/docs/zh-Hans/commands/lip_install.md @@ -34,10 +34,16 @@ lip install [options] 在查看要安装的项目时,Lip按以下步骤检查每个项目是什么类型的: -1. 可以通过Goproxy访问tooth存储库. -2. 带有tth后缀的本地tooth文件 `.tth`. +1. Remote tooth file with suffix `.tth` and prefix `http://` or `https://`. +2. Local tooth file with suffix `.tth`. +3. Tooth repository, which can be accessed via Goproxy. +4. Tooth alias, which can be looked up in Lip registry. -在第一种情况下,所有字母在处理前将被转换为小写。 +In 3 and 4, all letters will be converted to lowercase before processing. + +### Lip Registry + +Since v0.8.0, Lip supports Lip registry, which enables you to use aliases to install teeth. By default, Lip will use the registry at . You can also use your own registry by setting environment variable `LIP_REGISTRY` to the URL of your registry. ### 安装依赖 @@ -105,4 +111,10 @@ lip install https://example.com/example.tth ```shell lip install example.tth lip install ./example/example.tth +``` + +Install with an alias: + +```shell +lip install liteloaderbds ``` \ No newline at end of file diff --git a/docs/zh-Hans/tutorials/submit_your_tooth_to_lip_registry.md b/docs/zh-Hans/tutorials/submit_your_tooth_to_lip_registry.md new file mode 100644 index 0000000..bc6fb72 --- /dev/null +++ b/docs/zh-Hans/tutorials/submit_your_tooth_to_lip_registry.md @@ -0,0 +1,49 @@ +# Tutorial: Submit Your Tooth to Lip Registry + +Since v0.8.0, Lip supports looking up teeth from a registry and installing them. You can submit your tooth to the registry to make it easier for others to install your tooth. + +In this tutorial, we will submit a tooth to the official Lip registry (). + +## Create a Lip Tooth + +Follow the [Create a Lip Tooth](tutorials/create_a_lip_tooth.md) tutorial to create a Lip tooth. Make sure that you have a `tooth.json` file in the root directory of your tooth. And the **tooth** field is right the repository path of your tooth. + +## Submit Your Tooth to Lip Registry + +To submit your tooth to the registry, you need to create a pull request to the registry repository (). + +You should create a new file in the `teeth` directory. The file name should be the alias of your tooth. The file content should be a simplified version of your `tooth.json`. The file content should be in JSON format and should contain the following fields. In this example, the alias of the tooth is `exampletool`. Therefore, the file name is `exampletool.json`. + +```json +{ + "format_version": 1, + "tooth": "example.com/exampleuser/exampletool", + "information": { + "name": "Example Tool", + "description": "An example tool", + "author": "Example User", + "license": "MIT", + "homepage": "example.com" + } +} +``` + +Unlike the `tooth.json` under your tooth repository, every field in the registry file is required. The `format_version` field should be `1`. + +After you create the file, you can create a pull request to the registry repository. The registry maintainers will review your pull request and merge it if it is valid. + +## Install Your Tooth from Lip Registry + +After your tooth is submitted to the registry, everyone can install it from the registry. You can use the `lip install` command to install your tooth from the registry. + +```bash +lip install exampletool +``` + +## Update Your Tooth in Lip Registry + +If you want to update your tooth in the registry, you need to update the registry file. You can update the registry file in the same way as submitting your tooth to the registry. The registry maintainers will review your pull request and merge it if it is valid. + +## Remove Your Tooth from Lip Registry + +If you want to remove your tooth from the registry, you need to remove the registry file. You can remove the registry file in the same way as submitting your tooth to the registry. The registry maintainers will review your pull request and merge it if it is valid. \ No newline at end of file