Getting Started
Learn how to install and use Mosaic CLI.
Getting Started
Mosaic is a modern package manager for Polytoria designed to be fast, secure, and developer-friendly.
Installation
Mosaic is currently distributed as a standalone binary or via Cargo.
Via Cargo (Recommended)
cargo install mosaic
Direct Download
You can download the latest binary for your operating system from our GitHub Releases.
Initialization
To start using Mosaic in your project, run the init command in your project root:
mosaic init
This will create a mosaic.toml file where you can manage your dependencies.
Adding Packages
You can add packages directly from the Mosaic Registry:
mosaic add logger@0.1.0
Mosaic will automatically:
- Resolve the version from
api.getmosaic.run. - Download the package blob.
- Inject the
ModuleScriptinto your.polyenvironment file. - Update your
mosaic.toml.
Your First Publish
To share your own packages with the community:
- Login:
mosaic login - Setup: Ensure your
mosaic.tomlhas a valid name and version. - Publish:
mosaic publish
Your package will be instantly available on the Mosaic Registry.