Versions in this module Expand all Collapse all v0 v0.1.0 Jul 26, 2026 Changes in this version + var ErrNotHandled = errors.New("command not handled") + func Connect(ctx context.Context, conf Config, args []string, opts ...ConnectOption) error + func ExitCode(err error) (code int, ok bool) + func Listen(ctx context.Context, conf Config, handler Handler) error + func WithSession(ctx context.Context, s Session) context.Context + type Config struct + Host string + HostKeyPEM []byte + HostPublicKey []byte + Password string + Port int + ShutdownGrace time.Duration + type ConnectOption func(*connectOpts) + func AutoPTY() ConnectOption + func WithLocalCommand(name string, fn func(context.Context, []string) error) ConnectOption + func WithLocalFallback(name string, fn func(context.Context, []string) error) ConnectOption + func WithPTY() ConnectOption + type ExitError struct + Code int + Err error + func (e *ExitError) Error() string + func (e *ExitError) Unwrap() error + type Handler func(ctx context.Context, s Session, args []string) error + type Interactive struct + Model tea.Model + Opts []tea.ProgramOption + func (*Interactive) Error() string + type Session interface + CreateFile func(path string) (io.WriteCloser, error) + OpenFile func(path string) (io.ReadCloser, error) + ReadFile func(path string) ([]byte, error) + Stderr func() io.Writer + WriteFile func(path string, data []byte) error + func SessionFrom(ctx context.Context) Session