Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
"name": "must-gather",
"source": "./plugins/must-gather",
"description": "A plugin to analyze and report on must-gather data"
},
{
"name": "hcp",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, could we call the plugin "hypershift"? It'd be more discoverable

Copy link
Contributor Author

@jparrill jparrill Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was doubting that too, actually my first iteration was using hypershift but hcp was smaller and easy to remember, also the users are used to use that command outside of claude (we have 2 CLIs hypershift (dev supported) hcp (fully customer supported)). I think hcp is smaller and maybe better.

It's there any way to call the plugin hypershift at marketplace level but use the command as hcp (maybe it's confusing too)?

"source": "./plugins/hcp",
"description": "Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions"
}
]
}
10 changes: 10 additions & 0 deletions PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This document lists all available Claude Code plugins and their commands in the
- [Ci](#ci-plugin)
- [Doc](#doc-plugin)
- [Git](#git-plugin)
- [Hcp](#hcp-plugin)
- [Hello World](#hello-world-plugin)
- [Jira](#jira-plugin)
- [Must Gather](#must-gather-plugin)
Expand Down Expand Up @@ -60,6 +61,15 @@ Git workflow automation and utilities

See [plugins/git/README.md](plugins/git/README.md) for detailed documentation.

### Hcp Plugin

Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions

**Commands:**
- **`/hcp:generate` `<provider> <cluster-description>`** - Generate ready-to-execute hypershift cluster creation commands from natural language descriptions

See [plugins/hcp/README.md](plugins/hcp/README.md) for detailed documentation.

### Hello World Plugin

A hello world plugin
Expand Down
46 changes: 46 additions & 0 deletions docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,52 @@
}
],
"has_readme": true
},
{
"name": "hcp",
"description": "Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions",
"version": "0.0.1",
"commands": [
{
"name": "generate",
"description": "Generate ready-to-execute hypershift cluster creation commands from natural language descriptions",
"synopsis": "/hcp:generate <provider> <cluster-description>",
"argument_hint": "<provider> <cluster-description>"
}
],
"skills": [
{
"name": "HyperShift Agent Provider",
"id": "hcp-create-agent",
"description": "Use this skill when you need to deploy HyperShift clusters on bare metal, edge environments, or disconnected infrastructures using pre-provisioned agents"
},
{
"name": "HyperShift AWS Provider",
"id": "hcp-create-aws",
"description": "Use this skill when you need to deploy HyperShift clusters on AWS infrastructure with proper STS credentials, IAM roles, and VPC configuration"
},
{
"name": "HyperShift Azure Provider",
"id": "hcp-create-azure",
"description": "Use this skill when you need to deploy HyperShift clusters on Microsoft Azure with proper identity configuration and resource management"
},
{
"name": "HyperShift KubeVirt Provider",
"id": "hcp-create-kubevirt",
"description": "Use this skill when you need to deploy HyperShift clusters on existing Kubernetes clusters using KubeVirt virtualization"
},
{
"name": "HyperShift OpenStack Provider",
"id": "hcp-create-openstack",
"description": "Use this skill when you need to deploy HyperShift clusters on OpenStack infrastructure with proper flavor selection and network configuration"
},
{
"name": "HyperShift PowerVS Provider",
"id": "hcp-create-powervs",
"description": "Use this skill when you need to deploy HyperShift clusters on IBM Cloud PowerVS with proper processor configuration and resource management"
}
],
"has_readme": true
}
]
}
8 changes: 8 additions & 0 deletions plugins/hcp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "hcp",
"description": "Generate HyperShift cluster creation commands via hcp CLI from natural language descriptions",
"version": "0.0.1",
"author": {
"name": "github.com/openshift-eng"
}
}
142 changes: 142 additions & 0 deletions plugins/hcp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# HCP Plugin

The HCP plugin generates intelligent `hypershift create cluster` commands from natural language descriptions across multiple cloud providers and platforms.

## Overview

This plugin translates natural language descriptions into precise, ready-to-execute `hypershift create cluster` commands, applying provider-specific best practices and handling complex parameter validation automatically. The plugin **generates commands for you to run** - it does not provision clusters directly.

## Commands

### `/hcp:generate`

Generate ready-to-execute hypershift cluster creation commands from natural language descriptions.

**Usage:**
```
/hcp:generate <provider> <cluster-description>
```

**Supported Providers:**
- `aws` - Amazon Web Services
- `azure` - Microsoft Azure (self-managed control plane)
- `kubevirt` - KubeVirt on existing Kubernetes clusters
- `openstack` - OpenStack clouds
- `powervs` - IBM Cloud PowerVS
- `agent` - Bare metal and edge deployments

**Examples:**
```bash
# AWS development cluster
/hcp:generate aws "development cluster for testing new features"

# High-availability KubeVirt cluster
/hcp:generate kubevirt "production cluster with high availability"

# Cost-optimized Azure cluster
/hcp:generate azure "small cluster for dev work, minimize costs"

# Disconnected bare metal cluster
/hcp:generate agent "airgapped cluster for secure environment"
```

## Key Features

- **Multi-Provider Support**: Works with AWS, Azure, KubeVirt, OpenStack, PowerVS, and Agent providers
- **Smart Analysis**: Extracts requirements from natural language descriptions
- **Interactive Prompts**: Guides users through provider-specific configurations
- **Best Practices**: Applies provider-specific defaults and optimizations
- **Security Validation**: Ensures safe parameter handling and credential management
- **Network Conflict Prevention**: Especially critical for KubeVirt deployments

## Provider-Specific Skills

The plugin uses specialized skills for each provider:

- **`hcp-create-aws`**: AWS-specific guidance including STS credentials, IAM roles, and VPC configuration
- **`hcp-create-azure`**: Azure identity configuration, resource groups, and region management
- **`hcp-create-kubevirt`**: Network conflict prevention, VM sizing, and storage class management
- **`hcp-create-openstack`**: OpenStack credentials, external networks, and flavor selection
- **`hcp-create-powervs`**: IBM Cloud integration, processor types, and resource group management
- **`hcp-create-agent`**: Bare metal deployment, agent management, and disconnected environments

## Installation

### From AI Helpers Marketplace

```bash
# Add the marketplace
/plugin marketplace add openshift-eng/ai-helpers

# Install the HCP plugin
/plugin install hcp@ai-helpers

# Use the command
/hcp:generate aws "development cluster for API testing"
```

### Manual Installation (Cursor)

```bash
# Clone the repository
mkdir -p ~/.cursor/commands
git clone [email protected]:openshift-eng/ai-helpers.git
ln -s ai-helpers ~/.cursor/commands/ai-helpers
```

## Common Use Cases

### Development Environments
- Quick cluster setup for testing
- Cost-optimized configurations
- Single replica control planes

### Production Deployments
- High-availability configurations
- Multi-zone deployments
- Auto-repair and monitoring enabled

### Edge Computing
- Minimal resource footprints
- Disconnected/airgapped environments
- Agent-based deployments

### Special Requirements
- FIPS compliance configurations
- IPv6 and dual-stack networking
- Custom storage and compute requirements

## Architecture

The plugin follows a modular architecture with:

1. **Main Command**: `/hcp:generate` acts as an orchestrator
2. **Provider Skills**: Specialized implementation guidance for each provider
3. **Interactive Workflows**: Guided parameter collection and validation
4. **Smart Defaults**: Environment-specific best practices

This design ensures:
- **Single Source of Truth**: Each provider's knowledge lives in one place
- **Extensibility**: Easy to add new providers or update existing ones
- **Maintainability**: Clear separation of concerns between providers

## Contributing

To add support for a new provider:

1. Create a new skill directory: `plugins/hcp/skills/hcp-create-<provider>/`
2. Implement the `SKILL.md` file following the established pattern
3. Update the main command to invoke the new skill
4. Test the implementation and add examples

See existing skills as reference implementations.

## Support

- **Issues**: [GitHub Issues](https://github.com/openshift-eng/ai-helpers/issues)
- **Documentation**: [HyperShift Documentation](https://hypershift.openshift.io/)
- **Skills**: View individual skill files in `plugins/hcp/skills/`

## License

This plugin is part of the AI Helpers project and follows the same licensing terms.
Loading