Serve External Help Sources

Use `glaze serve` to browse help exported from other Glazed binaries, JSON files, SQLite snapshots, and markdown directories.

Sections

Terminology & Glossary
📖 Documentation
Navigation
74 sectionsv0.1
📄 Serve External Help Sources — glaze help serve-external-help-sources
serve-external-help-sources

Serve External Help Sources

Use `glaze serve` to browse help exported from other Glazed binaries, JSON files, SQLite snapshots, and markdown directories.

Topichelpserveexportwebdocumentationsqliteservehelpexportfrom-glazed-cmdfrom-jsonfrom-sqlitewith-embedded+1

Why external help sources exist

glaze serve can act as a browser for more than the documentation embedded in the glaze binary. Many Glazed-based tools expose their own help pages through help export; external source loading lets you collect those pages into one local web server.

This is useful when you maintain a family of command-line tools. Instead of running one help browser per binary, run one server that loads help from all of them:

glaze serve --from-glazed-cmd pinocchio,sqleton,xxx

By default, explicit external sources replace the embedded Glazed documentation. This keeps the browser focused on the tools you asked for. If you also want the built-in Glazed docs, add --with-embedded=true.

Quick start: serve another Glazed binary

Use --from-glazed-cmd when each value is the name or path of a binary that supports help export.

glaze serve --from-glazed-cmd pinocchio

For each binary, glaze serve runs:

<binary> help export --with-content=true --output json

Then it imports the JSON into the in-memory help store and starts the existing help browser.

You can load multiple binaries at once:

glaze serve --from-glazed-cmd pinocchio,sqleton,xxx

Or use repeated flags:

glaze serve \
  --from-glazed-cmd pinocchio \
  --from-glazed-cmd sqleton \
  --from-glazed-cmd xxx

Source types

glaze serve can load several kinds of sources. All string source flags are list-valued, so you can pass multiple sources together.

SourceFlagExample
Glazed binary shorthand--from-glazed-cmd--from-glazed-cmd pinocchio,sqleton
JSON export file--from-json--from-json ./pinocchio-help.json
SQLite export database--from-sqlite--from-sqlite ./pinocchio-help.db
Markdown files/directoriespositional pathsglaze serve ./docs ./more-docs

Use --from-glazed-cmd for live binaries and --from-json or --from-sqlite when you need a filtered or archived snapshot.

Embedded documentation behavior

When you run glaze serve with no sources, it serves the built-in Glazed documentation:

glaze serve

When you provide any explicit source, embedded docs are cleared by default:

glaze serve --from-glazed-cmd pinocchio

This serves Pinocchio help only. To merge Pinocchio help with the embedded Glazed docs, set:

glaze serve --with-embedded=true --from-glazed-cmd pinocchio

Serve from exported JSON

JSON files are useful when you want a cached snapshot or when the source binary is not available on the serving machine.

pinocchio help export --output json > /tmp/pinocchio-help.json
glaze serve --from-json /tmp/pinocchio-help.json

You can also read JSON from stdin:

pinocchio help export --output json | glaze serve --from-json -

Only one --from-json - source is allowed because stdin can only be read once.

Serve from SQLite

SQLite files are useful for archived snapshots and tooling that wants a queryable database.

pinocchio help export --format sqlite --output-path ./pinocchio-help.db
glaze serve --from-sqlite ./pinocchio-help.db

You can combine several snapshots:

glaze serve --from-sqlite ./pinocchio.db,./sqleton.db

Combine all source types

You can build a unified help browser by combining live binaries, snapshots, and local markdown overrides:

glaze serve \
  --from-glazed-cmd pinocchio,sqleton \
  --from-json ./team-overrides.json \
  --from-sqlite ./legacy-help.db \
  ./company-docs

If two sources contain the same slug, the later source wins. The loading order is markdown paths, JSON files, SQLite files, then --from-glazed-cmd binaries.

Troubleshooting

ProblemCauseSolution
executable file not foundA --from-glazed-cmd binary is not on PATHUse an absolute path or install the binary.
Browser shows only one tool's docsExplicit sources clear embedded docs by defaultAdd more sources or use --with-embedded=true to include built-in Glazed docs.
JSON import fails with missing typeThe JSON file is not a Glazed help exportGenerate it with <binary> help export --output json.
Stdin source hangsThe process feeding stdin did not finishVerify the upstream command exits and writes valid JSON.
Duplicate pages disappearLater sources overwrite earlier slugsRename slugs or change source order.

See Also

  • glaze help export-help-entries — Export help sections to JSON, files, and SQLite
  • glaze help serve-help-over-http — Serve the built-in help browser over HTTP
  • glaze help export-help-static-website — Export help as a static website
  • glaze help help-system — Overview of the Glazed help system