Authors
Sign in with GitHub to publish tins, manage your publish token, and delete versions or tins you own.
Publishing a tin
A tin is a public git repo with a shelf.toml at its root:
name = "lightbug_http"
version = "0.2.0"
description = "HTTP framework for Mojo"
tags = ["http", "networking"]
# other tins this one depends on; omit if none
tins = ["small_time"]
description, tags and tins are
optional; the registry re-reads all three from shelf.toml on
every publish. Dependencies must already be registered tins.
Publishing it
Install the CLI once — this provides both shelf and the
pixi shelf extension:
pixi global install --channel https://mojoshelf.org/channel mojoshelf
No pixi? cargo install --locked --git
https://github.com/mojoshelf/mojoshelf mojoshelf works too.
Then, from the tin's repo root:
export SHELF_TOKEN=shelf_... # generate one above; shown only once
shelf publish
That reads shelf.toml, records the commit HEAD
points at, and registers the version. Publishing a new version is the same
three steps every time: bump version, commit and push, run
shelf publish again.
It refuses to publish rather than record something nobody can reproduce, so expect to be sent back for any of these:
- no
shelf.tomlin the current directory — run it from the repo root, not a subdirectory versionis not valid semver- the working tree is dirty — commit or stash first
HEADis not on any remote branch — push first, because the registry pins that exact commit- no
originremote to take a public URL from
Naming: the tin name doubles as a conda package name in
pixi mode, so pick one that no conda package already uses
(pixi search <name>) — bindings conventionally take an
-mojo suffix, while the Mojo import name stays natural. See
install modes.