Skip to content

fezcode/atlas.pq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atlas.pq 🛰️

banner

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.

Features

  • 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 stdin or files.

Installation

Install via atlas.hub:

atlas.hub

Or build from source using gobake:

gobake build

Usage

atlas.pq [options] [file.piml]

Options

  • -q string: The query string (default: .)
  • -r: Raw output (don't quote strings)
  • -c: Compact JSON output
  • -v: Show version
  • -h: Show help

Examples

Accessing a field:

atlas.pq -q "(name)" config.piml

Accessing an array element:

atlas.pq -q "tools.0.version" manifest.piml

Extracting a raw value for a script:

VERSION=$(atlas.pq -r -q "version" recipe.piml)

Piping data:

cat data.piml | atlas.pq -q "metadata.author"

License

MIT

About

Minimalist command-line PIML processor inspired by jq. Slice, filter, and map PIML data with dot notation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages