CLI

Every pie command and flag.

Global flags

Place global flags before the subcommand, as in pie --log-level debug serve.

FlagMeaning
-c, --config <PATH>Config file path. Otherwise uses $PIE_CONFIG, then $PIE_HOME/config.toml.
--log-level <LEVEL>error, warn, info (default), debug, or trace.
--metrics-listen <ADDR>Serve Prometheus metrics at this address.
--jsonPrint machine-readable JSON output (also accepted after any subcommand).

Commands

CommandEffect
pie serveStart the server (gateway, controller, and worker in one process). SIGHUP reloads policies.
pie run [INFERLET] [-- ARGS]Run one inferlet and exit. INFERLET can be a .py, .js, or .wasm file, an installed name, or an example name in a checkout of the repository.
pie model list · info · import · removeManage imported .zt model files.
pie cache list · clearList or clear the Hugging Face download cache.
pie config list · show · set · unset · edit · init · tuneInspect, edit, initialize, or tune config.toml.
pie inferlet list · info · install · removeManage installed inferlets.
pie language list · install · removeManage the Python and JavaScript WebAssembly runtimes.
pie tune [BACKEND]Benchmark this device and save its kernel profile.
pie profile schema · list · dump · exportInspect and export device kernel profiles.
pie doctorCheck the config file, model artifacts, engine, and GPU drivers.

pie run

pie run main.py -- --prompt "Hi" --max-tokens 16
OptionMeaning
-p, --path <PATH>Path to the inferlet file (alternative to the positional argument).
-o, --out <DIR>Directory where files sent with session.send_file() are saved.
--file <NAME=PATH>Attach a file readable inside the inferlet via session.file(NAME). Repeatable.

Arguments after -- become the JSON input object passed to main: --key value pairs become fields (- in a key becomes _), numbers and true/false are parsed as their types, a bare --flag becomes true, and remaining arguments go into _positional.

pie model import

pie model import <hf-id> [--deployment NAME] [--drafter NAME] [--dry-run]
OptionMeaning
--deployment <NAME>Import using this deployment. --deployment '?' lists all deployments for the model.
--drafter <NAME>Attach a speculative-decoding draft head.
--out <PATH>Write the .zt file to this path.
--dry-runPrint the import plan without downloading or converting.
--forceOverwrite an existing .zt file.
--keep-source · --delete-source · --consume-sourceHow to handle the downloaded Hugging Face shards: keep them (default), delete them after conversion, or delete each shard as soon as it is converted.

pie tune

OptionMeaning
--fullMeasure the full kernel grid (about an hour) instead of the quick subset (a few minutes).
--dry-runMeasure and print the profile without saving it.
--check <DEPLOYMENT>Model deployment to validate end to end; defaults to the smallest imported model.
--no-checkSkip the end-to-end validation check.
--forceSave the new profile even if end-to-end validation measures lower speed.
--refitRefit the profile from the last run's measurements without re-running benchmarks.

pie config tune

OptionMeaning
--for latency|throughputOptimization target.
--program <NAME>Inferlet to run as the benchmark workload.
--fleet, --tokens, --repeats, --budgetConcurrency, token length, repeat count, and search budget.
--writeSave the best settings found into config.toml.

Cluster binaries

BinaryMain options
pie-controller--listen
pie-gateway--listen, --worker-listen, --controller
pie-worker--host, --port, --controller, --role
pie-poolRemote KV page pool; loads no model

All four binaries accept -c/--config, --log-level, and --metrics-addr.