Dart

Lambe

0.4.0

One query language across structured data formats

A query language for JSON, YAML, TOML, HCL, CSV, and Markdown. Expressions compose through the pipe operator into transformation pipelines. Navigation through missing fields returns null instead of failing, so queries work safely on data you haven't fully explored. Operations that compute on values are strict, catching type errors early. Available as a CLI with an interactive REPL, a Dart library, and an MCP server for AI assistants. Built on Rumil.

dart pub add lambe
Try it live

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"]

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}

MCP server for AI assistants

$ lam-mcp
# Exposes lambe_query and lambe_schema 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

Same query syntax across JSON, YAML, TOML, HCL, CSV, and Markdown
Null propagation on navigation, strict on computation
Interactive REPL with tab completion driven by the data structure
MCP server for giving AI assistants structured data access