Skip to content

Lema Cloud and LemaHub

How the hosted service shares checked revisions between accounts, how LemaHub presents published projects, and which parts of the pilot are open today.

A Lema project lives in a local store, and semantic version control works inside that store. As soon as a second person or a second machine joins, you need a shared place for the project’s references: somewhere both sides can push revisions to, fetch from and publish under a policy. Lema Cloud is that place. It is a hosted Lema store, run in the EU, that keeps each project’s references, history and held candidates, and applies the same publication rules as your local store.

LemaHub is the read-only side. It turns a published revision into static, statement-first web pages, so a reader can browse a project’s declarations, sources and history, or search them by name, without a Lema installation.

Why the service checks again

When you push, your machine has already checked every module with the Lean kernel. The service does not take your word for it. It checks the revision again from source, with the same pinned Lean, and only then applies the reference’s policy: who may publish, whether the revision’s first parent is the current head, and which evidence and reviews the policy asks for.

The same distrust runs in the other direction. lema clone and lema fetch check every object they download on your machine before your workspace uses it. Neither side relies on the other’s receipts, which is the same rule lema import follows for a bundle (Export and import a project or library bundle).

Content addressing keeps transfer small: a push sends only the objects the hosted store does not hold yet. Checking is a different matter. The service checks the project’s history again on each push, so a large or long-lived project can eventually exceed the pilot’s per-push limits and be refused.

Accounts, roles and held candidates

An account starts from an invitation. lema cloud signup consumes it and stores a credential under ~/.config/lema, bound to the service’s address; the client never sends it anywhere else. Handles are permanent.

Each project grants roles to accounts:

  • an owner creates the project and, under a new project’s policy, is the only account that may publish;
  • a writer may push revisions;
  • a reader may clone and fetch;
  • a deployer may deploy the project’s apps, and cannot download its source with that role alone.

When a writer pushes a revision the policy does not let them publish, the service still checks it and keeps it as a held candidate (422 review_required). The owner fetches that exact revision, checks it out and pushes it under their own authority. If the reference moved in the meantime, the push answers 409 ref_conflict and the writer fetches, merges and pushes again. Develop a library on the private Cloud pilot walks through the whole exchange.

Two addresses

api.cloud.lema-lang.org is the service. Every authenticated command (lema cloud, lema clone, lema fetch, lema push, lema activity --remote) talks to it over TLS 1.3.

hub.lema-lang.org serves LemaHub’s public pages. A published project’s pages are at https://hub.lema-lang.org/@PROJECT/.

What LemaHub shows

A project appears on the Hub only when its publication is turned on; during the pilot, that happens on request. For each published revision, the Hub shows the project alone: its modules’ authoring sources, its references and the objects they select, and for each of its declarations the statement, template, bindings and proofs. Dependencies outside the project appear by ID rather than as pages, so a small project’s site stays small. A project’s declarations can be searched by name.

Each site is rendered from one published revision and never changes afterwards. When a project is withdrawn, its pages are no longer served and answer 404.

LemaHub is itself a Lema application: the rules that decide what it serves are Lema code, and some of their properties are checked by the Lean kernel.

Durability

A push reply reports two things separately. Its outcome says what happened to the reference: published, conflict or held. Its durability says whether the change is already stored durably (remote_committed) or still being stored (pending_remote). A fetch tells you the current reference, never whether a change is durable, so after a lost reply you fetch before pushing again.

What is open and what is not

AreaStatusBoundary
Accounts, clone, fetch, push, merge, held candidatesOpen to invited pilot accounts, with a pilot client build. Two accounts have completed the clone, change, push, merge and publish round trip (tested).Signup needs an invitation. A large project can exceed the per-push limits (413).
Hub pages and name searchPublic at hub.lema-lang.org for projects whose publication is turned on (tested).Read-only. During the pilot, publication is turned on and withdrawn on request.
Hosted VM apps (lema cloud deploy)Not open to pilot accounts yet.VM target only.
lema activity --remoteIn the pilot build.Not part of the pilot round trip above.

Lema v0.3.2 · Updated 29 October 2026 · Version and compatibility