fghj graph
fghj graph <entry> [--workspace <path>]Resolves the complete dependency universe reachable from an entry repo — every flow it declares, every service, database and task they pull in — and prints the resolved graph as JSON to stdout.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
entry | Git URL of the entry repo, cloned into the workspace if it isn’t already checked out there. Or a repo already on disk — its .fghj.yaml or its folder — whose parent is the workspace. |
--workspace <path> | Workspace root directory holding sibling repo checkouts. Defaults to the wired workspace you’re standing in, falling back to the current directory. |
A repo already on disk
Section titled “A repo already on disk”A repo you already have doesn’t need a URL. Name its .fghj.yaml, or its
folder, and the folder it sits in is the workspace:
cd ~/work/shop/apifghj graph .fghj.yaml # the workspace is ~/work/shopfghj graph . # the sameAn entry that exists on disk is a repo; anything else is a git URL. A
workspace’s repos are the folders right under it with a .fghj.yaml, so
the file must be at the repo’s root, and every sibling folder with one
joins the workspace too. A repo right in your home folder or right under /
is refused, since the workspace would be all of it. --workspace may still
be given, but it has to be that parent.
The workspace is derived from where you are
Section titled “The workspace is derived from where you are”--workspace is optional because fghj works out which workspace you mean
from your current directory. It asks fghjd for the list of wired
workspaces and picks the one your directory is inside — at any depth, so
this works from the workspace root, from a repo inside it, or from a
subdirectory five levels down inside that repo:
cd ~/aikido/aikifactory/internal/configfghj graph https://github.com/you/storefront.gitWhen it derives a workspace you didn’t name, it says so on stderr:
using workspace /Users/you/aikido (derived from the current directory)Two things it deliberately does not do. It does not guess from the
filesystem — no walking up looking for an .fghj.yaml — so the only
directories it will ever choose are ones you explicitly wired. And if
fghjd isn’t running, or your directory isn’t inside any wired workspace,
it falls back to the current directory exactly as it did before, rather
than failing.
There is never an ambiguity to resolve, because workspaces cannot overlap:
fghj wire refuses a directory that nests with an already-wired
one, in either direction.
What’s in the output
Section titled “What’s in the output”The same resolved graph the web UI’s Repos/Actual tabs render — nodes (services and backing dependencies, each with its derived id, label, and default-run domain) and the edges between them, plus which flows each node belongs to. See Node identity & domains for how those ids and domains are derived.
Unlike fghj wire, graph doesn’t require fghjd to be running — it
resolves the graph locally and prints it, without registering anything
with the daemon or touching Docker. It’s useful for inspecting what a
workspace would resolve to, or piping into another tool, without
affecting the running daemon’s state.
Because resolution is lazy (see
Flat workspace model), a dependency
that isn’t cloned into the workspace yet still appears in the output as a
stub node — check each node’s downloaded field.