Documentation
¶
Overview ¶
Package servercmd provides the `portholed serve` command.
Index ¶
- func NewAdmin(load func() (*config.Config, error)) *cobra.Command
- func NewDoctor(load func() (*config.Config, error)) *cobra.Command
- func NewHostKey(load func() (*config.Config, error)) *cobra.Command
- func NewJoin(load func() (*config.Config, error)) *cobra.Command
- func NewMCP(load func() (*config.Config, error), version string) *cobra.Command
- func NewServe(load func() (*config.Config, error), ...) *cobra.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdmin ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.