Overview


Glue is a language for modeling data structure and interfaces, with an ecosystem of tooling for code generation, IDE support, and more.
It is designed from the ground up to be simple, human-friendly, AI-friendly, and language-agnostic.

For the motivation behind Glue and the challenges it aims to solve, see this blog post by its creator.

If you're familiar with OpenAPI, Protobuf, Smithy or even Avro IDL, you can think of Glue as a batteries-included and minimalistic alternative to those, with a focus on ease of use and flexibility.

Glue's philosophy is:

  1. Easy for common users, extensible for power users.
    Glue wants you (or your LLM) to write as little code as possible. There should be sane defaults for everything.
  2. Generic with escape hatches
    Code generation is a never ending arms race against the complexity of target languages and frameworks. Glue should be as generic as possible, but provide escape hatches for advanced use cases.
  3. Just Work™
    Glue should be fast and reliable. It should "just work" for the vast majority of use cases, without needing to fight with it. In addition, Glue should provide helpful error messages when it doesn't work, and ideally even suggest fixes (inspired by Rust's compiler).

#Motivation

Glue empowers you to define your data models and interfaces in a single source of truth, and revolve your business logic around them.
It alleviates the need for multiple disparate tools for generating code (e.g., web servers/clients, OpenAPI specs, Protobuf schemas) in favor of a single unified toolchain.

The design goal for a single, simple, fast and reliable toolchain is inspired by projects such as Rust's Cargo and uv.

In fact, Glue's configuration is itself written in Glue and is used to generate Rust code which defines the models (with serialization/deserialization) as well as a JSON schema!

#Quickstart

Refer to the Quickstart page for a quick introduction to using Glue, or if you're using an agentic coding solution, provide gluelang.dev/llms.txt as a reference, which contains all of these docs in Markdown format.

#The Glue toolchain

#Glue IDL

An Interface Definition Language (IDL) for modeling data models and API endpoints in a way that aims to be as simple and generic as possible, while providing adequate "escape hatches" for advanced use cases. For more information, see the Language Reference page.

An example Glue model definition:

glue

#Glue CLI & code generation

A command-line interface (CLI) tool for working with Glue files, generating code, and more. For more information, see the CLI Reference page.

Example usage:

shell

#Installation

Glue supports multiple platforms (Linux, macOS, Windows) and multiple architectures (x86, ARM).

To install:

shell

#IDE support

Glue has a VS Code extension that provides syntax highlighting, error diagnostics, hover definitions, go-to definitions and more for Glue files (by default, those ending with .glue).

#Usage

Glue has a command-line interface (CLI) tool that you can install and use to work with Glue files, generate code, and more.

Below is a simple Glue model definition for a User type, with some fields.

glue

Then use the CLI to validate and generate code:

shell

Glue currently supports generation for typescript, python, rust, go, protobuf, openapi, and jsonschema.