Skip to main content

CLI, LSP, and future MCP server for kb-yaml-to-lens dashboard compiler

Project description

project-banner-smaller

kb-dashboard-cli

CLI, LSP, and future MCP server for the kb-yaml-to-lens dashboard compiler.

This package provides command-line tools and language server capabilities for building Kibana dashboards from YAML definitions. It converts human-friendly YAML dashboard definitions into Kibana NDJSON format:

Features

  • YAML-based Dashboard Definition – Define dashboards, panels, filters, and queries in simple YAML
  • Rich Panel Support – Lens visualizations (metric, pie, XY charts), Markdown, Links, Image panels, and more
  • Advanced Controls – Control groups with options lists, range sliders, and time sliders with chaining
  • Filter Support – Exists, phrase, range, and custom DSL with AND/OR/NOT operators
  • Direct Upload – Optional direct upload to Kibana with authentication support

Prerequisites

For ⭐ VS Code Extension (Recommended):

  • VS Code 1.85.0+ or compatible editor (Cursor, VSCodium, etc.)
  • No Python installation required - bundled binary included!

For CLI (Automation/CI):

  • uv for running via uvx (recommended - no Python setup required)
  • Or Python 3.12+ with pip/uv for traditional installation

Quick Start

Option 1: ⭐ VS Code Extension (Recommended for Getting Started)

Best for: Interactive dashboard development, visual editing, live preview

The VS Code extension is the fastest way to start building Kibana dashboards. It includes:

  • Pre-built snippets for quick dashboard scaffolding
  • Live preview as you type
  • Visual drag-and-drop grid editor
  • One-click upload to Kibana
  • No Python installation required - LSP server binary is bundled

Installation

From OpenVSX Registry (Cursor, VS Code forks):

  1. Open Extensions view (Ctrl+Shift+X)
  2. Search for "Kibana Dashboard Compiler"
  3. Click Install

Manual VSIX Install: Download platform-specific .vsix from releases page

Verify Installation

After installation, verify the extension is working:

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Type "YAML Dashboard" - you should see all extension commands
  3. Create a test file: test-dashboard.yaml
  4. Type dashboard and press Tab - a snippet should insert

If commands don't appear, restart VS Code and check the Output panel (View → Output → "Kibana Dashboard Compiler").

Your First Dashboard in VS Code

  1. Create a new file: my-dashboard.yaml
  2. Start typing dashboard and press Tab to insert snippet
  3. Save (Ctrl+S) - auto-compiles in background
  4. Run command (Ctrl+Shift+P): "YAML Dashboard: Preview Dashboard"
  5. Configure Kibana URL in settings, then run: "YAML Dashboard: Open in Kibana"

Learn more: VS Code Extension Documentation


Option 2: CLI (Best for Automation & CI/CD)

Best for: Scripting, CI/CD pipelines, batch processing, programmatic usage

The CLI provides multiple installation methods:

Click to expand CLI installation options

Using uvx (Recommended)

Run the CLI directly without cloning or installing anything (requires uv):

uvx kb-dashboard-cli compile --help

This downloads and runs the published package automatically. No Python environment setup required!

Using Docker

Run the compiler in a container without installing Python or dependencies:

# Pull the pre-built image
docker pull ghcr.io/strawgate/kb-yaml-to-lens/kb-dashboard-compiler:latest

# Or build locally (from repo root)
just cli docker-build

Standalone Binary

Download a platform-specific binary from the releases page:

  • Linux (x64): kb-dashboard-linux-x64
  • macOS (Intel): kb-dashboard-darwin-x64
  • macOS (Apple Silicon): kb-dashboard-darwin-arm64
  • Windows (x64): kb-dashboard-windows-x64.exe

No Python installation required!

From Source (For Development)

Clone the repository and install dependencies:

git clone https://github.com/strawgate/kb-yaml-to-lens
cd kb-yaml-to-lens
just cli install

See DEVELOPING.md for full development setup.

Compile Your First Dashboard (CLI)

  1. Create a YAML dashboard file in inputs/ directory:
dashboards:
- name: My First Dashboard
  description: A simple dashboard with markdown
  panels:
    - title: Welcome
      size: { w: 24, h: 15 }        # Size on 48-column grid
      position: { x: 0, y: 0 }     # Position on the grid
      markdown:
        content: |
          # Welcome to Kibana!

          This is my first dashboard compiled from YAML.
  1. Compile to NDJSON:

If using uvx: uvx kb-dashboard-cli compile --input-dir inputs --output-dir output

If using Docker:

docker run --rm -v $(pwd)/inputs:/inputs -v $(pwd)/output:/output \
  ghcr.io/strawgate/kb-yaml-to-lens/kb-dashboard-compiler:latest \
  compile --input-dir /inputs --output-dir /output

If using standalone binary: ./kb-dashboard-<platform> compile --input-dir inputs --output-dir output

  1. (Optional) Upload directly to Kibana:

Add --upload --kibana-url http://localhost:5601 --kibana-username elastic --kibana-password changeme to the compile command above.

The --upload flag will automatically open your dashboard in the browser upon successful upload.

Learn more: CLI Documentation

Documentation

Getting Started

Deep Dive

License

MIT

Support

For issues and feature requests, please refer to the repository's issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kb_dashboard_cli-0.3.1.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kb_dashboard_cli-0.3.1-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file kb_dashboard_cli-0.3.1.tar.gz.

File metadata

  • Download URL: kb_dashboard_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kb_dashboard_cli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 514dc90b871747e03b04c737b72033f7c5bb551d935b08bc050cd3280492a6c8
MD5 744ceeaf0498d8a1f446b6b0d4e61631
BLAKE2b-256 ecdd7f27e45d797f933840501644ae5ea74a2552b734e00abaca53f5c5df236e

See more details on using hashes here.

File details

Details for the file kb_dashboard_cli-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: kb_dashboard_cli-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kb_dashboard_cli-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffff368d520076370246ff0ca7d64914db3874a05d1d42ab095d7a514432c5d8
MD5 07f22068143fa482dd0c503be5fbb104
BLAKE2b-256 a8f50081738ee84c40dce6f8a5c8dee0b285353b6e782efacee96fdcfe9d994f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page