Skip to content

introspect command

Output machine-readable JSON describing the project structure.

bash
fobis introspect [options]

fobis introspect is designed for IDE integrations, editor plugins, CI dashboards, and AI agent workflows. All output is written to stdout as JSON (or TOML with --format toml).

Query flags

At least one flag must be provided. Multiple flags combine their output into a single JSON object.

FlagDescription
--sourcesList all discovered source files with metadata
--compilerActive compiler name and all resolved flags
--dependenciesResolved dependency list from [dependencies] section
--targetsNamed targets from [target.*] sections
--include-dirsEffective include search directories
--buildoptionsFull resolved build options namespace
--projectinfoProject metadata from [project] section
--allAll of the above

Output options

OptionDefaultDescription
--format FORMATjsonOutput format: json or toml
--writeFalseWrite individual intro-*.json files into .fobis-info/

fobos options

OptionDescription
-f, --fobosSpecify a fobos file with a different name or path
--modeSelect a fobos mode

Examples

bash
# Show all project information as JSON
fobis introspect --all

# Show only the compiler and flags
fobis introspect --compiler

# Show project metadata
fobis introspect --projectinfo

# Write individual JSON files for IDE consumption
fobis introspect --all --write

# Use with jq to extract a specific field
fobis introspect --compiler | jq '.compiler.name'

# TOML output
fobis introspect --all --format toml

Example output

json
{
  "compiler": {
    "name": "gnu",
    "fc": "gfortran",
    "cflags": "-c -O2 -J mod",
    "lflags": "-J mod",
    "mpi": false,
    "openmp": false
  },
  "projectinfo": {
    "name": "myproject",
    "version": "1.2.0",
    "authors": ["Stefano Zaghi"]
  }
}

Claude Code integration

fobis introspect --all feeds the project graph directly to AI assistants. It is the data source used by the bundled /fobis Claude Code skill. See Claude Code Skill for details.