Skip to content

Command line

schemacast casts text; schemacast-bench runs the benchmark. Model settings come from the environment.

schemacast sheet

Print what a model is shown for SCHEMA. Makes no model call.

Option Value Meaning
--schema FILE GraFlo schema or manifest (YAML or JSON). (required)
--json-schema flag Print the JSON Schema of the reply instead of the type sheet.

schemacast select

Show the slice of SCHEMA each text would be cast against. Makes no model call. Prints one JSON line per text: the mode, the seeds and how each lane ranked them, the retrieval metrics and the slice's vertex and edge counts.

Option Value Meaning
--schema FILE GraFlo schema or manifest (YAML or JSON). (required)
--text TEXT A single text to select for.
--episodes FILE Episodes, one JSON object per line.
--sheet flag Print each slice's type sheet.

schemacast cast

Cast EPISODES into SCHEMA and save the result under OUT. Each text becomes a mention graph; what its keys identify is the graph, the rest is staged. With --db, keys are looked up there too; a manifest's connector-owned types are linked, never created. Episodes that produce nothing are quarantined and the run goes on; a misconfigured or unreachable model, or a cache miss under --replay, stops it. Exit status: 0 when every episode was cast or failed on its own content (too long, refused, truncated, unparseable), which a rerun reproduces; 75 when some failed at the provider, which a rerun retries; 1 when the run stopped or every episode failed.

Option Value Meaning
--schema FILE GraFlo schema or manifest (YAML or JSON). (required)
--episodes FILE Episodes, one JSON object per line. (required)
--out DIRECTORY Directory for the graph, groundings, quarantine and manifest. (required)
--db FILE graflo connection file (YAML); the graph is written there too.
--replay flag Serve every reply from the cache; a miss stops the run. Makes no request.
--recreate-schema flag Drop and redefine the schema on the --db target first.
--concurrency INTEGER Episodes cast at once. (default 8)

schemacast pick

Link staged mentions to their candidates: one model call per episode. Each staged mention gets one of its candidates or none, checked without a model. A pick links; it writes nothing. Exit status: 0 when every call answered; 75 when some failed at the provider, which a rerun retries; 1 when the run stopped or every call failed.

Option Value Meaning
--input FILE One JSON object per line: an episode, its staged mentions with their candidates, and the entities its metadata names. (required)
--out DIRECTORY Directory for picks.jsonl, episodes.jsonl and manifest.json. (required)
--replay flag Serve every reply from the cache; a miss stops the run. Makes no request.
--concurrency INTEGER Episodes picked at once. (default 8)

schemacast serve

Serve POST /cast and POST /pick over HTTP (needs the server extra). Every request needs Authorization: Bearer $SCHEMACAST_SERVE_API_KEY; without a key the service refuses to cast unless SCHEMACAST_SERVE_ALLOW_ANONYMOUS is set. Model settings come from SCHEMACAST_LLM_*.

Option Value Meaning
--host TEXT Address to bind; default SCHEMACAST_SERVE_HOST or 127.0.0.1.
--port INTEGER Port; default SCHEMACAST_SERVE_PORT or 8997.

schemacast-bench

Cast and score the corpus; write JSON and Markdown reports.

Option Value Meaning
--model TEXT Model to benchmark, repeatable; the endpoint is SCHEMACAST_LLM_BASE_URL. Without it only the free oracle row runs. (repeatable)
--oracle / --no-oracle flag Add the oracle row: the expected graph through the whole pipeline. Free. (default True)
--split dev | test | all dev is tuned against; only test is publishable. (default all)
--family TEXT Only these families. (repeatable)
--case TEXT Only these cases, e.g. units/lab. (repeatable)
--corpus DIRECTORY A corpus of your own: DIR/cases (with SPLITS.yaml) and DIR/schemas, laid out like the bundled one. Never publishable.
--replay flag Serve every reply from the cache; a miss stops the run.
--out DIRECTORY Where the JSON and Markdown reports go. (default bench-results)
--concurrency INTEGER (default 8)

schemacast-bench score

Score saved casts against the corpus, with no model. Each CASTS file is a POST /cast response body, or {"episodes": [...], "cast": <body>}. A corpus episode no file holds counts as missed.

Option Value Meaning
CASTS argument
--corpus DIRECTORY A corpus of your own: DIR/cases (with SPLITS.yaml) and DIR/schemas, laid out like the bundled one. Never publishable.
--split dev | test | all dev is tuned against; only test is publishable. (default all)
--family TEXT Only these families. (repeatable)
--case TEXT Only these cases, e.g. units/lab. (repeatable)
--row TEXT Row label; default: the casts' model.
--out DIRECTORY Where the JSON and Markdown reports go. (default bench-results)

schemacast-bench compare

Read REPORT_B against REPORT_A, episode by episode, on the same corpus.

Option Value Meaning
REPORT_A argument
REPORT_B argument
--row-a TEXT Row of REPORT_A; default: its only row, or its only model row.
--row-b TEXT Row of REPORT_B; default as for --row-a.
--pair-by-name flag Across corpus versions, pair cases a report has no content digest for by name: you assert they did not change.
--json FILE Also write the comparison as JSON here.