The cloud CLI
Build insty projects and manage dependencies with the cloud package manager.
cloud is the package manager and build tool. It reads a config.toml, drives the compiler, and
resolves dependencies from the registry at pkg.insty.land.
Common commands
cloud init # scaffold a new project (interactive)
cloud build # compile the project
cloud run # build and run
cloud test # build and run tests
cloud clean # remove build artifacts
cloud install @owner/pkg # add a dependency
cloud update # update dependencies
cloud publish --name @owner/pkg --version 0.1.0
cloud yank --name @owner/pkg --version 0.1.0 config.toml
[project]
name = "@owner/app"
version = "0.1.0"
main = "src/main.ins"
module = "main"
[compiler]
optimization_level = 0
output_format = "executable"
[paths]
module_search_paths = [".", "src"]
output_dir = ".cloud/objects"
[dependencies]
# "@owner/package" = "^1.0.0" Dependencies are staged under .cloud/ and imported by their scoped path โ @owner/package becomes import owner::package.
Environment variables
| Variable | Purpose |
|---|---|
INSTY_COMPILER | Override the compiler path used by cloud |
CLOUD_CONFIG | Override the default config.toml path |
CLOUD_REGISTRY_URL | Override the package registry URL |
CLOUD_TOKEN | Registry bearer token (create one in your account) |
Publishing
Create an API token with the publish scope in your account, export it as CLOUD_TOKEN, then:
cloud publish --name @owner/pkg --version 0.1.0 You can publish only under your own @owner namespace.
See also: the standard library.