@sealant/mend 0.35.0 → 0.36.0-next.1006
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -7
- package/dist/{chunk-SMH65F6Z.js → chunk-5VCZGIDO.js} +1179 -11
- package/dist/{dashboard-MGR4YUFD.js → dashboard-6LXBWCM5.js} +1345 -348
- package/dist/main.js +11151 -2017
- package/man/mend-accounts.1 +1 -1
- package/man/mend-adopt.1 +4 -4
- package/man/mend-agent-logins.1 +20 -0
- package/man/mend-attach.1 +1 -1
- package/man/mend-codex.1 +9 -7
- package/man/mend-completions.1 +1 -1
- package/man/mend-connect-pi.1 +28 -0
- package/man/mend-connect.1 +7 -3
- package/man/mend-continue.1 +1 -1
- package/man/mend-doctor.1 +2 -2
- package/man/mend-dotfiles-repo.1 +1 -1
- package/man/mend-dotfiles-sync.1 +1 -1
- package/man/mend-dotfiles.1 +1 -1
- package/man/mend-env-cluster.1 +1 -1
- package/man/mend-env-load.1 +1 -1
- package/man/mend-env-show.1 +1 -1
- package/man/mend-folder-create.1 +1 -1
- package/man/mend-folder-list.1 +1 -1
- package/man/mend-folder-push.1 +1 -1
- package/man/mend-folder-rm.1 +1 -1
- package/man/mend-git-author.1 +1 -1
- package/man/mend-help.1 +1 -1
- package/man/mend-invite.1 +1 -1
- package/man/mend-keys-init.1 +1 -1
- package/man/mend-keys-mode.1 +1 -1
- package/man/mend-keys-share.1 +1 -1
- package/man/mend-keys-show.1 +1 -1
- package/man/mend-land.1 +1 -1
- package/man/mend-login.1 +10 -2
- package/man/mend-logout.1 +1 -1
- package/man/mend-logs.1 +37 -0
- package/man/mend-man.1 +1 -1
- package/man/mend-members.1 +1 -1
- package/man/mend-memory-import.1 +23 -0
- package/man/mend-memory-rm.1 +15 -0
- package/man/mend-memory-show.1 +15 -0
- package/man/mend-memory.1 +32 -0
- package/man/mend-models.1 +22 -0
- package/man/mend-operator-exposure.1 +2 -2
- package/man/mend-operator-gate.1 +1 -1
- package/man/mend-operator-grant-owner.1 +1 -1
- package/man/mend-operator-org-create.1 +1 -1
- package/man/mend-operator-org-invite-owner.1 +1 -1
- package/man/mend-operator-org-list.1 +1 -1
- package/man/mend-operator-org-rename.1 +1 -1
- package/man/mend-operator-reset-link.1 +1 -1
- package/man/mend-pair.1 +3 -1
- package/man/mend-projects.1 +10 -2
- package/man/mend-pull.1 +6 -3
- package/man/mend-refresh.1 +1 -1
- package/man/mend-rejoin.1 +1 -1
- package/man/mend-resume.1 +1 -1
- package/man/mend-run.1 +37 -4
- package/man/mend-secrets-add.1 +24 -0
- package/man/mend-secrets-rm.1 +14 -0
- package/man/mend-secrets.1 +18 -0
- package/man/mend-server-logs.1 +1 -1
- package/man/mend-server-restart.1 +1 -1
- package/man/mend-server-setup.1 +125 -8
- package/man/mend-server-start.1 +1 -1
- package/man/mend-server-status.1 +7 -3
- package/man/mend-server-stop.1 +3 -3
- package/man/mend-server-upgrade.1 +14 -2
- package/man/mend-server.1 +1 -1
- package/man/mend-service-add.1 +1 -1
- package/man/mend-service-connect.1 +1 -1
- package/man/mend-service-init.1 +1 -1
- package/man/mend-service-list.1 +10 -4
- package/man/mend-service-logs.1 +3 -1
- package/man/mend-service-restart.1 +1 -1
- package/man/mend-service-run.1 +16 -4
- package/man/mend-service-stop.1 +1 -1
- package/man/mend-session-share.1 +13 -3
- package/man/mend-sessions.1 +3 -1
- package/man/mend-shell.1 +1 -1
- package/man/mend-skills-push.1 +1 -1
- package/man/mend-skills.1 +1 -1
- package/man/mend-snake.1 +2 -2
- package/man/mend-ssh-keys-remove.1 +18 -0
- package/man/mend-ssh-keys.1 +15 -0
- package/man/mend-ssh-setup.1 +2 -2
- package/man/mend-ssh.1 +13 -4
- package/man/mend-stop.1 +1 -1
- package/man/mend-ui.1 +4 -2
- package/man/mend-uninstall.1 +9 -3
- package/man/mend-version.1 +1 -1
- package/man/mend-wait.1 +28 -0
- package/man/mend-workspace-replace.1 +24 -0
- package/man/mend-worktrees-rm.1 +29 -0
- package/man/mend-worktrees.1 +2 -2
- package/man/mend.1 +61 -7
- package/package.json +23 -41
package/man/mend-projects.1
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
.TH MEND-PROJECTS 1 "" "mend 0.
|
|
1
|
+
.TH MEND-PROJECTS 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-projects \- adopted projects and their live sessions
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend projects
|
|
5
|
+
.B mend projects [\-\-json]
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
One line per project, with the sessions running in it.
|
|
10
|
+
.PP
|
|
11
|
+
\-\-json prints them for scripts, stable like mend sessions \-\-json: {"version": 1, "projects": [...]}, an empty list when there are none. Each project has id, name, originUrl (a string, or null), defaultBranch, storePath, liveSessions (a number) and current (true when the current directory is inside it).
|
|
12
|
+
.PP
|
|
13
|
+
A repository URL is printed without its credentials: https://oauth2:TOKEN@github.com/acme/repo.git reads as https://github.com/acme/repo.git, here and in every line, message and JSON the CLI prints itself; an ssh URL keeps its user and loses only the password. A command's recorded output (mend run, mend logs, mend service logs, mend attach) and a file's contents (mend memory show) are printed as they are, and a session's record is readable by anyone who can read the project.
|
|
14
|
+
.SH OPTIONS
|
|
15
|
+
.TP
|
|
16
|
+
.B \-\-json
|
|
17
|
+
the projects as JSON
|
|
10
18
|
.SH SEE ALSO
|
|
11
19
|
mend(1), mend\-adopt(1), mend\-sessions(1)
|
package/man/mend-pull.1
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
.TH MEND-PULL 1 "" "mend 0.
|
|
1
|
+
.TH MEND-PULL 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-pull \- fetch a session's change into this clone as mend/<name>
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend pull <session> [\-\-force] [\-\-project <p>]
|
|
5
|
+
.B mend pull <session> [\-\-branch <name>] [\-\-force] [\-\-project <p>]
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
Run it inside a local clone of the project's repository. Mend commits the session's latest checkpoint the way mend land does, without pushing, and sends the commits from the session's base to it as a git bundle. The change's owner gets a checkpoint taken first; anyone else gets the latest one there is, and pulling moves nothing on the server. This command fetches the bundle into a local branch of the same name and prints what it fetched. The working tree, the index and the branch you are on are not touched; switch to the branch when you want it.
|
|
10
10
|
.PP
|
|
11
|
-
It works before the change is landed, and without origin. The clone needs the session's base commit, so fetch from origin first when it is missing. An existing local branch of the same name only fast\-forwards. A bundle over the server's size limit (MEND_BUDGET_BUNDLE_BYTES) is refused with its size, and nothing is fetched.
|
|
11
|
+
It works before the change is landed, and without origin. The clone needs the session's base commit, so fetch from origin first when it is missing. An existing local branch of the same name only fast\-forwards. Each pull is recorded in the clone (refs/mend/pulled/<branch>) and the next asks the server to build on it, so pulling again after more work fast\-forwards; with nothing new, the branch stays. A branch that cannot fast\-forward (you committed on it, or the server no longer holds the last pull) is left as it is, and \-\-branch fetches into a new one. A bundle over the server's size limit (MEND_BUDGET_BUNDLE_BYTES) is refused with its size, and nothing is fetched.
|
|
12
12
|
.PP
|
|
13
13
|
One of the clone's remotes must be the project's origin. They are compared by host and path, so ssh and https spellings match. \-\-force skips the check.
|
|
14
14
|
.PP
|
|
15
15
|
<session> is a prefix of the session id or the worktree's name. Settled sessions count.
|
|
16
16
|
.SH OPTIONS
|
|
17
17
|
.TP
|
|
18
|
+
.B \-\-branch <name>
|
|
19
|
+
fetch into this local branch. Default: the session's
|
|
20
|
+
.TP
|
|
18
21
|
.B \-\-force
|
|
19
22
|
fetch into a clone whose remotes do not include the project's origin
|
|
20
23
|
.TP
|
package/man/mend-refresh.1
CHANGED
package/man/mend-rejoin.1
CHANGED
package/man/mend-resume.1
CHANGED
package/man/mend-run.1
CHANGED
|
@@ -1,18 +1,51 @@
|
|
|
1
|
-
.TH MEND-RUN 1 "" "mend 0.
|
|
1
|
+
.TH MEND-RUN 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-run \- run any command as a session
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend run [\-\-project <p>] \-\- <command...>
|
|
5
|
+
.B mend run [\-\-project <p>] [\-\-name <n> | \-\-worktree <n>] [\-\-base <ref>] [\-\-detach] [\-\-json] \-\- <command...>
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
The same worktree, record, and review as mend codex, with a command of your own in place of a harness. Everything after \-\- is the command.
|
|
10
|
+
.PP
|
|
11
|
+
The command's output is printed as the record has it, and mend run exits with the command's exit code. It runs in a terminal, so stdout and stderr arrive together, on stdout. What Mend says itself goes to stderr, so out=$(mend run \-\- git log \-1) holds the command's output and nothing else. Ctrl+C stops watching and puts the terminal back; the command keeps running, mend logs and mend wait pick it up again, and mend stop ends it. A signal exits 128 + its number: 130 for SIGINT (Ctrl+C), 129 for SIGHUP, 143 for SIGTERM. A second signal exits at once, and an exit waits at most 5 seconds for a reader that takes nothing, then says the output may be incomplete.
|
|
12
|
+
.PP
|
|
13
|
+
Output this terminal could not be given in full (a read the server refused, a reader that went away) fails mend run with exit 1 even when the command succeeded, and the command's own code is said on stderr: a script never takes cut output for the whole of it.
|
|
14
|
+
.PP
|
|
15
|
+
The platform takes at most 64 words and 1 MiB, at most 131,071 bytes a word, a program with no leading or trailing whitespace, and no NUL byte. An argument may be empty, start with a newline or span lines. A command it would refuse is refused before anything is created.
|
|
16
|
+
.PP
|
|
17
|
+
An attached mend run shows output and sends no keys, so a shell with no script and no \-c (mend run \-\- bash) is refused before anything is created: it would wait for input forever. For a shell, use Open a shell on the web, mend shell, or mend run \-\-detach \-\- bash and then mend attach.
|
|
18
|
+
.PP
|
|
19
|
+
With \-\-detach, mend run returns once the command runs. With \-\-json, stdout carries one JSON object in place of the output: the session id, the process id, the worktree, the branch, and the process's status and exit code as last observed, which is how it ended without \-\-detach (and with it, when the command ended first).
|
|
20
|
+
.PP
|
|
21
|
+
Workspaces set PAGER=cat, so git log and friends print instead of waiting for a pager the image does not have. A project variable of the same name, or the pager in your own git config, wins.
|
|
10
22
|
.SH OPTIONS
|
|
11
23
|
.TP
|
|
12
24
|
.B \-\-project <p>
|
|
13
25
|
the project by name, when the current directory is not inside it
|
|
26
|
+
.TP
|
|
27
|
+
.B \-\-name <n>
|
|
28
|
+
name the worktree; an existing name joins it
|
|
29
|
+
.TP
|
|
30
|
+
.B \-\-worktree <n>
|
|
31
|
+
join an existing worktree only
|
|
32
|
+
.TP
|
|
33
|
+
.B \-\-base <ref>
|
|
34
|
+
create the worktree from another git base
|
|
35
|
+
.TP
|
|
36
|
+
.B \-\-detach, \-d
|
|
37
|
+
return once the command runs
|
|
38
|
+
.TP
|
|
39
|
+
.B \-\-json
|
|
40
|
+
print the session and process ids, and the end, as JSON
|
|
14
41
|
.SH EXAMPLES
|
|
15
42
|
.PP
|
|
16
|
-
.B mend run \-\-
|
|
43
|
+
.B mend run \-\- pnpm test
|
|
44
|
+
.br
|
|
45
|
+
the test output here, exit code included
|
|
46
|
+
.PP
|
|
47
|
+
.B id=$(mend run \-\-detach \-\-json \-\- make build | jq \-r .sessionId)
|
|
48
|
+
.br
|
|
49
|
+
start it, then mend wait $id
|
|
17
50
|
.SH SEE ALSO
|
|
18
|
-
mend(1), mend\-codex(1)
|
|
51
|
+
mend(1), mend\-logs(1), mend\-wait(1), mend\-codex(1)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.TH MEND-SECRETS-ADD 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
|
+
.SH NAME
|
|
3
|
+
mend\-secrets\-add \- keep a file as a secret file, or replace one
|
|
4
|
+
.SH SYNOPSIS
|
|
5
|
+
.B mend secrets add <path> [\-\-from <file>]
|
|
6
|
+
.br
|
|
7
|
+
.SH DESCRIPTION
|
|
8
|
+
.PP
|
|
9
|
+
Reads the content from <file>, or from stdin without \-\-from, and keeps it at <path> under the workspace home. A path on this machine under your home, such as ~/.aws/credentials, names the same place in the workspace. A file already kept at that path is replaced. Sessions launched from then on receive it; a running session keeps what it has.
|
|
10
|
+
.PP
|
|
11
|
+
A file is at most 256 KB, and you may keep up to 64. Binary files are fine.
|
|
12
|
+
.SH OPTIONS
|
|
13
|
+
.TP
|
|
14
|
+
.B \-\-from <file>
|
|
15
|
+
read the content from this file instead of stdin
|
|
16
|
+
.SH EXAMPLES
|
|
17
|
+
.PP
|
|
18
|
+
.B mend secrets add ~/.aws/credentials \-\-from ~/.aws/credentials
|
|
19
|
+
.PP
|
|
20
|
+
.B mend secrets add .kube/config \-\-from ~/.kube/config
|
|
21
|
+
.PP
|
|
22
|
+
.B mend secrets add .npmrc < ~/.npmrc
|
|
23
|
+
.SH SEE ALSO
|
|
24
|
+
mend(1), mend\-secrets(1), mend\-secrets\-rm(1)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.TH MEND-SECRETS-RM 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
|
+
.SH NAME
|
|
3
|
+
mend\-secrets\-rm \- remove a secret file
|
|
4
|
+
.SH SYNOPSIS
|
|
5
|
+
.B mend secrets rm <path>
|
|
6
|
+
.br
|
|
7
|
+
.SH DESCRIPTION
|
|
8
|
+
.PP
|
|
9
|
+
Removes the file kept at <path>. Sessions launched from then on do not receive it; a running session keeps what it has.
|
|
10
|
+
.SH EXAMPLES
|
|
11
|
+
.PP
|
|
12
|
+
.B mend secrets rm .npmrc
|
|
13
|
+
.SH SEE ALSO
|
|
14
|
+
mend(1), mend\-secrets(1)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.TH MEND-SECRETS 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
|
+
.SH NAME
|
|
3
|
+
mend\-secrets \- your secret files: written into every session you launch
|
|
4
|
+
.SH SYNOPSIS
|
|
5
|
+
.B mend secrets [list]
|
|
6
|
+
.br
|
|
7
|
+
.SH DESCRIPTION
|
|
8
|
+
.PP
|
|
9
|
+
A secret file is a file you keep in Mend, encrypted at rest, with its path under the home directory of the workspace: ~/.aws/credentials, a kubeconfig, an .npmrc token file. Every session you own receives your secret files before its agent starts, in every project. They are yours alone: no one else's sessions receive them, and the content never comes back out of the server. The web app's settings page shows the same list.
|
|
10
|
+
.PP
|
|
11
|
+
A secret file is never captured. It is written into the workspace's own home directory, which no capture, change, checkpoint or transcript harvest covers, and a path under a directory sessions do capture, such as .claude or .codex, is refused.
|
|
12
|
+
.PP
|
|
13
|
+
This lists your secret files: the path each takes in the workspace, its size, and when it last changed.
|
|
14
|
+
.SH EXAMPLES
|
|
15
|
+
.PP
|
|
16
|
+
.B mend secrets
|
|
17
|
+
.SH SEE ALSO
|
|
18
|
+
mend(1), mend\-secrets\-add(1), mend\-secrets\-rm(1), mend\-env\-load(1)
|
package/man/mend-server-logs.1
CHANGED
package/man/mend-server-setup.1
CHANGED
|
@@ -1,22 +1,45 @@
|
|
|
1
|
-
.TH MEND-SERVER-SETUP 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVER-SETUP 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
|
-
mend\-server\-setup \- install or
|
|
3
|
+
mend\-server\-setup \- install or change the local Mend server, guided
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend server setup
|
|
5
|
+
.B mend server setup
|
|
6
|
+
.br
|
|
7
|
+
.B mend server setup [\-\-yes] [\-\-context <name>] [\-\-version <version|latest>] [\-\-bind <ip>] [\-\-ssh\-bind <ip>] [\-\-url <origin>] [\-\-origin <origin>...] [\-\-port <n>] [\-\-ssh\-port <n>] [\-\-edge <host> | \-\-no\-edge] [\-\-exposure <loopback|private|public>] [\-\-tenancy <single|multi>] [\-\-declare <item>...] [\-\-undeclare <item>...] [\-\-t3\-gateway [\-\-t3\-gateway\-port <n>] [\-\-t3\-gateway\-origin <host> | \-\-no\-t3\-gateway\-origin] | \-\-no\-t3\-gateway] [\-\-npm\-mirror | \-\-no\-npm\-mirror] [\-\-npm\-mirror\-max\-size <size>] [\-\-docker\-mirror | \-\-no\-docker\-mirror] [\-\-docker\-mirror\-max\-size <size>] [\-\-docker\-hub\-username <name> \-\-docker\-hub\-token\-stdin \-\-docker\-hub\-public\-only | \-\-no\-docker\-hub\-login] [\-\-docker\-socket <path>] [\-\-assets\-dir <dir>] [\-\-offline] [\-\-allow\-userns | \-\-no\-allow\-userns]
|
|
6
8
|
.br
|
|
7
9
|
.SH DESCRIPTION
|
|
8
10
|
.PP
|
|
11
|
+
On a terminal with no flags, setup asks its questions in plain words, one at a time: on a fresh install with more than one Docker engine answering here (Docker Desktop beside OrbStack, colima, Rancher Desktop, a rootless Docker), which one Mend runs in, the current context in brackets; then how people reach this Mend (just this machine, your private network or Tailscale, or the public internet with HTTPS), whether VS Code Remote\-SSH reaches it from other machines, the T3 Code gateway, the mirrors, and one organization or several. It looks before it asks and says what it observed: Tailscale's name and address and what Tailscale Serve forwards, where your domain resolves, and whether ports 80 and 443 are taken. It never asks for an address to bind: that follows from the answers. On an existing install it shows what is saved and lets you keep it, change one thing, or go through every question. It ends with what changes, in words, and the same command with flags; nothing applies until you say yes.
|
|
12
|
+
.PP
|
|
13
|
+
Flags are for scripts and CI, and teach what the questions do. Each changes only what it names; everything else is kept from the saved install, so mend server setup \-\-t3\-gateway turns the gateway on and nothing more. When there is an install, a run with flags says what it changes. With no terminal and no flags, a fresh install is refused rather than guessed: \-\-yes takes the defaults. \-\-context and \-\-docker\-socket choose the Docker engine and answer only that question, so with only those (on a Mac with Docker Desktop and OrbStack, \-\-context orbstack) setup still asks the rest. A fresh install without \-\-context takes DOCKER_CONTEXT, as docker does, and with \-\-yes or no terminal the current context, naming the others; an existing one stays on the context its data is on, and running Mend in another engine is a new install (mend uninstall \-\-server, then mend server setup there).
|
|
14
|
+
.PP
|
|
15
|
+
Before anything is pulled, setup checks that Mend's web and SSH ports are free where they are to be published, and says what holds one that is not: another Mend, with its version, or something else. On a terminal it offers the next free port; with flags it refuses and names \-\-port or \-\-ssh\-port. After starting, it reads health until this install answers: its version, and the instance id the server reports, so another Mend on the same port is said as one, never taken for this one.
|
|
16
|
+
.PP
|
|
9
17
|
Checks a local Unix\-socket Docker context and the Compose plugin, downloads the compose and Postgres initialization assets for one Mend release, preserves existing data and secrets, and starts the server. Re\-running repairs the same pinned version. A changed \-\-version is refused; use mend server upgrade. Updating this CLI never updates an existing server pin.
|
|
10
18
|
.PP
|
|
11
|
-
The default listens only on localhost at http://localhost:3105. Non\-local access requires both \-\-bind and \-\-url. Every extra browser origin must be named with \-\-origin; setup never guesses from the request Host header or network interfaces.
|
|
19
|
+
The default listens only on localhost at http://localhost:3105. Non\-local access requires both \-\-bind and \-\-url. Every extra browser origin must be named with \-\-origin; setup never guesses from the request Host header or network interfaces. A fresh install refuses a public \-\-bind address: until the first account exists, registration is open to whoever reaches it first. On an existing install, setup says when Mend's port or workspace SSH is published on a public address while the exposure is not public. The questions offer only private addresses (a tailnet, a LAN or VPN, carrier\-grade NAT space) for a private network.
|
|
20
|
+
.PP
|
|
21
|
+
\-\-edge <host> runs a TLS edge in front of Mend: Caddy on ports 80 and 443 of every interface, which obtains and renews a certificate for the host and proxies to Mend's web tier. Mend's own port stays on loopback and the browser origin is https://<host>. The edge's compose overlay and Caddyfile are written into the generation beside compose.yaml, so start, restart and upgrade run them every time. \-\-no\-edge takes it away again, and the edge's container with it. A fresh install cannot start with the edge: until the first account exists, registration is open to whoever reaches the origin first, so set up on localhost, create the account, then add the edge.
|
|
22
|
+
.PP
|
|
23
|
+
\-\-t3\-gateway turns on the t3code gateway (docs/adr/0012): t3code's desktop, mobile and web clients add it as an environment, pair with a code from mend pair, and see this Mend's projects and sessions. It runs in the Mend container, confined to a root and a uid of its own, on a listener of its own (port 3120, or \-\-t3\-gateway\-port) published where Mend's web port is: on 127.0.0.1 for just this machine, on the tailnet or LAN address for a private network, so T3 Code reaches it as it reaches Mend, with no tunnel. Every device pairs through Mend wherever it is published. Behind the edge its port stays on 127.0.0.1, and \-\-t3\-gateway\-origin <host> has the edge serve it on a host of its own, over HTTPS: a t3code client always uses a server's root path, so it cannot sit under Mend's origin. That host's DNS points where the edge's does; setup says where it resolves. Setup refuses it on a Mend image that has no gateway, and says whether it answered. It is kept across reruns and upgrades; \-\-no\-t3\-gateway turns it off, and its state stays in its own volume, mend\-t3\-gateway. Off, nothing of it runs.
|
|
24
|
+
.PP
|
|
25
|
+
\-\-exposure declares how the instance is reached, and \-\-tenancy whether one organization or many use it. Both are written into the generation and kept across reruns and upgrades. public needs the edge and an existing first account. With multi, or with public, the multi mode gate's settings follow: MEND_SOURCE_POLICY=tenant and MEND_CAPTURE_REQUIRE_SIZES=true, and public sets MEND_URL_BEARERS=refuse. The server still decides whether it starts, and mend server status shows what it reports.
|
|
26
|
+
.PP
|
|
27
|
+
Two mirrors run beside Mend unless turned off: an npm mirror (nginx caching npmjs.org, capped at 10g by default, least recently used out) and a Docker mirror (a pull\-through cache of Docker Hub, capped at 20g by default: over the cap its cache is cleared). Both leave 5g free on their disk: below that, nginx evicts and the Docker mirror pauses, and sessions pull from Docker Hub directly. Neither publishes a host port. Sessions install npm packages and pull Docker Hub images through them; a project's own npm settings win, and a mirror that is down sends sessions upstream instead. Both are kept across reruns and upgrades, and an upgrade adds them to an install from before them. The Docker mirror pulls anonymously unless given a Docker Hub login: \-\-docker\-hub\-username with the access token piped on standard input, kept in server.env only. The mirror has no login of its own, so every session that reaches it can pull whatever that token can read: setup takes a login only with \-\-docker\-hub\-public\-only, your statement that the token's access permission is Public Repo Read\-only. Mend cannot check a token's scope.
|
|
28
|
+
.PP
|
|
29
|
+
Before its other questions and before it pulls the release, setup reads the Docker host's kernel, through the few megabytes of busybox every install needs anyway. Each workspace runs its own rootless Docker, which needs unprivileged user namespaces; Ubuntu 23.10 and later (24.04 LTS included) refuse them by default, and then no session can start. On a terminal setup asks to allow them: on a yes it writes the setting to /etc/sysctl.d/60\-mend\-rootless\-docker.conf on the Docker host and applies it, through a short privileged container on the Docker socket it already uses, then reads the kernel again. That lifts the restriction for the whole host; the file says on its first lines that setup wrote it and what it replaced, so mend uninstall \-\-all removes it and puts that back. On a no, or on a rootless daemon, it prints the command to run on the host, and repeats it as its last line. Without a terminal or with \-\-yes, it says to re\-run with \-\-allow\-userns, so that setup writes the file and mend uninstall can undo it; the command is the other way, and a file written by hand stays on uninstall. \-\-allow\-userns and \-\-no\-allow\-userns answer for a script.
|
|
30
|
+
.PP
|
|
31
|
+
When setup changes Mend's URL, a CLI signed in at the old one is left pointing there. Setup says so with the command each one runs (mend login \-\-url <new>), which is a new sign\-in: it asks for a browser authorization. When this machine's own CLI points at the old URL and that no longer answers, setup offers to point it at the new one; its sign\-in carries over, since a device's token is not bound to a URL. When it points anywhere else this install does not answer (another server, or nothing), setup offers the same; a sign\-in made at another server stays behind, and the offer leads with no while that server answers. A re\-run says to create the first account only while the instance has none.
|
|
12
32
|
.PP
|
|
13
33
|
Docker Desktop on Linux and macOS, and OrbStack on macOS, expose client\-side proxy sockets. Containers use the daemon\-side /var/run/docker.sock. \-\-docker\-socket overrides detection and is retained on reruns.
|
|
14
34
|
.PP
|
|
15
35
|
Setup holds an exclusive process lock through startup and health checks. A busy lock reports its owner and manual recovery steps. Never remove a live lock. Private configuration uses immutable generations and an atomic active pointer; failed attempts retain credentials and never delete Docker volumes.
|
|
16
36
|
.SH OPTIONS
|
|
17
37
|
.TP
|
|
38
|
+
.B \-\-yes
|
|
39
|
+
no questions: a fresh install takes the defaults (this machine only, http://localhost:3105), an existing one keeps what is saved
|
|
40
|
+
.TP
|
|
18
41
|
.B \-\-context <name>
|
|
19
|
-
local Docker context to persist; the global context is unchanged
|
|
42
|
+
local Docker context to persist; the global context is unchanged. Answers the engine question. Default: DOCKER_CONTEXT on a fresh install, else the saved one
|
|
20
43
|
.TP
|
|
21
44
|
.B \-\-version <v>
|
|
22
45
|
exact Mend server version, or latest; omitted keeps the current pin
|
|
@@ -24,11 +47,14 @@ exact Mend server version, or latest; omitted keeps the current pin
|
|
|
24
47
|
.B \-\-bind <ip>
|
|
25
48
|
published listen address. Default: 127.0.0.1
|
|
26
49
|
.TP
|
|
50
|
+
.B \-\-ssh\-bind <ip>
|
|
51
|
+
where workspace SSH is published, when not on \-\-bind; with \-\-edge, Remote\-SSH from another machine needs it. Kept across reruns; the \-\-bind address takes it away
|
|
52
|
+
.TP
|
|
27
53
|
.B \-\-url <origin>
|
|
28
54
|
advertised browser URL, required with a non\-loopback bind
|
|
29
55
|
.TP
|
|
30
56
|
.B \-\-origin <origin>
|
|
31
|
-
additional exact browser origin; repeat for more than one
|
|
57
|
+
additional exact browser origin; repeat for more than one. The list given replaces the saved one; none clears it
|
|
32
58
|
.TP
|
|
33
59
|
.B \-\-port <n>
|
|
34
60
|
external web port. Default: 3105
|
|
@@ -36,6 +62,63 @@ external web port. Default: 3105
|
|
|
36
62
|
.B \-\-ssh\-port <n>
|
|
37
63
|
external workspace SSH port. Default: 2222; must differ from \-\-port
|
|
38
64
|
.TP
|
|
65
|
+
.B \-\-edge <host>
|
|
66
|
+
run the Caddy TLS edge for this DNS name on 80 and 443; the origin becomes https://<host>, \-\-bind stays on loopback, and the first account must already exist
|
|
67
|
+
.TP
|
|
68
|
+
.B \-\-no\-edge
|
|
69
|
+
take a saved edge away; the origin returns to http://localhost
|
|
70
|
+
.TP
|
|
71
|
+
.B \-\-t3\-gateway
|
|
72
|
+
run the t3code gateway on port 3120, published where Mend's web port is; kept across reruns and upgrades
|
|
73
|
+
.TP
|
|
74
|
+
.B \-\-t3\-gateway\-port <n>
|
|
75
|
+
the gateway's port; implies \-\-t3\-gateway
|
|
76
|
+
.TP
|
|
77
|
+
.B \-\-no\-t3\-gateway
|
|
78
|
+
turn the t3code gateway off; its state stays
|
|
79
|
+
.TP
|
|
80
|
+
.B \-\-t3\-gateway\-origin <host>
|
|
81
|
+
with the edge: serve the gateway over HTTPS on this host of its own; its DNS points where the edge's does. Implies \-\-t3\-gateway
|
|
82
|
+
.TP
|
|
83
|
+
.B \-\-no\-t3\-gateway\-origin
|
|
84
|
+
the edge stops serving the gateway; it stays on, on 127.0.0.1
|
|
85
|
+
.TP
|
|
86
|
+
.B \-\-exposure <v>
|
|
87
|
+
declare loopback, private or public; kept across reruns and upgrades. public needs \-\-edge and an existing first account
|
|
88
|
+
.TP
|
|
89
|
+
.B \-\-tenancy <v>
|
|
90
|
+
declare single or multi; kept across reruns and upgrades. multi also sets the multi mode gate's variables
|
|
91
|
+
.TP
|
|
92
|
+
.B \-\-declare <item>
|
|
93
|
+
state a gate item you verified from outside: core\-private, edge\-tls, workspace\-ssh or t3code\-gateway. Adds to what is saved; repeat for more, none clears. public with \-\-ssh\-bind beyond loopback needs workspace\-ssh
|
|
94
|
+
.TP
|
|
95
|
+
.B \-\-undeclare <item>
|
|
96
|
+
take one statement back; the others stay. Repeat for more
|
|
97
|
+
.TP
|
|
98
|
+
.B \-\-npm\-mirror, \-\-no\-npm\-mirror
|
|
99
|
+
run or stop the npm mirror; kept across reruns and upgrades. Default: on
|
|
100
|
+
.TP
|
|
101
|
+
.B \-\-npm\-mirror\-max\-size <size>
|
|
102
|
+
the npm mirror's disk cap, such as 20g or 1536m, at least 1g. Default: 10g
|
|
103
|
+
.TP
|
|
104
|
+
.B \-\-docker\-mirror, \-\-no\-docker\-mirror
|
|
105
|
+
run or stop the Docker Hub mirror; kept across reruns and upgrades. Default: on
|
|
106
|
+
.TP
|
|
107
|
+
.B \-\-docker\-mirror\-max\-size <size>
|
|
108
|
+
the Docker mirror's cap, such as 40g; over it the cache is cleared and fills again. Default: 20g
|
|
109
|
+
.TP
|
|
110
|
+
.B \-\-docker\-hub\-username <name>
|
|
111
|
+
the Docker mirror pulls as this Docker Hub account; needs \-\-docker\-hub\-token\-stdin
|
|
112
|
+
.TP
|
|
113
|
+
.B \-\-docker\-hub\-token\-stdin
|
|
114
|
+
read that account's access token from standard input; kept in server.env, never in argv or a session
|
|
115
|
+
.TP
|
|
116
|
+
.B \-\-docker\-hub\-public\-only
|
|
117
|
+
required with a login: you state the token is scoped Public Repo Read\-only, since every session can pull what it can read
|
|
118
|
+
.TP
|
|
119
|
+
.B \-\-no\-docker\-hub\-login
|
|
120
|
+
the Docker mirror pulls anonymously again
|
|
121
|
+
.TP
|
|
39
122
|
.B \-\-assets\-dir <dir>
|
|
40
123
|
copy compose.v2.yaml and postgres\-init.sh from a release directory; fresh setup requires \-\-version
|
|
41
124
|
.TP
|
|
@@ -44,11 +127,29 @@ use retained or supplied assets and preloaded images only; no GitHub requests or
|
|
|
44
127
|
.TP
|
|
45
128
|
.B \-\-docker\-socket <path>
|
|
46
129
|
daemon\-side socket mount override for diagnostics
|
|
130
|
+
.TP
|
|
131
|
+
.B \-\-allow\-userns
|
|
132
|
+
on a Docker host whose kernel refuses unprivileged user namespaces, allow them without asking (writes /etc/sysctl.d/60\-mend\-rootless\-docker.conf on the host and applies it)
|
|
133
|
+
.TP
|
|
134
|
+
.B \-\-no\-allow\-userns
|
|
135
|
+
leave the host's kernel as it is without asking; setup prints the command instead
|
|
47
136
|
.SH EXAMPLES
|
|
48
137
|
.PP
|
|
49
138
|
.B mend server setup
|
|
50
139
|
.br
|
|
51
|
-
|
|
140
|
+
on a terminal: the questions, then what changes and the same command with flags
|
|
141
|
+
.PP
|
|
142
|
+
.B mend server setup \-\-t3\-gateway
|
|
143
|
+
.br
|
|
144
|
+
on an existing install: turn the T3 Code gateway on where Mend's web port is published, and keep everything else
|
|
145
|
+
.PP
|
|
146
|
+
.B mend server setup \-\-t3\-gateway\-origin t3.mend.example.com
|
|
147
|
+
.br
|
|
148
|
+
behind the edge: serve the T3 Code gateway at https://t3.mend.example.com
|
|
149
|
+
.PP
|
|
150
|
+
.B mend server setup \-\-yes
|
|
151
|
+
.br
|
|
152
|
+
no questions: localhost on a fresh install, using the current local Docker context
|
|
52
153
|
.PP
|
|
53
154
|
.B mend server setup \-\-context orbstack \-\-bind 0.0.0.0 \-\-url http://100.70.80.90:3105
|
|
54
155
|
.br
|
|
@@ -57,5 +158,21 @@ explicit private\-network exposure (a tailnet, a LAN, a VPN)
|
|
|
57
158
|
.B mend server setup \-\-version 0.25.0 \-\-assets\-dir ./release\-assets \-\-offline
|
|
58
159
|
.br
|
|
59
160
|
install from local release assets and preloaded images
|
|
161
|
+
.PP
|
|
162
|
+
.B mend server setup \-\-edge mend.example.com \-\-ssh\-bind 0.0.0.0 \-\-exposure public \-\-declare workspace\-ssh
|
|
163
|
+
.br
|
|
164
|
+
the TLS edge for the browser and the API, and workspace SSH for Remote\-SSH from other machines
|
|
165
|
+
.PP
|
|
166
|
+
.B mend server setup \-\-edge mend.example.com
|
|
167
|
+
.br
|
|
168
|
+
a TLS edge for mend.example.com; its DNS points at this machine and 80 and 443 reach it
|
|
169
|
+
.PP
|
|
170
|
+
.B mend server setup \-\-exposure public \-\-tenancy multi
|
|
171
|
+
.br
|
|
172
|
+
on an install with an edge and a first account: declare public, many organizations
|
|
173
|
+
.PP
|
|
174
|
+
.B printf %s "$DOCKER_HUB_TOKEN" | mend server setup \-\-docker\-hub\-username mendbot \-\-docker\-hub\-token\-stdin \-\-docker\-hub\-public\-only
|
|
175
|
+
.br
|
|
176
|
+
the Docker mirror pulls from Docker Hub as mendbot, with a Public Repo Read\-only token
|
|
60
177
|
.SH SEE ALSO
|
|
61
|
-
mend(1), mend\-server(1), mend\-login(1), mend\-doctor(1)
|
|
178
|
+
mend(1), mend\-server(1), mend\-server\-status(1), mend\-login(1), mend\-doctor(1), mend\-operator\-exposure(1)
|
package/man/mend-server-start.1
CHANGED
package/man/mend-server-status.1
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
.TH MEND-SERVER-STATUS 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVER-STATUS 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
|
-
mend\-server\-status \- show the
|
|
3
|
+
mend\-server\-status \- show the pin, generation, containers, edge, mirrors and posture
|
|
4
4
|
.SH SYNOPSIS
|
|
5
5
|
.B mend server status
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
Reads the existing installation without changing its files. A running Mend must answer health with the exact pinned version. A stopped server makes no health claim. Never installs a server implicitly.
|
|
10
|
+
.PP
|
|
11
|
+
Each mirror the install runs follows, as observed: whether its container runs, what its cache holds, and its traffic. For the npm mirror, the tarball requests in its log for the last 24 hours and how many the cache served; for the Docker mirror, layer and manifest requests since it started and how many the cache served.
|
|
12
|
+
.PP
|
|
13
|
+
Then the posture, declared beside observed. Declared is what this install's configuration says: the edge host, MEND_EXPOSURE and MEND_TENANCY, a default named as one. Observed is what was seen: whether the edge's container runs and whether Caddy's data holds a certificate for the host, and what the running server reports in its health, the exposure it runs with and how many public exposure gate items are open, the tenancy and which multi mode gate items are open. When this machine is signed in to the install as the operator, every item of both gates follows with its detail, as mend operator gate and mend operator exposure print them. None of it is a verdict: the report says what was declared and what was observed.
|
|
10
14
|
.SH SEE ALSO
|
|
11
|
-
mend(1), mend\-server\-logs(1), mend\-server\-start(1)
|
|
15
|
+
mend(1), mend\-server\-logs(1), mend\-server\-start(1), mend\-operator\-gate(1), mend\-operator\-exposure(1)
|
package/man/mend-server-stop.1
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.TH MEND-SERVER-STOP 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVER-STOP 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
|
-
mend\-server\-stop \- stop
|
|
3
|
+
mend\-server\-stop \- stop the server's containers without deleting data
|
|
4
4
|
.SH SYNOPSIS
|
|
5
5
|
.B mend server stop
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
|
-
Stops only the installation's Compose services. Connections are interrupted. Workspace containers and volumes remain, but active work may lose connectivity and need reconnection. No volume deletion or Docker prune is performed.
|
|
9
|
+
Stops only the installation's Compose services, the edge among them when one is set. Connections are interrupted. Workspace containers and volumes remain, but active work may lose connectivity and need reconnection. No volume deletion or Docker prune is performed.
|
|
10
10
|
.SH SEE ALSO
|
|
11
11
|
mend(1), mend\-server\-start(1), mend\-server\-status(1)
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
.TH MEND-SERVER-UPGRADE 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVER-UPGRADE 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-server\-upgrade \- upgrade to an explicit version with a database backup
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend server upgrade \-\-version <target|latest> [\-\-assets\-dir <dir>] [\-\-offline]
|
|
5
|
+
.B mend server upgrade \-\-version <target|latest> [\-\-assets\-dir <dir>] [\-\-offline] [\-\-from\-preview] [\-\-keep\-backups <n>]
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
Preflights release assets and the canonical image's version label before interrupting Mend. Downgrades are refused. latest is resolved only when explicitly requested; a same\-version request does nothing.
|
|
10
10
|
.PP
|
|
11
|
+
The installed configuration stays: the bind, the origin, the ports, the edge host and the declared exposure and tenancy are carried into the new generation, which renders the same overlays beside the new compose.yaml. An upgrade never drops the edge or the posture; mend server setup is where they change.
|
|
12
|
+
.PP
|
|
11
13
|
Stops app writers, starts official Postgres if needed, and streams pg_dumpall into a private database backup before selecting and starting the target. Connections are interrupted. Workspace containers and data are retained, but active work can lose connectivity and need reconnection. Stop any external database writers before upgrading.
|
|
12
14
|
.PP
|
|
13
15
|
Preflight or backup failure retains the old pin and attempts to recover the old app if it was running. Once target startup may have begun, Mend never automatically downgrades or restores the database. The target pin, old generation and backup remain. Inspect logs, fix the target, then use mend server start. Recovery records are under the installation's backups/upgrade\-UUID directory.
|
|
16
|
+
.PP
|
|
17
|
+
After the target answers health, its recovery record is marked completed and older completed backups are removed, keeping the newest two (this one included) in the order Mend wrote them; each removal is printed with the space it freed. A failed upgrade removes nothing. A backup this release recorded as pending, or whose dump is incomplete, is always kept. Each dump holds the whole database, so it can run to gigabytes.
|
|
18
|
+
.PP
|
|
19
|
+
Backups written by releases before 0.36 carry no outcome: the first upgrade on 0.36 or later treats each one whose dump is whole as completed and keeps only the newest N, so copy any you want to keep out of backups/ first. Their removals are marked "from before 0.36, no recorded outcome".
|
|
14
20
|
.SH OPTIONS
|
|
15
21
|
.TP
|
|
16
22
|
.B \-\-version <target|latest>
|
|
@@ -21,6 +27,12 @@ copy target compose.v2.yaml and postgres\-init.sh from local release assets
|
|
|
21
27
|
.TP
|
|
22
28
|
.B \-\-offline
|
|
23
29
|
no GitHub requests or release\-image pulls; target assets and exact\-version images must be local
|
|
30
|
+
.TP
|
|
31
|
+
.B \-\-from\-preview
|
|
32
|
+
once, from a preview numbered X.Y.Z\-preview.K to a next build X.Y.Z\-next.N; refused unless the target carries every migration the server applied
|
|
33
|
+
.TP
|
|
34
|
+
.B \-\-keep\-backups <n>
|
|
35
|
+
completed upgrade backups to keep after a healthy upgrade, this one included; 0 keeps all. Default: 2
|
|
24
36
|
.SH EXAMPLES
|
|
25
37
|
.PP
|
|
26
38
|
.B mend server upgrade \-\-version 0.24.0 \-\-assets\-dir ./release\-0.24.0 \-\-offline
|
package/man/mend-server.1
CHANGED
package/man/mend-service-add.1
CHANGED
package/man/mend-service-init.1
CHANGED
package/man/mend-service-list.1
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
.TH MEND-SERVICE-LIST 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVICE-LIST 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-service\-list \- every live service and its observed state
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend service list
|
|
5
|
+
.B mend service list [\-\-json]
|
|
6
6
|
.br
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
|
-
Name,
|
|
9
|
+
Name, observed state, port, the Service's id and its current attempt's process id, and where it is reachable from here. The process id is what mend logs \-\-process and mend wait \-\-process take; mend logs \-\-service takes the Service's name or id. An adopted port has no process.
|
|
10
|
+
.PP
|
|
11
|
+
With \-\-json, stdout carries one JSON object: version 1, and services, each with id, name, sessionId, processId (null for an adopted port), status as last observed, workspacePort, protocol (tcp or udp), and hostPort, authority and browserUrl (null when not bound).
|
|
12
|
+
.SH OPTIONS
|
|
13
|
+
.TP
|
|
14
|
+
.B \-\-json
|
|
15
|
+
print the Services as JSON
|
|
10
16
|
.SH SEE ALSO
|
|
11
|
-
mend(1), mend\-service\-run(1), mend\-service\-connect(1)
|
|
17
|
+
mend(1), mend\-service\-run(1), mend\-service\-connect(1), mend\-logs(1)
|
package/man/mend-service-logs.1
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.TH MEND-SERVICE-LOGS 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVICE-LOGS 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-service\-logs \- follow a supervised service's output
|
|
4
4
|
.SH SYNOPSIS
|
|
@@ -7,6 +7,8 @@ mend\-service\-logs \- follow a supervised service's output
|
|
|
7
7
|
.SH DESCRIPTION
|
|
8
8
|
.PP
|
|
9
9
|
Replays the recorded output, then follows it live. Ctrl\-C stops following.
|
|
10
|
+
.PP
|
|
11
|
+
The record is printed as it is, nothing taken out, and anyone who can read the project can read it: what the Service printed, a password included, reaches them too.
|
|
10
12
|
.SH OPTIONS
|
|
11
13
|
.TP
|
|
12
14
|
.B \-\-from <sequence>
|
package/man/mend-service-run.1
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
.TH MEND-SERVICE-RUN 1 "" "mend 0.
|
|
1
|
+
.TH MEND-SERVICE-RUN 1 "" "mend 0.36.0\-next.1006" "mend manual"
|
|
2
2
|
.SH NAME
|
|
3
3
|
mend\-service\-run \- start and supervise a server in the session's workspace
|
|
4
4
|
.SH SYNOPSIS
|
|
5
|
-
.B mend service run [session] \-\-port <port> [\-\-name <n>] [\-\-udp] [\-\-http|\-\-https] [\-\-no\-connect] \-\- <command...>
|
|
5
|
+
.B mend service run [session] \-\-port <port> [\-\-name <n>] [\-\-udp] [\-\-http|\-\-https] [\-\-wait [\-\-timeout <duration>]] [\-\-no\-connect] \-\- <command...>
|
|
6
6
|
.br
|
|
7
|
-
.B mend service run [session] <name> [\-\-no\-connect]
|
|
7
|
+
.B mend service run [session] <name> [\-\-wait [\-\-timeout <duration>]] [\-\-no\-connect]
|
|
8
8
|
.br
|
|
9
9
|
.SH DESCRIPTION
|
|
10
10
|
.PP
|
|
11
11
|
With \-\-, the command after it is started in the workspace and supervised: its output is recorded, and mend service restart re\-runs it. Without \-\-, the name is a Service declared in the worktree's mend.toml. mend service <name> is the shorthand for that.
|
|
12
12
|
.PP
|
|
13
|
+
Mend waits up to a minute for the port to answer before it returns. \-\-wait keeps waiting while the Service is still starting (its process runs and its port has not answered yet: building, installing, booting), however long that takes, up to \-\-timeout (default 10 minutes). Mend probes a started Service's port every 20 seconds, so the wait ends at the first probe that answers. The wait judges the one process this start began, by an id the start sends and the server stamps on it, whatever another client starts, restarts or stops meanwhile. The exit status says how it ended: 0 the port answered for that process; 1 Mend refused the start or could not be asked; 2 the process ended before its port answered (the line says its status and exit code; a process its workspace took reads exited, no exit code reported); 3 the server no longer has the session, its workspace gone with it; 124 the Service was still starting when the timeout passed, and it keeps starting. A server older than this CLI stamps no id: a start whose answer an edge cut is then not followed (1), and a command that exits inside the minute reads as the refusal it answers with (1). A waited start returns and opens no tunnel; mend service connect reaches the port. UDP has no probe, and a recipe that declares only a port is adopted with one probe, so \-\-wait takes neither.
|
|
14
|
+
.PP
|
|
13
15
|
The port is tunnelled to this machine's loopback as soon as it listens, unless \-\-no\-connect.
|
|
14
16
|
.SH OPTIONS
|
|
15
17
|
.TP
|
|
18
|
+
.B \-\-wait
|
|
19
|
+
return once the port answers: 0; process ended 2, session gone 3; no tunnel
|
|
20
|
+
.TP
|
|
21
|
+
.B \-\-timeout <duration>
|
|
22
|
+
bound \-\-wait (90, 90s, 5m, 1h); still starting then exits 124. Default: 10m
|
|
23
|
+
.TP
|
|
16
24
|
.B \-\-port <port>
|
|
17
25
|
the port the command listens on inside the workspace
|
|
18
26
|
.TP
|
|
@@ -34,5 +42,9 @@ do not tunnel the port to this machine
|
|
|
34
42
|
.B mend service web
|
|
35
43
|
.br
|
|
36
44
|
the Service named web in mend.toml
|
|
45
|
+
.PP
|
|
46
|
+
.B mend service run web \-\-wait \-\-timeout 15m
|
|
47
|
+
.br
|
|
48
|
+
returns once web answers; 124 if it is still starting after 15 minutes
|
|
37
49
|
.SH SEE ALSO
|
|
38
|
-
mend(1), mend\-service\-init(1), mend\-service\-connect(1), mend\-service\-logs(1)
|
|
50
|
+
mend(1), mend\-service\-init(1), mend\-service\-connect(1), mend\-service\-logs(1), mend\-logs(1)
|
package/man/mend-service-stop.1
CHANGED