add-wshcmd

Create Cobra-based wsh command files with RunE logic and RPC integration.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/marrabld/waveterm --skill add-wshcmd-marrabld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-wshcmd
Source: https://github.com/marrabld/waveterm/tree/main/.kilocode/skills/add-wshcmd
Command: npx skills add https://github.com/marrabld/waveterm --skill add-wshcmd-marrabld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps developers extend Wave Terminal by adding new wsh commands, enabling custom CLI capabilities and backend integrations without modifying core code.

Core Features & Use Cases

  • Provides a clear pattern for creating Cobra-based command files (wshcmd-*.go) with RunE logic, PreRunE, flags, and block resolution.
  • Defines RPC integration via the wshrpc/wshclient interfaces, enabling commands to perform backend operations and telemetry.
  • Covers documentation, testing, and onboarding steps to publish new commands for team use. Use cases include adding new commands to automate workflows, extend CLI capabilities, and implement bespoke administrative tools.

Quick Start

Create the command file in cmd/wsh/cmd named wshcmd-[name].go, implement RunE logic and PreRunE if RPC is needed, wire it into init(), and update the in-repo documentation.

Frequently Asked Questions about add-wshcmd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new wsh command to Wave Terminal?

To add a new wsh command, create a Cobra-based command file named wshcmd-[name].go, implement the RunE logic, wire it into init(), and update the in-repo documentation for team use.

Does Wave Terminal support RPC integration for custom CLI commands?

Yes, custom wsh commands support RPC integration via wshrpc/wshclient interfaces, enabling your commands to perform backend operations and telemetry hooks without modifying core code.

What is the file naming convention for creating Cobra commands in Wave Terminal?

The file naming convention for creating Cobra commands in Wave Terminal requires placing your command file in cmd/wsh/cmd and naming it using the wshcmd-[name].go pattern.

Can I create grouped subcommands with flags using the wsh command pattern?

Yes, the wsh command pattern applies to both single commands and grouped subcommands, supporting proper flags, block resolution, PreRunE logic, and telemetry hooks.

Do I need to modify Wave Terminal core code to extend the CLI?

No, you do not need to modify Wave Terminal core code to extend the CLI. You can add custom commands by creating standalone Cobra-based command files and wiring them into init().

What is the best way to publish new wsh commands for team use?

The best way to publish new wsh commands is to follow the skill's documentation steps, which cover testing, onboarding, and updating in-repo documentation to make commands available for team use.