Back to JournalJournal Entry
2026-07-09

Introducing Glyph-CLI: A Product of SHRI

A SHRI Product

Today we are releasing Glyph (rz-glyph-cli)—a lightweight, zero-dependency command-line documentation compiler designed to solve a very specific problem: modern documentation tools have become too heavy.

When you want to build a simple wiki, project guide, or developer documentation hub, you shouldn't need to download hundreds of megabytes of React frameworks, configure complex webpack pipelines, or pay for heavy search APIs.

Glyph compiles raw Markdown and MDX folders into premium, responsive developer portals in under 50 milliseconds.


📂 Architecture Overview

Glyph operates on a simple compiler pipeline. It takes a raw docs/ folder, parses metadata and content, assembles HTML utilizing custom static templates, and outputs the result into a self-contained dist/ directory ready for deployment anywhere.

                       ┌─────────────────────────┐
                       │   Markdown/MDX Source   │
                       │   (docs/ directory)     │
                       └────────────┬────────────┘
                                    │
                               Compile (V8)
                                    │
                       ┌────────────▼────────────┐
                       │  Static HTML Output     │
                       │  (dist/ directory)      │
                       └────────────┬────────────┘
                                    │
                               Local Hosting
                                    │
                       ┌────────────▼────────────┐
                       │   Glyph Dev Server      │
                       │   (localhost:3000)      │
                       └─────────────────────────┘

✨ Core Capabilities

  1. Instant Compilation: Built using pure V8 JavaScript, compiling individual pages in under 10ms and full document trees in under 50ms.
  2. Local Fuzzy Search: Generates a lightweight client-side search-index.json containing titles, descriptions, and plain text. Users get instant matches on-the-fly without needing external services like Algolia.
  3. GitHub-Style Alerts: Supports native markup like [!NOTE], [!TIP], [!WARNING], and [!IMPORTANT], automatically compiling them into beautiful, responsive warning and tip cards.
  4. Dev Server & Live Rebuilding: Watches your project directory using a debounced filesystem watcher. Saving any file inside docs/ triggers a build instantly, updating your local preview.

🛠️ User Manual

1. Installation

To install Glyph globally on your local machine, run:

npm install -g rz-glyph-cli

Alternatively, you can run it inside your local project:

npm install rz-glyph-cli --save-dev

2. Standard Directory Layout

When you run Glyph, it expects (or automatically initializes) the following folder structure:

  • docs/: Holds your raw Markdown (.md or .mdx) source files.
  • templates/: Contains the default structure assets (such as style.css and app.js layout controllers).
  • dist/: The compilation output folder containing optimized static HTML pages, search indexes, and styling assets.

3. Basic CLI Usage

Run commands using the global glyph package or via npm run:

  • Compile static assets:

    glyph build
    

    (Compiles all files inside docs/ and saves them in dist/)

  • Run local development server:

    glyph dev [port]
    

    (Launches the local preview server on http://localhost:3000 (or your custom port) and watches docs/ for hot-reloads)


⚙️ Configuration & Metadata

Glyph reads metadata from a YAML frontmatter block at the top of each document. This controls sidebar hierarchy, browser titles, and descriptions.

---
title: "Getting Started"
description: "Learn how to configure your Glyph documentation pipeline."
order: 2
---

Supported Metadata Frontmatter

| Key | Type | Description | | :--- | :--- | :--- | | title | String | Page title used in navigation sidebars and headers. | | description | String | Page summary used in search indexing and HTML meta headers. | | order | Number | Controls the chronological sidebar sorting order (ascending). |


🎨 Rich Styling Features

Code Blocks & Formatting

Glyph features built-in syntax styling designed for developer portals:

// Example Node.js compiler snippet
import fs from 'fs';
import path from 'path';

export const buildDocs = () => {
  console.log("Compiling markdown directory...");
};

Document Alerts

You can easily insert highlighted alert panels using standard GitHub-style syntax:

> [!NOTE]
> This is a general information callout card.

> [!TIP]
> This is a helpful tip card featuring code recommendations.

> [!WARNING]
> This is a warning panel to caution about configuration issues.

📥 Deployment

Because Glyph outputs pure static HTML, CSS, and JS assets, you can host your documentation on any static provider (GitHub Pages, Vercel, Netlify, Cloudflare Pages, or simple Nginx servers) without requiring a running Node.js process in production.