Skip to main content
Version: 3.x (unreleased)

mops add

Install a specific package and save it to mops.toml

mops add <package_name>

Examples

Install latest base package from mops registry

mops add base

Install specific version of base package from mops registry

mops add base@0.10.0

Add package from GitHub

mops add https://github.com/caffeinelabs/motoko-base

For GitHub-packages you can specify branch, tag, or commit hash by adding #<branch/tag/hash>

mops add https://github.com/caffeinelabs/motoko-base#moc-0.9.1

Add local package

mops add ./shared

Options

--dev

Add package to [dev-dependencies] section.

--verbose

Verbose output.

The lockfile is always kept in sync — there is no flag to opt out.