Porthole
Reference

CLI reference

Every Porthole command, flag, and environment variable.

porthole host      Start a terminal sharing session
porthole join      Join a session from your terminal, without a browser
porthole replay    Play back a recorded session
porthole template  Manage reusable session configurations
porthole probe     Collect read-only diagnostics into a shareable report
porthole update    Update porthole to the latest release
porthole version   Print version and platform information

Global flags

Available on every command.

FlagDefaultDescription
--server <url>build-time defaultSignaling server URL. Also $PORTHOLE_SERVER.
--log-level <level>infodebug, info, warn, or error. Also $PORTHOLE_LOG_LEVEL.

porthole host

Spawns a PTY shell and shares it with a remote viewer over a direct P2P WebRTC connection. No terminal data passes through the signaling server.

porthole host [flags]

Session

FlagDefaultDescription
--shell <name>$SHELL, else bashShell to spawn. Also $PORTHOLE_SHELL.
--expire <duration>0 (never)Auto-expire after a duration, e.g. 30m.
--oncefalseClose the session after the first viewer disconnects.
--no-inputfalseDo not read this terminal's keyboard, and do not mirror the shared shell here.
--allow-rootfalseShare even though the agent is running as root. Also $PORTHOLE_ALLOW_ROOT.

Access control

FlagDefaultDescription
--readonlyfalseViewers cannot type. Enforced by the agent, not the browser.
--password <value>noneRequire viewers to supply this password. Prefer $PORTHOLE_PASSWORD.
--allow <name>noneInvite a named person; each gets a personal join secret. Repeatable.
--auto-approvefalseWith --readonly, grant write access as soon as a viewer asks.
--no-requestsfalseWith --readonly, refuse viewer requests for write access.
--request-duration <duration>0 (until session end)With --auto-approve, how long a grant lasts.

See Read-only, Write access, Passwords, and Named invites.

Credential masking

FlagDefaultDescription
--maskfalseRedact credentials from output before it reaches the viewer. Best-effort.
--mask-pattern <regex>noneAdditional regex to redact. Repeatable; implies --mask.
--mask-no-autofalseWith --mask, use only --mask-pattern and disable the built-in rules.

See Credential masking.

Recording

FlagDefaultDescription
--recordfalseRecord the session to an asciicast file.
--record-output <path>auto-generatedWhere to write it. Also $PORTHOLE_RECORD_OUTPUT.
--title <text>noneTitle stored in the file header. Implies --record. Also $PORTHOLE_TITLE.

See Recording and replay.

Session context

FlagDefaultDescription
--ctx <file>noneAttach session context from a YAML file.
--ctx-title <text>noneContext title shown to the viewer.
--ctx-note <text>noneContext note shown to the viewer.
--ctx-env <name>noneEnvironment badge, e.g. production.
--ctx-severity <level>noneSeverity badge, e.g. high.
--ctx-link <label=url>noneContext link. Repeatable.

See Session context.

Templates and output

FlagDefaultDescription
--template <name>noneApply a saved session template.
--save-as <name>noneSave this invocation's flags as a template.
--no-qrfalseSkip the QR code.
--no-linkfalseShow the session code only, skip the link.

Host controls

While hosting, Ctrl+] is the local command prefix.

KeysDoes
Ctrl+] q or .End the session
Ctrl+] wLet the viewer type
Ctrl+] rStop the viewer typing, now
Ctrl+] ?List the commands
Ctrl+] Ctrl+]Send a literal Ctrl+] to the shell

Ctrl+C goes to the shared shell, not to Porthole — raw mode clears ISIG, as over SSH. Use Ctrl+] q to end a session. See Host controls.

porthole join

Connects to a session and renders it in this terminal — the browser viewer without the browser. Accepts a bare code, a link, or an invite link.

porthole join <token-or-link> [flags]
FlagDefaultDescription
--writefalseAsk the host for write access. Does not grant it.
--readonlytrueWatch without requesting input access. The default.
--name <text>noneDisplay name shown to the host.
--record <file>noneRecord what you are shown to this asciicast file.
--cols <n>autoPin the terminal width reported to the host.
--rows <n>autoPin the terminal height reported to the host.

Press Ctrl+] to disconnect. See Watching in a terminal.

porthole replay

Plays back an asciicast recording. Forward-only.

porthole replay <file> [flags]
FlagDefaultDescription
--speed <n>1Playback speed multiplier, e.g. 2 for double speed.
--idle-limit <duration>2sCap on any single pause. 0 replays real timings.
--from <duration>0Skip ahead, replaying earlier output instantly.
--infofalsePrint recording metadata and exit.

porthole template

Manages reusable session configurations, stored as one YAML file per template.

porthole template list
porthole template show <name>
porthole template delete <name>
porthole template path

See Session templates.

porthole probe

Collects read-only diagnostics into a structured report. Never invokes a shell; only allowlisted binaries may run.

porthole probe [flags]
FlagDefaultDescription
--profile <name>defaultOne of default, web-server, nodejs, python, database, kubernetes, docker.
--dry-runfalseList the commands that would run, without executing them.
--output <path>, -ononeWrite the report to a file.
--include <cmd>noneAdditional command to run. Repeatable.
--jsonfalsePrint the full report as JSON to stdout.
--no-maskfalseDo not redact credentials from the captured output.

See Diagnostics.

porthole update

Downloads and installs the latest release. The new binary is verified against the release manifest's SHA-256 digest before it replaces the running executable.

porthole update [flags]
FlagDefaultDescription
--checkfalseReport whether a newer version exists, without installing.
--forcefalseReinstall even if already up to date, or installed via a package manager.

porthole version

porthole version

Prints the version and platform, e.g. porthole v0.1.0 (linux/amd64).

Environment variables

Full list, including the configuration directory, in Environment and configuration.

On this page