Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

pkgconf

$ pkgconf Community Low Risk
pkgconf · Code & DevOps · ISC · macos / linux / windows

pkgconf resolves .pc metadata files to emit C/C++ compiler include flags (--cflags), linker libraries (--libs), and dependency graphs (--simulate). It is a fast, strictly read-only C binary that replaces legacy pkg-config with predictable exit codes and plain-text output.

FCRS-1.0 Score
77 /100
Good
High Confidence
Zero-Friction Install
brew install pkgconf
CLI vs MCP Decision CLI Only

pkgconf inspects local system .pc metadata files and returns exact compiler/linker flags for local toolchains; MCP is inapplicable.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
3.0.7
Startup
8 ms
Exit Codes (help / invalid)
0 / 1
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
usage: pkgconf [OPTIONS] [LIBRARIES]

basic options:

  --help                            this message
  --about                           print pkgconf version and license to stdout
  --version                         print supported pkg-config version to stdout
  --verbose                         print additional information
  --atleast-pkgconfig-version       check whether or not pkgconf is compatible
                                    with a specified pkg-config version
  --errors-to-stdout                print all errors on stdout instead of stderr
  --print-errors                    ensure all errors are printed
  --short-errors                    be less verbose about some errors
  --silence-errors                  explicitly be silent about errors
  --list-all                        list all known packages
  --list-package-names              list all known package names
  --simulate                        simulate walking the calculated dependency graph
  --no-cache                        do not cache already seen packages when
                                    walking the dependency graph
  --log-file=filename               write an audit log to a specified file
  --with-path=path                  adds a directory to the search path
  --define-prefix                   override the prefix variable with one that is guessed based on
                                    the location of the .pc file
  --dont-define-prefix              do not override the prefix variable under any circumstances
  --prefix-variable=varname         sets the name of the variable that pkgconf considers
                                    to be the package prefix
  --dont-relocate-paths             disables path relocation support

cross-compilation personality support:

  --personality=triplet|filename    sets the personality to 'triplet' or a file named 'filename'
  --dump-personality                dumps details concerning selected personality

checking specific pkg-config database entries:

  --atleast-version                 require a specific version of a module
  --exact-version                   require an exact version of a module
  --max-version                     require a maximum version of a module
  --exists                          check whether or not a module exists
  --uninstalled                     check whether or not an uninstalled module will be used
  --no-uninstalled                  never use uninstalled modules when satisfying dependencies
  --n

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

Fast, deterministic, non-interactive read-only queries (--cflags, --libs, --modversion, --exists), though emits compiler-flag strings without --json.

  • --exists --print-errors gives unambiguous exit codes and diagnostics
  • No --json output mode
Trust & Safety 23 / 25

Strictly read-only metadata query tool with zero filesystem mutations, network calls, or credential handling.

  • Pure read-only .pc file evaluator
Setup & Portability 13 / 15

Lightweight native C binary available via Homebrew, Linux package managers, and MSYS2/Windows.

  • Zero-dependency native C binary across macOS, Linux, and Windows
Utility & Efficiency 11 / 15

Solves library discovery and version checks (--atleast-version) in sub-millisecond invocations.

  • Replaces slower GLib-based pkg-config with a fast C library/CLI
Maintenance & Lineage 7 / 10

Actively maintained community project (pkgconf/pkgconf) under ISC license, standard across Homebrew, Alpine, Fedora, and FreeBSD.

  • Default pkg-config implementation on major distros and Homebrew
Docs & Verifiability 7 / 10

Clear --help output and pkgconf(1) man page, though web docs are minimal.

  • Comprehensive --help and man page flags

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No authentication or user state required; reads .pc metadata from PKG_CONFIG_PATH and system directories.

Side Effects
Read-Only
Cost & Quotas

ISC open-source CLI; free to use.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# pkgconf Agent Rules
- Use `pkgconf --exists --print-errors <pkg>` before guessing header or library paths.
- Pass `PKG_CONFIG_PATH` explicitly when querying keg-only Homebrew or custom prefix `.pc` files.

Agent-Ready Command Recipes

Safe Read-Only Queries

List all discoverable system packages
pkgconf --list-all

Enumerates all .pc packages visible on PKG_CONFIG_PATH with short descriptions.

Query compiler and linker flags for a library
pkgconf --cflags --libs openssl

Outputs exact -I, -L, and -l flags needed to compile and link against openssl.

Strengths for Agents

  • + 100% read-only, sub-millisecond .pc metadata resolution with clear exit codes.
  • + --simulate, --print-errors, and --errors-to-stdout make debugging missing native deps easy.
  • + Drop-in pkg-config compatibility without GLib runtime bloat.

Caveats & Pitfalls

  • ! Outputs raw compiler/linker strings rather than --json.
  • ! Requires PKG_CONFIG_PATH when querying Homebrew keg-only or non-standard library prefixes.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI