npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cluster-code/cluster-code

v1.2.8

Published

AI-powered CLI tool for building, maintaining, and troubleshooting Kubernetes and OpenShift clusters

Readme

Cluster Code

Cluster Code

AI-powered CLI tool for Kubernetes and OpenShift cluster management with intelligent diagnostics, multi-cloud support, and GitOps workflows. Inspired by pi-mono.

⚡ Quick Start

Install

npm install -g cluster-code

Configure LLM Provider

# Option 1: Auto-detect from Claude Code (if ~/.claude/settings.json exists)
# cluster-code will automatically use your Claude API key

# Option 2: Set environment variables
export ANTHROPIC_API_KEY=your-api-key  # Anthropic (Claude)
export OPENAI_API_KEY=your-api-key     # Or OpenAI

# Option 3: Use local models (no API key needed)
ollama pull llama3
cluster-code config provider add ollama

Connect & Go

cluster-code init
cluster-code

That's it! Start chatting with your cluster in plain English.

✨ Key Features

  • 💬 Natural Language Interface - Control your cluster using plain English
  • 🤖 Agentic Mode - Autonomous execution with Claude Agent SDK
  • 🔍 AI-Powered Diagnostics - Intelligent troubleshooting with K8sGPT
  • ☁️ Multi-Cloud Support - AWS EKS, Azure AKS/ARO, GCP GKE
  • 🚀 GitOps Ready - Helm, Kustomize, ArgoCD, Flux integration
  • 🔒 Local LLM Support - Use Ollama for complete data privacy
  • 🎯 OpenShift Native - Routes, Operators, BuildConfigs support
  • 🤖 RL-Based Management - Optional PufferLib integration for training AI agents
  • 🔐 GitHub Copilot Integration - OAuth authentication and multi-model support
  • 🖥️ Multiple UI Modes - Interactive, TUI, and legacy chat modes
  • 🪝 Extensible Hooks System - Plugin architecture inspired by pi-mono

📚 Documentation

View Full Documentation →

💡 Usage Examples

Interactive Mode (Default)

# Start interactive natural language interface
$ cluster-code
# or explicitly
$ cluster-code interactive

You: Show me all pods that are failing
You: Why is my deployment crashing?
You: Scale my app to 5 replicas

Agentic Mode (Autonomous Execution)

# Start agentic mode with Claude Agent SDK (Claude-only)
$ cluster-code agent
# or with a specific task
$ cluster-code agent "Fix all failing pods in the cluster"

TUI Mode

# Start terminal user interface
$ cluster-code ui

Direct Commands

# Run cluster diagnostics
cluster-code diagnose

# Show cluster and CLI info
cluster-code info

# Initialize cluster connection
cluster-code init

# Run first-time setup wizard
cluster-code setup

Model & Authentication Management

# Configure model interactively
cluster-code --configure-model

# List available models
cluster-code --list-models

# Use a specific model for this session
cluster-code --model gpt-4

# Set default model permanently
cluster-code --set-default-model claude-3-opus

# GitHub Copilot authentication
cluster-code --setup-github
cluster-code --show-auth
cluster-code --whoami
cluster-code --test-connection
cluster-code --logout-github

Reinforcement Learning (Optional)

Train AI agents to automatically manage your cluster using PufferLib:

# Set up RL environment (optional during init)
cluster-code rl setup

# Train an agent
cluster-code rl train --episodes 500

# Run RL-based diagnostics
cluster-code rl diagnose

See the PufferLib RL Guide for details.

🪝 Hooks System

Cluster-code features an extensible hooks system inspired by pi-mono:

import { hooks, registerHooks } from 'cluster-code';

// Register custom hooks
registerHooks([
  {
    name: 'before:agent:start',
    handler: async event => {
      console.log('Agent starting with:', event.context);
      return { success: true };
    },
    priority: 0,
  },
  {
    name: 'agent:tool:result',
    handler: async event => {
      console.log('Tool result:', event.toolName);
      return { success: true };
    },
  },
]);

Available Hooks

| Hook | Description | | ------------------------ | --------------------------- | | before:agent:start | Before agent session starts | | agent:tool:call | When a tool is called | | agent:tool:result | After tool execution | | before:command:execute | Before command execution | | after:command:execute | After command execution | | before:diagnostic:run | Before diagnostic run | | diagnostic:result | After diagnostic completion | | cluster:connect | When connecting to cluster | | llm:call | LLM API call events | | session:start | Session start | | session:end | Session end |

See Hooks Documentation for details.

🔌 Plugin Architecture

  • cluster-core - Core Kubernetes operations
  • k8sgpt-analyzers - AI-powered diagnostics
  • cluster-openshift - OpenShift-specific features
  • cloud-providers - Multi-cloud provisioning
  • gitops - Deployment automation

Learn more about plugins →

🤝 Contributing

We welcome contributions! Check out our contributing guide to get started.

📝 License

MIT License - see LICENSE for details

🔗 Links


Ready to get started? Install cluster-code and check out our Quick Start Guide