qip CLI

qip is the command-line host in this repo. QIP is the broader standard: the component contract, execution shape, and architecture.

This page is about CLI behavior: commands, file and network access by the host process, runtime guardrails, and implementation details that should not be mistaken for the whole QIP standard. This repo also contains browser JavaScript hosts such as <qip-edit> and <qip-play>. Native hosts such as the Swift implementation should follow the same component contract but may expose different application APIs.

Names #

Use these names consistently:

Commands #

The CLI is the operational tool for local development, CI, benchmarking, and static-site workflows:

CommandUse
qip runRun a chain of QIP components on input bytes.
qip dry runValidate and describe a run pipeline without executing it.
qip benchCompare one or more components for output parity and performance.
qip imageRun RGBA image filter pipelines.
qip complyValidate a component and run compliance modules.
qip scoreStatically score Wasm control-flow, call cost, recursion, and loop-bound evidence.
qip router devServe a content directory with routing and recipes.
qip routerResolve routes and export route artifacts such as WARC.
qip formRun an interactive QIP form component in the terminal.

qip dev remains available as a compatibility alias for qip router dev. It prints a migration notice so scripts can be updated without breaking immediately.

For the available execution models, see QIP Component Contracts. For the normal qip run ABI, see the Content Component Contract. For route behavior, see Router. For compliance testing, see qip comply.

qip dry run uses the same resolution, module policy, uniform application, and pipeline planner as qip run. It reports each component kind, input/output encoding and MIME type, buffer capacities, composition warnings, and the total declared buffer capacity. It does not read -i, execute render, or write output. See Recipes for the composition rules.

--max-memory <bytes> applies independently to each component. Dry run rejects a component when that component's declared memory minimum or maximum exceeds the cap, or when its memory has no declared maximum. It does not compare the cap to the sum printed at the end of the report. That total is declared buffer capacity, not resident Wasm memory.

--capacities-must-fit rejects a connection between adjacent Content components when the producer's declared maximum output capacity exceeds the consumer's input capacity. Without the flag, this is a warning: the pipeline can still run when the actual intermediate value is smaller than the producer's maximum. The flag is useful in CI when component authors want every declared Content-to-Content connection to be safe for the full producer output range. Tile capacities describe fixed-size per-tile working buffers and are validated separately; they are not whole-image Content capacities. This flag is unrelated to --max-memory.

Runtime Boundary #

The CLI is designed to run untrusted QIP components with a narrow host interface.

Components execute inside wazero and interact with the CLI through their documented exports and linear memory. Compliance components additionally use the narrow host bridge described in qip comply.

Current host behavior:

Practical effect:

What The Host Process Can Do #

The CLI process itself can still perform host I/O:

So trust in components is separate from trust in the CLI process and its environment.

Supply Chain Notes #

Remote modules:

Recommendation:

Resource Controls #

Current CLI guardrails:

The browser JavaScript hosts expose the same policy with max-memory="<bytes>" and allow-memory-grow; see Browser Elements and the Interactive Component Contract.

Current limitations:

Recommendation:

Data Safety Expectations #