wirecmd

command module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 5 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.

README

Wire Command (wirecmd)

Wirecmd makes configured tools available through a predictable shell interface for agents, humans, scripts, and CI. It discovers capabilities only when they are needed, keeps stdout composable, and lets ordinary shell tooling remain the integration layer.

agent / human / automation
          |
          v
        shell
          |
          v
       wirecmd
          |
          v
  MCP servers and language servers

Wirecmd currently provides:

  • MCP tools and resources over stdio, Streamable HTTP, and legacy HTTP+SSE;
  • SDK-backed OAuth for protected Streamable HTTP servers;
  • native, selector-routed LSP navigation and read-only inspection;
  • KDL 2 configuration with automatic discovery, workspace trust, and optional age-backed secret stores; and
  • a foreground local daemon that retains upstream sessions between commands.

Normal commands use the daemon and fail clearly when it is unavailable. --direct is the explicit one-shot path for testing and diagnosis; Wirecmd never falls back to it silently.

Install

Wirecmd requires Go 1.26 or newer. Install the latest release with:

go install github.com/Kaylebor/wirecmd@latest
wirecmd --version

To install v0.5.0 exactly:

go install github.com/Kaylebor/wirecmd@v0.5.0

Linux and macOS are supported; see release readiness for the qualification boundary and runtime prerequisites.

First call

Save a minimal workspace configuration as .wirecmd/config.kdl, replacing the command with an installed stdio MCP server executable and its actual arguments:

mkdir -p .wirecmd
wirecmd {
    mcp "local" {
        stdio "/absolute/path/to/mcp-server"
    }
}

Trust the workspace once before automatic discovery can use its configuration:

wirecmd config trust .

For a locally buildable example with set_value and read_value tools, follow the test fixture instructions and use the fixture's absolute executable path.

Start the foreground daemon in one terminal:

wirecmd daemon run

On Linux, XDG_RUNTIME_DIR must be an absolute, private, same-user directory; the login session normally configures it.

Then discover the configured server and invoke its tools from another:

wirecmd mcp
wirecmd mcp local
wirecmd --help mcp local tool set_value
wirecmd mcp local tool set_value --value hello
wirecmd mcp local tool read_value

The daemon retains initialized sessions, so the example value survives across separate CLI invocations. Use the server's discovered tool names and focused help for other configurations.

Configuration

Wirecmd can compose global configuration with trusted .wirecmd/config.kdl files in the current workspace. Repeated --config PATH options instead provide the complete ordered source list and bypass automatic discovery and trust checks; an explicit path may use any filename. After changing configuration used by the daemon, run:

wirecmd daemon reload

An MCP definition selects exactly one of stdio, Streamable HTTP, or legacy HTTP+SSE. LSP definitions supply their executable, arguments, environment, language IDs, and selectors. Wirecmd resolves one project root from an explicit root, the nearest .wirecmd/config.kdl, and optional Git discovery; it does not infer or install language servers. MCP and LSP definitions default to workspace scope, so scope "workspace" is optional. Use scope "global" for a provider whose lifecycle and default root belong to Wirecmd's global configuration directory rather than the current project. Global HTTP providers can be context-free; global stdio MCP and LSP providers require that directory.

Provider inputs can explicitly materialize call context with (template) and ${wirecmd.cwd}, ${wirecmd.project-root}, or ${wirecmd.global-root}. This works in stdio executable, argument, and environment values, HTTP/SSE and OAuth values, and the corresponding LSP stdio fields. Templates are single-pass and do not interpolate secrets or change Wirecmd control fields. See the configuration reference for the exact syntax and lifecycle effects.

LSP definitions may also provide one arbitrary strict JSON initialization-options value. Adding (template) expands the same context references only inside JSON string values, which keeps the JSON structure and numbers under the configurator's control. Wirecmd does not infer server-specific options, expose the document in status, or interpolate secrets into it.

See the configuration reference for the complete KDL surface, discovery and trust rules, transports, secrets, OAuth, and LSP setup.

Using Wirecmd

Start with the built-in help:

wirecmd --help
wirecmd --help daemon
wirecmd --help config
wirecmd --help auth
wirecmd --help lsp

Administrative and LSP help is offline. MCP server and focused tool help uses live upstream metadata, so it requires the daemon or an explicit --direct invocation.

Terminal output is designed for reading; piped output is compact JSON. Agents using a PTY can request deterministic machine presentation with --format json --color never. Diagnostics go to stderr, and structured errors include a recovery action when one is available.

go install installs only the binary. From a checkout, install Fish completion manually:

mkdir -p ~/.config/fish/completions
cp completions/wirecmd.fish ~/.config/fish/completions/wirecmd.fish

The completion reads local configuration only and never starts a server, contacts the daemon, resolves secrets, or opens OAuth.

Learn more

Agents should start with the repository primer in AGENTS.md; contributor and maintainer procedures are in the development guide.

License

Wirecmd is licensed under the Apache License 2.0.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
buildinfo
Package buildinfo reports the version embedded in the Wirecmd executable.
Package buildinfo reports the version embedded in the Wirecmd executable.
cli
Package cli implements Wirecmd's first machine-composable command surface.
Package cli implements Wirecmd's first machine-composable command surface.
config
Package config parses and composes the first-slice Wirecmd configuration.
Package config parses and composes the first-slice Wirecmd configuration.
contexttmpl
Package contexttmpl expands Wirecmd's fixed invocation-context references.
Package contexttmpl expands Wirecmd's fixed invocation-context references.
discovery
Package discovery resolves trusted Wirecmd configuration sources.
Package discovery resolves trusted Wirecmd configuration sources.
jsontemplate
Package jsontemplate validates and materializes context templates embedded in JSON string values without changing the surrounding JSON representation.
Package jsontemplate validates and materializes context templates embedded in JSON string values without changing the surrounding JSON representation.
lspclient
Package lspclient implements Wirecmd's narrow, server-neutral LSP client.
Package lspclient implements Wirecmd's narrow, server-neutral LSP client.
oauthstore
Package oauthstore persists opaque OAuth state without placing credentials in the filesystem in plaintext.
Package oauthstore persists opaque OAuth state without placing credentials in the filesystem in plaintext.
secrets
Package secrets resolves provider-qualified secret references.
Package secrets resolves provider-qualified secret references.

Jump to

Keyboard shortcuts

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