cmdproxy

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT

README

cmdproxy

Server and client for running commands through a proxy.

About

The purpose of cmdproxy (server and client) is to provide a means to run a selection of command-line applications as if local but ran through the server on another host/container. The communication between server and client is over Unix domain sockets by default.

As an added benefit eventual credentials and secrets live with the server, and not where the tool is run, providing a layer of control in scenarios where other tools make use of command-line tools.

To get the most out of cmdproxy it's recommended to run it in the following pattern:

  • cmdproxy as a server in a container, and use cmdproxy as a client from either another container or the host.
Concepts

Install

Prerequisites:

  • (Optional) Docker Engine (Built-in container handling)
Install script

[!NOTE] Script for Linux and macOS.

curl -fsSL https://codeberg.org/KarlGW/cmdproxy/raw/branch/main/scripts/install.sh | sh
Linux

Go to Releases and download the latest release for Linux:

# This example uses architecture amd64 as an example, if you are using arm64, change it.
curl -sLO https://codeberg.org/KarlGW/cmdproxy/releases/download/v<version>/cmdproxy-<version>-linux-amd64.tar.gz
mkdir -p ~/.local/bin
tar -C ~/.local/bin -xvf cmdproxy-<version>-linux-amd64.tar.gz && rm cmdproxy-<version>-linux-amd64.tar.gz

[!NOTE] Make sure ~/.local/bin is set to $PATH.

macOS

Go to Releases and download the latest release for macOS:

# This example uses architecture arm64 as an example, if you are using amd64, change it.
curl -sLO https://codeberg.org/KarlGW/cmdproxy/releases/download/v<version>/cmdproxy-<version>-darwin-arm64.tar.gz
mkdir -p ~/.local/bin
tar -C ~/.local/bin -xvf cmdproxy-<version>-darwin-arm64.tar.gz && rm cmdproxy-<version>-darwin-arm64.tar.gz

[!NOTE] Make sure ~/.local/bin is set to $PATH.

go install
go install codeberg.org/KarlGW/cmdproxy/cmd/cmdproxy@latest

Usage

Configuration

Server
Container
Client

Command reference

Directories

Path Synopsis
cmd
cmdproxy command
internal
cli
Package cli provides functions to parse command-line arguments and flags.
Package cli provides functions to parse command-line arguments and flags.
client
Package client provides client application lifecycle manager for the client part of the CLI.
Package client provides client application lifecycle manager for the client part of the CLI.
server
Package server provides the server application lifecycle manager for the server part of the CLI.
Package server provides the server application lifecycle manager for the server part of the CLI.
socket
Package socket provides a server and client for creating and using sessions over a socket.
Package socket provides a server and client for creating and using sessions over a socket.

Jump to

Keyboard shortcuts

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