Skip to content

memhtml session rebase

1. Synopsis

Move a session’s base to its ref’s tip, keeping every op. Run it after a rebase-needed commit outcome, then commit again.

Terminal window
memhtml session rebase [options]

2. Arguments

This command takes no positional arguments.

3. Flags

Flag Type Default Values Description
--id string no default no fixed set The session to rebase. Defaults to $MEMHTML_SESSION; with neither, the call is ERR_MISSING_ARGUMENT.
--server flag true no fixed set Ask the head server on .memhtml/head.sock to rebase onto the tip it holds (memhtml head serve), so no head is loaded here; --no-server always loads the tip here. The rules are session commit’s: the payload is the same either way, head.source is server and via names the path, server says why, a 4xx or a decline rebases here, and a 5xx or no answer within MEMHTML_COMMIT_DEADLINE_MS fails with ERR_STORAGE rather than rebase again.

Every command also accepts the global flags.

4. Response

On success the command writes one JSON envelope to stdout, and its type is session.rebased.

On failure it writes the failure envelope, whose code comes from error codes.

The JSON envelope gives the fields both shapes carry. Response types lists every value type takes across the binary.

5. Further reading

No guide block names this command. The guide is the workflow prose the CLI ships beside the command table: which command to reach for, and in what order.

6. Provenance

A loader generates this page from apps/cli/src/commands.ts while the site builds, so no file in the repository holds it: the COMMANDS array there is the one source of argument parsing, of memhtml manifest, and of AGENTS.md. Change the registry and this page changes with it.