Help us shape the future of Go! Take the 2026 Go Developer Survey

commands

package
v1.3.97 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package commands cmd/apps/pty/commands/pty.go c3-vis-pty `skywire app pty <mode>` command tree.

The pty (pseudoterminal) subsystem has four operational modes:

  • visor visor-hosted Internal app. Started by the launcher; not exposed here. (See RFC #2775 Phase 3.3.)
  • dmsg standalone process with a dmsg listener (own keys, own dmsg client). Can also enable a TCP listener via --tcp-listen; --no-dmsg makes it TCP-only.
  • tcp standalone TCP-only (ssh equivalent). Convenience wrapper that forces --no-dmsg on `dmsg`; --addr is required and seeds --tcp-listen.
  • http HTTP/WebSocket bridge — serves a real PTY in a browser via the pty.UI machinery. Bridges to a running mode-1/2/3 pty server via --hnet + --haddr.

Plus an `exec` subcommand that dials a remote pty server and runs a command (the old `dmsgpty-cli` flow), with `whitelist` management subcommands underneath it.

Code layout: each mode here is a **thin delegating wrapper** — disables flag parsing and forwards all args (including --help) to the underlying `cmd/dmsg/pty-{host,ui,cli}/` RootCmd via SetArgs + Execute. The dmsg subcommand tree continues to mount those RootCmds as `dmsg pty <cli|host|ui>` (the standalone dmsg binary needs that surface intact); the skywire-binary import hides the dmsg-pty group so help output funnels operators here. The package-level code identifiers (`pkg/dmsg/dmsgpty/`, `conf.Pty`, etc.) are unchanged — deeper rename is a follow-up PR.

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "pty",
	Short: "Pseudoterminal (interactive shell) server and client",
	Long: `Pseudoterminal (pty) — interactive shell over a network.

The same pty subsystem runs in four modes:

  visor     Visor-hosted Internal app (managed by the launcher;
            invoke via 'cli visor app start pty' once Phase 3.3
            lands, not via this command).
  dmsg      Standalone server with a dmsg listener. Pair with
            --no-dmsg + --tcp-listen for a tcp-only deployment.
  tcp       Standalone tcp-only listener (ssh equivalent). Same
            crypto as dmsg's noise layer, transported over raw
            TCP. Requires --addr.
  http      HTTP/WebSocket bridge serving a real pty in a browser.
            Connects to a running mode-1/2/3 pty server.

Auth model inherits the underlying transport's noise-XK + PK
whitelist. See 'skywire app pty <mode> --help' for per-mode flags.`,
	SilenceErrors:         true,
	SilenceUsage:          true,
	DisableSuggestions:    true,
	DisableFlagsInUseLine: true,
}

RootCmd is the `app pty` command. Mounted onto the top-level appsCmd by cmd/skywire/commands/root.go.

Functions

func Execute

func Execute()

Execute is the standalone-binary entry point. Used by cmd/apps/pty/pty.go when the app is invoked as a separate binary; the main `skywire app pty` path goes through the top-level Execute in cmd/skywire/commands/root.go and doesn't call this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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