explaingit

danielgtaylor/aglio

4,756CoffeeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A command-line tool that converts API Blueprint Markdown files into styled, shareable HTML documentation pages, with live browser preview, multiple built-in themes, and a Node.js library mode.

Mindmap

mindmap
  root((aglio))
    What it does
      Converts API Blueprint
      Generates HTML docs
    Usage modes
      CLI tool
      Live preview server
      Node.js library
    Features
      Multiple themes
      File includes
      Custom templates
    Audience
      API developers
      Technical writers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Generate a static HTML reference page for a REST API from a Markdown Blueprint description

USE CASE 2

Preview API documentation live in a browser as you write the Blueprint file

USE CASE 3

Host generated API docs on any static web server without a backend or special setup

USE CASE 4

Call aglio from a Node.js build script to generate HTML docs as part of an automated pipeline

Tech stack

Node.jsCoffeeScript

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you include the MIT license notice.

In plain English

Aglio is a tool that converts API Blueprint files into static HTML documentation pages. API Blueprint is a Markdown-based format for writing descriptions of HTTP APIs: you write plain text files that describe your endpoints, the parameters they accept, and example request and response bodies, then use a tool like Aglio to turn those files into readable, styled documentation you can share with developers or host on any web server. The generated HTML works on any standard web host without special setup. Aglio supports several built-in visual themes, including options named streak, flatly, slate, and cyborg, and can produce either a two-column or three-column page layout. You can also supply your own custom templates if none of the defaults suit your needs. The tool has three modes of use. As a command-line program, you point it at an input Blueprint file and it writes an HTML file. You can also run it in server mode, which watches the input file for changes and serves a live-reloading preview in a browser as you write. The third option is calling it as a Node.js library, which lets you invoke the HTML rendering step from your own code and pass custom options or template variables. Aglio supports splitting large API descriptions across multiple files using an include directive, so you can organize a complex API into smaller, manageable sections that are stitched together at render time. The README notes that the project is mature and stable but is no longer actively maintained by the original author. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
I have an API Blueprint file describing my REST endpoints. What aglio command converts it to HTML using the flatly theme with a three-column layout?
Prompt 2
Show me how to run aglio in watch mode so I can see a live browser preview of my API documentation update automatically as I edit the Blueprint file.
Prompt 3
I want to call aglio from a Node.js script to generate HTML docs as part of my CI build. Show me the require call, the options object, and how to write the output to a file.
Prompt 4
How do I split a large API Blueprint into multiple include files using aglio's include directive, and what does the include syntax look like?
Prompt 5
I want to use a custom HTML template instead of aglio's built-in themes. How do I create a template file and tell aglio to use it?
Open on GitHub → Explain another repo

← danielgtaylor on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.