diff --git a/docs/docs/articles/03-package-owners-and-maintainers.md b/docs/docs/articles/03-package-owners-and-maintainers.md new file mode 100644 index 00000000..31e3747e --- /dev/null +++ b/docs/docs/articles/03-package-owners-and-maintainers.md @@ -0,0 +1,20 @@ +--- +slug: /package-owners-and-maintainers +sidebar_label: Package owners and maintainers +--- + +# Package owners and maintainers + +A package can have multiple owners and maintainers. + +Owners have full control over the package, including the ability to publish new versions, add or remove owners, and maintainers. Maintainers can publish new versions, but they cannot add or remove owners or maintainers. + +| Action | Owner | Maintainer | +|--------|-------|------------| +| Publish new versions | :heavy_check_mark: | :heavy_check_mark: | +| Add or remove owners | :heavy_check_mark: | :x: | +| Add or remove maintainers | :heavy_check_mark: | :x: | + +Use [`mops owner`](/cli/mops-owner) command to manage owners of a package. + +Use [`mops maintainer`](/cli/mops-maintainer) command to manage maintainers of a package. \ No newline at end of file diff --git a/docs/docs/cli/2-publish/05-mops-owner.md b/docs/docs/cli/2-publish/05-mops-owner.md new file mode 100644 index 00000000..38d76f31 --- /dev/null +++ b/docs/docs/cli/2-publish/05-mops-owner.md @@ -0,0 +1,50 @@ +--- +slug: /cli/mops-owner +sidebar_label: mops owner +--- + +# `mops owner` + +List, add or remove owners of a package. + +:::info +Check the [Package owners and maintainers](/package-owners-and-maintainers) for more information. +::: + +## `mops owner` +Manage owners of the current package. + +### `mops owner list` + +List all owners of the package. + +### `mops owner add` + +Add new package owner. +``` +mops owner add +``` + +### `mops owner remove` + +Remove package owner. +``` +mops owner remove +``` + +## Example + +Imagine you have a package named `hello` and you want to add the principal `2d2zu-vaaaa-aaaak-qb6pq-cai` as an owner. + +mops.toml: +```toml +[package] +name = "hello" +version = "0.1.0" +... +``` + +Add the owner: +``` +mops owner add 2d2zu-vaaaa-aaaak-qb6pq-cai +``` \ No newline at end of file diff --git a/docs/docs/cli/2-publish/05-mops-transfer-ownership.md b/docs/docs/cli/2-publish/05-mops-transfer-ownership.md deleted file mode 100644 index a6db1c8e..00000000 --- a/docs/docs/cli/2-publish/05-mops-transfer-ownership.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -slug: /cli/mops-transfer-ownership -sidebar_label: mops transfer-ownership ---- - -# `mops transfer-ownership` - -Transfer ownership of the current package to another user principal. - -``` -mops transfer-ownership -``` - -:::warning -This action cannot be undone! - -After transfering ownership, you will no longer be able to publish new versions of the package. -::: - -### Example - -Imagine you have a package named `hello` and you want to transfer ownership to the principal `2d2zu-vaaaa-aaaak-qb6pq-cai`. - -mops.toml: -```toml -[package] -name = "hello" -version = "0.1.0" -... -``` - -Transfer ownership: -``` -mops transfer-ownership 2d2zu-vaaaa-aaaak-qb6pq-cai -``` \ No newline at end of file diff --git a/docs/docs/cli/2-publish/06-mops-maintainer.md b/docs/docs/cli/2-publish/06-mops-maintainer.md new file mode 100644 index 00000000..e713d9ed --- /dev/null +++ b/docs/docs/cli/2-publish/06-mops-maintainer.md @@ -0,0 +1,50 @@ +--- +slug: /cli/mops-maintainer +sidebar_label: mops maintainer +--- + +# `mops maintainer` + +List, add or remove maintainers of a package. + +:::info +Check the [Package owners and maintainers](/package-owners-and-maintainers) for more information. +::: + +## `mops maintainer` +Manage maintainers of the current package. + +### `mops maintainer list` + +List all maintainers of the package. + +### `mops maintainer add` + +Add new package maintainer. +``` +mops maintainer add +``` + +### `mops maintainer remove` + +Remove package maintainer. +``` +mops maintainer remove +``` + +## Example + +Imagine you have a package named `hello` and you want to add the principal `2d2zu-vaaaa-aaaak-qb6pq-cai` as a maintainer. + +mops.toml: +```toml +[package] +name = "hello" +version = "0.1.0" +... +``` + +Add the maintainer: +``` +mops maintainer add 2d2zu-vaaaa-aaaak-qb6pq-cai +``` \ No newline at end of file