Skip to content

Commit f317735

Browse files
committed
update xrepo docs
1 parent 1018550 commit f317735

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

docs/guide/package-management/repository-management.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# Repository Management
22

3-
We can use `xmake repo` to manage repositories, and we also provide a more convenient, independent `xrepo` package manager command to install, uninstall, find, and manage packages globally.
3+
::: warning Important Note
4+
**`xmake repo` is only used for local package repository management within the current project**, scoped to the current project.
5+
6+
If you need to **manage repositories globally** (add, remove, view repositories), you should use the **`xrepo` CLI** command, for example:
7+
- `xrepo add-repo myrepo https://github.com/mygroup/myrepo` - Add repository globally
8+
- `xrepo rm-repo myrepo` - Remove repository globally
9+
- `xrepo list-repo` - View all global repositories
410

511
For detailed documentation, see: [Getting Started with Xrepo Commands](/guide/package-management/xrepo-cli)
12+
:::
13+
14+
We can use `xmake repo` to manage repositories for the **current project**, and we also provide a more convenient, independent `xrepo` package manager command to install, uninstall, find, and manage packages **globally**.
615

716
```sh
817
$ xmake repo --add myrepo [email protected]:myrepo/xmake-repo.git

docs/guide/package-management/xrepo-cli.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ We only need to install xmake to use the xrepo command. About the installation o
3636

3737
## Support distributed repository
3838

39+
::: tip Difference from xmake repo
40+
**`xrepo` CLI is used for global repository management**, applicable to all projects. The `xmake repo` command is only used for local package repository management within the current project.
41+
42+
If you need to manage repositories globally (add, remove, view repositories), you should use the `xrepo` command.
43+
:::
44+
3945
In addition to directly retrieving the installation package from the official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo).
4046

4147
We can also add any number of self-built repositories, and even completely isolate the external network, and only maintain the installation and integration of private packages on the company's internal network.
@@ -46,6 +52,18 @@ Just use the following command to add your own repository address:
4652
$ xrepo add-repo myrepo https://github.com/mygroup/myrepo
4753
```
4854

55+
We can also remove an added repository:
56+
57+
```sh
58+
$ xrepo rm-repo myrepo
59+
```
60+
61+
Or view all added global repositories:
62+
63+
```sh
64+
$ xrepo list-repo
65+
```
66+
4967
## Seamless integration with xmake project
5068

5169
```lua

docs/zh/guide/package-management/repository-management.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# 仓库管理命令 {#repository-management}
22

3-
我们可以使用 `xmake repo` 来管理仓库,同时也提供了更为便捷的独立 `xrepo` 包管理器命令,用于全局安装、卸载和查找包。
3+
::: warning 重要提示
4+
**`xmake repo` 仅用于当前工程下的本地包仓库管理**,作用域限制在当前项目内。
5+
6+
如果需要**全局管理仓库**(添加、删除、查看仓库),应该使用 **`xrepo` CLI** 命令,例如:
7+
- `xrepo add-repo myrepo https://github.com/mygroup/myrepo` - 全局添加仓库
8+
- `xrepo rm-repo myrepo` - 全局删除仓库
9+
- `xrepo list-repo` - 查看所有全局仓库
410

511
详细文档见:[Xrepo 命令使用入门](/zh/guide/package-management/xrepo-cli)
12+
:::
13+
14+
我们可以使用 `xmake repo` 来管理**当前工程**的仓库,同时也提供了更为便捷的独立 `xrepo` 包管理器命令,用于**全局**安装、卸载和查找包。
615

716
```sh
817
$ xmake repo --add myrepo [email protected]:myrepo/xmake-repo.git

docs/zh/guide/package-management/xrepo-cli.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ Xrepo 是一个基于 [Xmake](https://github.com/xmake-io/xmake) 的跨平台 C/
3636

3737
## 分布式仓库支持
3838

39+
::: tip 与 xmake repo 的区别
40+
**`xrepo` CLI 用于全局管理仓库**,适用于所有项目。而 `xmake repo` 命令仅用于当前工程下的本地包仓库管理。
41+
42+
如果需要全局管理仓库(添加、删除、查看仓库),应该使用 `xrepo` 命令。
43+
:::
44+
3945
除了可以直接从官方仓库:[xmake-repo](https://github.com/xmake-io/xmake-repo) 检索安装包之外,
4046
我们还可以添加任意多个自建仓库,甚至可以完全隔离外网,仅在公司内部网络维护私有包的安装集成。
4147

@@ -45,6 +51,18 @@ Xrepo 是一个基于 [Xmake](https://github.com/xmake-io/xmake) 的跨平台 C/
4551
$ xrepo add-repo myrepo https://github.com/mygroup/myrepo
4652
```
4753

54+
我们也可以移除已添加的仓库:
55+
56+
```sh
57+
$ xrepo rm-repo myrepo
58+
```
59+
60+
或者查看所有已添加的全局仓库:
61+
62+
```sh
63+
$ xrepo list-repo
64+
```
65+
4866
## 与 xmake 的工程无缝集成
4967

5068
```lua

0 commit comments

Comments
 (0)