Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f0fca77
feat: add automatic changelog generation workflow
Yuvraj-Sarathe May 17, 2026
56c7f14
Fix formatting in installation instructions
Yuvraj-Sarathe May 17, 2026
b75d96e
Update changelog workflow to save versioned docs
Yuvraj-Sarathe May 17, 2026
7b8198f
Modify changelog workflow to target feature branch
Yuvraj-Sarathe May 17, 2026
dec901f
chore: add version doc changelog for v9.9.9 [skip ci]
github-actions[bot] May 17, 2026
d1cef88
Enhance changelog workflow for docs staging
Yuvraj-Sarathe May 17, 2026
9c4c1b4
chore: add version doc changelog for v1.2.3 [skip ci]
github-actions[bot] May 17, 2026
0ce5d5d
Update changelog workflow to use default branch dynamically
Yuvraj-Sarathe May 17, 2026
b5357fd
Update comment for clarity in changelog workflow
Yuvraj-Sarathe May 17, 2026
c4c89d1
All logs for previous releases added
Yuvraj-Sarathe May 17, 2026
85f4772
Update changelog workflow for versioned documentation
Yuvraj-Sarathe May 17, 2026
cd79a31
feat: implement version-based directory documentation scaffolding system
Yuvraj-Sarathe May 17, 2026
39183f5
feat: align master documentation templates with official v1.2.1 strucโ€ฆ
Yuvraj-Sarathe May 17, 2026
b10ebbf
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
7b46a83
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
c78e8e7
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
4b3513b
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
406d7b8
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
e32b666
Refactor changelog generation in workflow
Yuvraj-Sarathe May 17, 2026
f051a33
Refactor changelog workflow for clarity and alignment
Yuvraj-Sarathe May 17, 2026
658b071
Update .github/workflows/changelog.yml
Yuvraj-Sarathe May 17, 2026
b590d7e
Fix changelog action to use specific commit SHA
Yuvraj-Sarathe May 17, 2026
8f1260d
del
Yuvraj-Sarathe May 17, 2026
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
Comment thread
utkarsh232005 marked this conversation as resolved.
Empty file.
134 changes: 134 additions & 0 deletions .github/docs-template/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# `kdm config` โ€” Configuration Management

**Version:** v1.2.1

## Overview

The `kdm config` command group manages KDM CLI configuration, including notification service setup, custom settings, and credential management. Configuration is stored locally using the `conf` package.

## Syntax

```bash
kdm config <subcommand>
```

## Sub-commands

### `kdm config setup`

Interactively sets up the notification service (Discord webhook or Email SMTP).

**Example:**

```bash
kdm config setup
```

**Interactive Flow:**

1. Select a notification service:
- **Discord** โ€” Send alerts to a Discord channel via webhook.
- **Email (SMTP)** โ€” Send alerts via email SMTP.
- **None** โ€” Disable notifications.

2. For **Discord**, you will be prompted for a webhook URL.
3. For **Email**, you will be prompted for SMTP host, port, user, and recipient email.

**Discord Webhook Setup:**

1. Open your Discord server settings.
2. Go to **Integrations > Webhooks**.
3. Create a new webhook and choose the alert channel.
4. Copy the webhook URL (must start with `https://discord.com/api/webhooks/`).

**Email SMTP Setup:**

| Setting | Default | Description |
|---------|---------|-------------|
| Host | `smtp.gmail.com` | SMTP server address |
| Port | `587` | SMTP port (STARTTLS) |
| User | โ€” | Your email address |
| To | โ€” | Alert recipient email |

> **Note:** SMTP passwords must be set via the `KDM_SMTP_PASSWORD` environment variable.

---

### `kdm config set <key> <value>`

Sets a specific configuration value.

**Example:**

```bash
kdm config set alert_cooldown 300
kdm config set email_port 465
```

**Supported Keys:**

| Key | Type | Description |
|-----|------|-------------|
| `alert_cooldown` | number | Cooldown period between alerts (seconds) |
| `email_port` | number | SMTP port |
| `notification_service` | string | `discord`, `email`, or `none` |
| `discord_webhook` | string | Discord webhook URL |
| `email_host` | string | SMTP host |
| `email_user` | string | SMTP username |
| `email_to` | string | Alert recipient email |

---

### `kdm config list`

Lists all current configuration values.

**Example:**

```bash
kdm config list
```

**Expected Output:**

```
Current KDM Configuration:
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
notification_service : discord
discord_webhook : https://discord.com/api/webhooks/...
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

Note: SMTP passwords must be set via KDM_SMTP_PASSWORD env var.
```

---

### `kdm config clear`

Clears all configuration and resets to defaults.

**Example:**

```bash
kdm config clear
```

**Expected Output:**

```
โœ“ Configuration cleared.
```

## Configuration File Location

Configuration is stored in the default `conf` package location:

- **macOS:** `~/Library/Application Support/kdm-cli`
- **Linux:** `~/.config/kdm-cli`
- **Windows:** `%APPDATA%\kdm-cli`

## Common Errors

- **Invalid webhook URL** โ€” Must match `https://discord.com/api/webhooks/<id>/<token>`.
- **Invalid email address** โ€” Must be a valid email format.
- **Invalid port number** โ€” Must be between 1 and 65535.
154 changes: 154 additions & 0 deletions .github/docs-template/health/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# `kdm health` โ€” Health Status

> **Version:** `v1.2.1`

---

## Overview

The `kdm health` command checks and reports the health status of Kubernetes pods or Docker containers. It provides a clean, color-coded table with real-time status fetched directly from Docker and Kubernetes clients.

> **Fix (Issue #1):**
> This command previously returned only a placeholder message. It now displays real health data from Docker containers and Kubernetes pods.

---

# Syntax

```bash
kdm health <target>
```

---

# Parameters

| Parameter | Description | Valid Values |
| :--- | :--- | :--- |
| `target` | The workload type to check | `pods`, `containers`, `all` |

---

# Usage

---

## `kdm health pods`

Checks the health status of all Kubernetes pods.

### Example

```bash
kdm health pods
```

### Expected Output

```text
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TYPE โ”‚ NAME โ”‚ HEALTH โ”‚ DETAILS โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ pod โ”‚ node-app-6f65c56b74-7tkvf โ”‚ Running โ”‚ namespace: default, restarts: 0 โ”‚
โ”‚ pod โ”‚ nginx-deployment-abc123 โ”‚ Failed โ”‚ namespace: production, restarts: 5 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
```

### Health Indicators

| Status Color | Meaning |
| :--- | :--- |
| ๐ŸŸข Green | `healthy`, `running`, `Running` |
| ๐Ÿ”ด Red | `unhealthy`, `exited`, `Failed` |
| ๐ŸŸก Yellow | Other states like `Pending`, `paused` |

### Use Cases

- Monitor pod health in real time
- Identify failing services before outages occur

---

## `kdm health containers`

Checks the health status of all Docker containers.

### Example

```bash
kdm health containers
```

### Expected Output

```text
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TYPE โ”‚ NAME โ”‚ HEALTH โ”‚ DETAILS โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ container โ”‚ test-nginx โ”‚ running โ”‚ Up 8 minutes โ”‚
โ”‚ container โ”‚ my-app โ”‚ exited โ”‚ Exited (1) โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
```

### Use Cases

- Verify container health
- Detect unhealthy or restarting containers

---

## `kdm health all`

Checks health for both pods and containers in a single command. If one source (Docker or Kubernetes) is unavailable, the other still renders successfully.

### Example

```bash
kdm health all
```

---

### Expected Output (Kubernetes unavailable)

```text
โš  Kubernetes unavailable: connect ECONNREFUSED 127.0.0.1:8080

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TYPE โ”‚ NAME โ”‚ HEALTH โ”‚ DETAILS โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ container โ”‚ test-nginx โ”‚ running โ”‚ Up 8 minutes โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
```

---

### Expected Output (Both available)

```text
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ TYPE โ”‚ NAME โ”‚ HEALTH โ”‚ DETAILS โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ container โ”‚ test-nginx โ”‚ running โ”‚ Up 8 minutes โ”‚
โ”‚ pod โ”‚ node-app-6f65c56b74-7tkvf โ”‚ Running โ”‚ namespace: default, restarts: 0 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
```

---

# Common Errors

| Error | Cause | Fix |
| :--- | :--- | :--- |
| `Unknown target` | Invalid target passed | Use `pods`, `containers`, or `all` |
| `No workloads found` | No containers or pods running | Start Docker containers or Kubernetes pods |
| `Docker unavailable` | Docker daemon not running | Run `sudo systemctl start docker` |
| `Kubernetes unavailable` | No cluster connection | Run `minikube start` or configure `kubectl` |

---

# Notes

- Supports both Docker and Kubernetes environments
- Displays partial results even if one backend fails
- Provides readable CLI tables for faster debugging and monitoring
Loading
Loading