add-wshcmd

Guide adding new commands to the Wave Terminal wsh CLI tool.

22.0k|1.1k|Updated Jun 8, 2022
One-click install
npx skills add https://github.com/wavetermdev/waveterm --skill add-wshcmd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-wshcmd
Source: https://github.com/wavetermdev/waveterm/tree/main/.kilocode/skills/add-wshcmd
Command: npx skills add https://github.com/wavetermdev/waveterm --skill add-wshcmd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to adding new commands to the wsh command-line interface, enabling users to extend Wave Terminal's functionality.

Core Features & Use Cases

  • Step-by-step instructions: Covers creating command files, structuring commands, implementing logic, defining flags, and working with RPC calls.
  • Best practices and common patterns: Includes guidance on error handling, output, and documentation.
  • Use Case: A developer needs to add a new command to wsh that interacts with Wave Terminal's backend to manage user profiles. This Skill provides the exact steps and code examples needed.

Quick Start

Follow the step-by-step guide to create a new Go file for your command in the cmd/wsh/cmd/ directory.

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 command to the Wave Terminal wsh CLI?▼

To add a new command to the wsh CLI, create a new Go file in the cmd/wsh/cmd/ directory, define the command structure, implement logic, set flags, and integrate RPC calls for backend interaction.

What is the process for integrating RPC calls in a custom wsh command?▼

Integrating RPC calls in a wsh command involves defining the command structure in a Go file and establishing RPC communication to interact with the Wave Terminal backend for executing desired operations.

Where should I define command flags for a wsh CLI extension?▼

Command flags for a wsh CLI extension should be defined within the Go command file structure in the cmd/wsh/cmd/ directory, allowing the command to accept varied user inputs and parameters.

How do I document a new wsh command in Wave Terminal?▼

Document a new wsh command by adding entries to the docs/docs/wsh-reference.mdx file, ensuring users can find usage instructions and flag definitions for the newly implemented CLI extension.

What are the best practices for error handling in a wsh CLI command?▼

Best practices for error handling in a wsh CLI command include implementing robust error capture within the command logic and ensuring clear output formatting to guide users during execution failures.

Do I need to know Go to extend the Wave Terminal command line?▼

Yes, extending the Wave Terminal command line requires Go programming knowledge to create command files, define structures, implement logic, and handle RPC integration within the cmd/wsh/cmd/ directory.