Skip to content

Publish from your repository

A Maypop app is a static site: HTML, CSS, JavaScript and assets that run in the browser. If your project builds to static files, it can be a Maypop app. See What a Maypop app is for what that rules out.

Terminal window
maypop auth # once per machine
cd my-app
maypop init # creates the app and connects this folder
git add .
git commit -m "Create my app"
maypop publish # builds and publishes version 1
Terminal window
maypop init
# or set everything up front
maypop init ./my-app --name "Plant swap" --description "Trade cuttings with your neighbours" --visibility private

init:

  1. Creates a Git repository if the folder is not one yet.
  2. Creates a new, unpublished app on Maypop. The name defaults to the folder name; visibility defaults to private.
  3. Adds Maypop’s Git server as the origin remote, signed in through the CLI’s credential, and records the app in the repository’s local Git config.
  4. Writes maypop.toml and detects your framework.

init stops if the folder already belongs to a Maypop app or already has an origin. To keep a GitHub remote, rename it first:

Terminal window
git remote rename origin github
maypop init

Initialising does not publish anything.

Framework Build Output Routing
Vite your package manager’s build dist/ single-page app
Rsbuild your package manager’s build dist/ single-page app
Next.js (static export) your package manager’s build out/ one file per route
Plain static files none repository root single-page app

Next.js must set output: "export". Server features — route handlers, server actions, middleware, and server rendering — do not run on Maypop. Use the SDK for data, files and AI instead.

The package manager comes from packageManager in package.json, then your lockfile, then npm. To override the build command, output folder, or entry file, see maypop.toml.

Terminal window
maypop publish
maypop publish --changelog "Add shared collections"

Publishing works from the exact commit at HEAD:

  1. Checks the folder is connected to the right app.
  2. Refuses uncommitted changes — commit or stash first.
  3. Runs your build, and refuses a build that changes tracked files.
  4. Pushes HEAD to the app’s main branch on Maypop.
  5. Uploads and checks the static output.
  6. Records it as the app’s next version.

Each version is immutable. Publishing again makes a new one.

Name, description, category, thumbnail, and who can reach the app live in the [app] table of maypop.toml. They are sent only when you ask:

Terminal window
maypop app apply

maypop publish never changes them. See Configuration for each field, and Share an app for what reach means.

The SDK ships a local Maypop host for Vite, Rsbuild and Next.js, so maypop calls work in your normal dev server without publishing. See Develop locally.