lmcurl

lmcurl is an HTTP, LDAPv3, and LLM contract testing CLI and LMScript host built on libcurl and a pure C++17 BER/ASN.1 LDAPv3 wire engine. It runs direct CLI requests, test suites, JSONPath and XPath queries, load checks, and standard REST and CLI interfaces.

Quick reference

npm install -g @lmctl-ai/lmctl@latest
lmcurl --version
lmcurl --lmcode-schema
lmcurl --lmcode-signatures
Interface or flagSignature or syntaxPurpose
CLI host bytecodelmcurl --lmcode prog.dslbExecute compiled LMScript bytecode against the embedded lmcurl schema.
CLI schema and signatureslmcurl --lmcode-schema [--json] | --lmcode-signaturesPrint human-readable schema summary, raw schema JSON, or canonical signatures.
CLI LDAPv3 URL modelmcurl [-u dn:pw] [-X METHOD] [-d JSON] ldap://host:port/...Run RFC 4516 search URLs or REST-mapped /ping, /bind, /whoami, /compare, /search, and /entry endpoints.
CLI LDAPv3 subcommandslmcurl ldap ping|bind|whoami|search|get|add|modify|compare|delExecute structured LDAPv3 directory operations from the command line and emit JSON.
context curl: Curlcurl.session(base_url) -> SessionCreate an HTTP, HTTPS, or LDAPv3 session with shared headers, cookies, variables, and secrets.
Session / Request / Responses.get(path).basic(user, pw).send() -> ResponseBuild and send requests, inspect status and headers, and evaluate JSONPath, XPath, or schema assertions.
Suite / Test / Reportcurl.suite(name).test_request(label, req) -> TestDefine data-driven or parallel contract test suites and export console, TAP, JUnit, JSON, CSV, or HTML reports.
context llm: Llmllm.openrouter(url) | llm.deepseek(url) | llm.ollama(url) | llm.mock(file)Run cost-bounded LLM chat, streaming, sampling, model matrices, and deterministic cassette replay.
Standard REST and CLIRestGet..RestOptions, RestHandler, CliCommand, CliOptionExpose _lmcode_ functions as HTTP routes (:param) or stateless CLI flags and commands via rest_serve and rest_cli.
p = _lmcode_ cli="lmcurl" install="github:lmctl-ai/lmcurl@latest";
let mock = curl.mock();
let s = curl.session(mock.url());
let r = s.get("/api/products").send();
assert_eq(r.status(), 200);
assert_eq(r.json("$.items[0].sku").exists(), true);

@"/health"
fn get_health(x: RestExchange) -> void implements RestGet {
  x.json("{\"ok\":true}");
}
assert_eq(rest_cli(str_split("/health", " ")), "{\"ok\":true}");
end _lmcode_
res = run_lmcode(p);
require(res.ok, json_stringify(res));

Documentation pages

Source repository and releases