carapace

Generate shell completions for CLI tools using YAML specifications.

1.9k|133|Updated Apr 20, 2020
One-click install
npx skills add https://github.com/carapace-sh/carapace-bin --skill carapace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: carapace
Source: https://github.com/carapace-sh/carapace-bin/tree/main/skills/carapace
Command: npx skills add https://github.com/carapace-sh/carapace-bin --skill carapace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires carapace, carapace-spec, carapace-bridge, carapace-pflag, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation and management of shell completions for CLI tools, making it easier to integrate with existing commands and extend their functionality.

Core Features & Use Cases

  • CLI Completion Generation: Automates the creation of completion scripts for commands using Go and YAML specifications.
  • Custom Completion Actions: Allows defining custom completion actions in Go for complex completion logic.
  • YAML Spec Management: Facilitates the creation and modification of completion specifications in YAML format.
  • Integration with Existing Tools: Enables the integration of completion capabilities into existing CLI tools using cobra.

Quick Start

Use the carapace skill to generate completion scripts for the 'myapp' command.

Frequently Asked Questions about carapace

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

FAQPage Schema
How do I generate shell completion scripts for a custom CLI tool?

You can define completion specifications using YAML format and execute them with Python libraries. This requires knowledge of YAML for spec definition and Python for execution to automate shell completion management.

Can I define custom completion actions for complex CLI logic in Go?

Yes, custom completion actions can be defined in Go to handle complex completion logic. This allows developers to extend CLI functionality beyond standard specifications and implement tailored command-line interface behaviors.

Does this shell completion approach work with existing CLI tools using cobra?

Integration requires dependencies including carapace, carapace-spec, carapace-bridge, and carapace-pflag. You also need knowledge of YAML and Python to define and execute the completion specifications.

What is the best way to manage YAML completion specs for command-line interfaces?

Managing YAML completion specs is best handled by creating and modifying completion specifications directly in YAML format. This approach streamlines CLI integration and allows systematic updates to shell completion rules.

Do I need Python and YAML knowledge to automate CLI completion generation?

Yes, knowledge of YAML and Python is required to define and execute completion specifications. These languages form the foundation for automating the generation and management of shell completions for CLI tools.