inspect is designed for agents that need the same context as the MCP inspect_target tool without starting an MCP session.
Target
Choose exactly one target form:| Flag | Description |
|---|---|
--file <PATH> | Inspect a project-relative file. |
--symbol <FILE:EXPORT> | Inspect one exported symbol, for example src/api.ts:fetchUser. Supporting dead-code, duplication, complexity, and security evidence is file-scoped in the first version. |
Output
| Format | Description |
|---|---|
human | Compact target and identity summary. |
json | Machine-readable kind: "inspect_target" bundle with normalized target identity and evidence sections. Use this from agents. |
$ fallow inspect --file src/api.ts --format json --quiet
status (ok or error) and scope. Non-fatal child-analysis failures are reported as section-level errors plus a warning, so the caller can still use the rest of the bundle.
Common Flags
inspect accepts the global project and performance flags:
| Flag | Description |
|---|---|
-r, --root <PATH> | Project root directory. |
-c, --config <PATH> | Path to a fallow config file. |
-w, --workspace <PATTERNS> | Scope analysis to selected workspace packages. |
--production | Apply production mode to trace, dead-code, and health evidence. |
--no-cache | Disable incremental parse cache. |
--threads <N> | Parser thread count. |
MCP Parity
The MCPinspect_target tool uses the same CLI flow and returns the same JSON shape. Prefer the CLI when you are already in a shell or editor command, and MCP when an agent is already connected to the server.