-
Notifications
You must be signed in to change notification settings - Fork 7
feat: automate versioned CLI command documentation scaffolding and changelog engine #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
utkarsh232005
merged 23 commits into
KDM-cli:main
from
Yuvraj-Sarathe:feat/changelog-auto-workflow
May 17, 2026
Merged
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 56c7f14
Fix formatting in installation instructions
Yuvraj-Sarathe b75d96e
Update changelog workflow to save versioned docs
Yuvraj-Sarathe 7b8198f
Modify changelog workflow to target feature branch
Yuvraj-Sarathe dec901f
chore: add version doc changelog for v9.9.9 [skip ci]
github-actions[bot] d1cef88
Enhance changelog workflow for docs staging
Yuvraj-Sarathe 9c4c1b4
chore: add version doc changelog for v1.2.3 [skip ci]
github-actions[bot] 0ce5d5d
Update changelog workflow to use default branch dynamically
Yuvraj-Sarathe b5357fd
Update comment for clarity in changelog workflow
Yuvraj-Sarathe c4c89d1
All logs for previous releases added
Yuvraj-Sarathe 85f4772
Update changelog workflow for versioned documentation
Yuvraj-Sarathe cd79a31
feat: implement version-based directory documentation scaffolding system
Yuvraj-Sarathe 39183f5
feat: align master documentation templates with official v1.2.1 strucโฆ
Yuvraj-Sarathe b10ebbf
Update .github/workflows/changelog.yml
Yuvraj-Sarathe 7b46a83
Update .github/workflows/changelog.yml
Yuvraj-Sarathe c78e8e7
Update .github/workflows/changelog.yml
Yuvraj-Sarathe 4b3513b
Update .github/workflows/changelog.yml
Yuvraj-Sarathe 406d7b8
Update .github/workflows/changelog.yml
Yuvraj-Sarathe e32b666
Refactor changelog generation in workflow
Yuvraj-Sarathe f051a33
Refactor changelog workflow for clarity and alignment
Yuvraj-Sarathe 658b071
Update .github/workflows/changelog.yml
Yuvraj-Sarathe b590d7e
Fix changelog action to use specific commit SHA
Yuvraj-Sarathe 8f1260d
del
Yuvraj-Sarathe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.