Skip to content

Command-line interface

PIIGhost ships a small command-line tool named piighost, installed as a console entry point with the config optional dependency:

pip install "piighost[config]"

It exposes two subcommands, both built around a TOML pipeline configuration. Neither one instantiates the pipeline components, so no detector is built and no model is loaded. That makes both commands fast and safe to run in CI.

piighost validate

Parses a TOML file and validates it against the pipeline schema. It checks the structure and every value without building a detector or loading a model, so you can catch a broken config before it reaches a running server.

$ piighost validate ./pipeline.toml
OK: pipeline.toml

The exit code is 0 on success and 1 on any error: a missing file, invalid TOML syntax, or a value that fails validation. The error message is written to stderr, which makes the command suitable for a CI gate.

piighost schema

Prints the JSON Schema of the pipeline configuration to stdout. The schema is generated by Pydantic from the config models, so it always matches the version of PIIGhost you have installed.

$ piighost schema > schema.json

Point an editor at schema.json for TOML autocompletion and inline validation, or feed it to any tool that consumes JSON Schema.

Getting help

$ piighost --help
$ piighost validate --help