Dart

Lambë

0.13.0

A shape-aware query language

A query language for JSON, YAML, TOML, HCL, CSV, and Markdown that shows you what you're working with. Expressions compose through the pipe operator, and `--explain` reports the shape of the data at each stage of the pipeline, before you run it. It takes JSON Schema as input, bridges between formats, and ships as a CLI, a Dart library, and an MCP server. Built on Rumil.

dart pub add lambë

Examples

Query structured data from the command line

$ lam '.dependencies | keys' pubspec.yaml
["rumil", "rumil_parsers", "args"]
$ lam '.services | values | map(.image)' docker-compose.yaml
["postgres:16", "redis:7-alpine"]
$ lam '.user.name' config.toml
"hakim"

Filter, transform, and aggregate

$ lam '.users | filter(.age > 30) | map(.name)' data.json
["Alice", "Charlie"]

$ lam '.items | sort_by(.price) | last' inventory.yaml
{"name": "Monitor", "price": 549}

Run as an MCP server

$ lam-mcp
# Exposes lambe_query, lambe_schema, lambe_assert as MCP tools
# Add to your Claude Code settings:
#   "mcpServers": { "lambe": { "command": "lam-mcp" } }

Use as a Dart library

import 'package:lambe/lambe.dart';

final result = query('.server.port', yamlString);
print(result); // 8080

Interactive REPL with tab completion

$ lam -i config.toml
> .database
{host: "localhost", port: 5432, name: "mydb"}
> .database.port
5432
> .services | map(.name)
["api", "web", "worker"]

Features

Shape-aware `--explain` reports the structure at each pipeline stage before running
Same query syntax across JSON, YAML, TOML, HCL, CSV, and Markdown
Format bridges and JSON Schema input
Null propagation on navigation, strict on computation
CLI, Dart library, and MCP server for AI assistants