Skip to main content

Module publish

Module publish 

Source
Expand description

memstead publish [<file.mem>] — upload a mem to the registry.

Three input shapes, resolved in priority order:

  • memstead publish <file.mem> — archive-already-built. Publish pre-existing bytes (e.g. produced by memstead export --format mem).
  • memstead publish --mem <name> — export-and-publish in one step. Opens the current workspace’s engine (any backend, including git-branch mem-repo), assembles the named mem’s .mem archive in-process via memstead_base::Engine::export_mem_to_bytes, stages it through a tempfile, and posts. This is the one-step path for mem-repo workspaces, where there is no folder to wrap up.
  • memstead publish (no archive arg, no --mem) — filesystem-mem assembly. Walks up from cwd to the workspace marker, builds the archive in-memory via memstead_base::filesystem::publish::assemble_archive, and posts. Equivalent to “wrap up what’s in the current folder and ship it”.

Token resolution (first hit wins): --tokenMEMSTEAD_TOKEN env → ~/.config/memstead/credentials → GitHub Device Flow on first use (only if stdin is a TTY; CI sees “missing MEMSTEAD_TOKEN” instead).

On success prints <scope>/<name> vX.Y.Z + the full mem URL so the user has a clickable link.

Structs§

Args

Functions§

run