servercmd

package
v0.4.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package servercmd provides the `portholed serve` command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdmin

func NewAdmin(load func() (*config.Config, error)) *cobra.Command

NewAdmin returns the `admin` command group: clients of the running server's admin API over its unix socket. Access to the socket is the permission, so the commands need no token and must run as a user that may open it.

func NewDoctor

func NewDoctor(load func() (*config.Config, error)) *cobra.Command

NewDoctor returns the `doctor` command: a read-only diagnosis of a server installation (configuration, data directory, DNS, ports, health endpoint, certificates). It changes nothing and exits with status 1 when a check fails.

func NewHostKey

func NewHostKey(load func() (*config.Config, error)) *cobra.Command

NewHostKey returns the `ssh-hostkey` command: it prints the SHA256 fingerprint of the SSH gateway host key so the user can compare it with the one ssh shows on the first connection through the gateway.

func NewJoin

func NewJoin(load func() (*config.Config, error)) *cobra.Command

NewJoin returns the `join` command group: one-time join links, managed through the running server's admin socket (ADR 0005). Access to the socket is the permission, as for `admin`.

func NewMCP

func NewMCP(load func() (*config.Config, error), version string) *cobra.Command

NewMCP returns the `mcp` command: the operator MCP server on stdin/stdout (ADR 0005, surface A). It reaches the running server through the admin unix socket, so whoever may open the socket may use every tool; run it over ssh (`claude mcp add porthole -- ssh host portholed mcp`) or locally on the server.

func NewServe

func NewServe(
	load func() (*config.Config, error),
	openStore func(ctx context.Context, cfg *config.Config) (store.Store, error),
	version string,
) *cobra.Command

NewServe returns the `serve` command. load produces the validated configuration (the caller decides where it comes from: file, environment, flags); openStore opens the persistent store for it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL