atlas.pq is a minimalist command-line PIML processor, heavily inspired by jq. It allows you to slice, filter, and map PIML data with ease using simple dot notation.
- Dot Notation: Access nested fields and array indices (e.g.,
tools.0.name). - JSON Output: Converts PIML data to structured JSON for piping into other tools.
- Raw Mode: Output unquoted strings, perfect for shell scripts.
- Compact Mode: Minified JSON output for performance.
- Pipe Support: Reads from
stdinor files.
Install via atlas.hub:
atlas.hubOr build from source using gobake:
gobake buildatlas.pq [options] [file.piml]-q string: The query string (default:.)-r: Raw output (don't quote strings)-c: Compact JSON output-v: Show version-h: Show help
Accessing a field:
atlas.pq -q "(name)" config.pimlAccessing an array element:
atlas.pq -q "tools.0.version" manifest.pimlExtracting a raw value for a script:
VERSION=$(atlas.pq -r -q "version" recipe.piml)Piping data:
cat data.piml | atlas.pq -q "metadata.author"MIT
