<nil>NILScript

Develop

CLI Testing

The nilscript CLI explores the standard, generates an OpenAPI surface, and frames how you prove an adapter conforms. Conformance is behavioral — you drive your live shim with NIL sentences and assert standard-shaped responses.

Start with the CLI

Three commands explore the standard; no account, key, or waitlist required. Python ≥ 3.12 for the tooling — the standard itself is language-agnostic.

install
pip install nilscript

List & inspect verbs

A verb is only standard if it has a published profile. The profile is the contract — its arg schema, required fields, tier floor, outcomes, refusals, and reversibility tier.

verbs & profiles
nilscript verbs                            # the closed set of standard verbs
nilscript profile commerce.create_product  # arg schema, tier floor, outcomes
nilscript profile commerce.process_refund

Export OpenAPI

Generate an OpenAPI 3.1 spec for PROPOSE, COMMIT, QUERY, STATUS, EVENT, and ROLLBACK. Import it into Swagger or Postman, or feed it to a codegen tool.

export-openapi
nilscript export-openapi > nil.json
nilscript export-openapi --format json -o openapi.json
nilscript export-openapi --format yaml -o openapi.yaml
The profile is the source of truth
Refusal codes, arg validation, and tier floors all come from the profile. The OpenAPI surface is generated from it, not hand-authored.

Test against the corpus

Use the published conformance corpus and checklist as the spec of record. Drive your shim with NIL sentences — using the reference SDK or any HTTP client — and assert standard-shaped responses. Run the full matrix for every non-parked verb.

The thirteen rows

The behavioral conformance matrix asserts, end to end:

  1. PROPOSE has no side effects.
  2. Invalid args refuse (not an HTTP error).
  3. Ambiguous references return ≤8 candidates.
  4. COMMIT writes once and emits an EVENT with the entity.
  5. A retried COMMIT is idempotent.
  6. Expired or suspended proposals refuse.
  7. STATUS replay works.
  8. QUERY reads fresh.
  9. EVENT HMAC is verified.
  10. Sequence dedup works.
  11. ROLLBACK compensation is real.
  12. IRREVERSIBLE refuses honestly.
  13. An unknown compensation token is refused.

Assert observable side effects

Conformance is behavioral, so the load-bearing rows (PROPOSE side-effect-free, COMMIT writes once, retried COMMIT idempotent) are verified out of band with a read-after-write against your system — not by trusting the HTTP response alone.

See also
Building Shims defines the endpoint contracts these tests exercise, and Conformance defines the guarantees they prove.

NILScript is an open standard, stewarded by the Wosool project. The spec is extracted from running code.

Draft standard v0.3.0 · 0.x stage · NIL wire 0.1 · DSL 0.1