Skip to main content
Post

How to keep a code graph fresh on every push

Graphify now rebuilds its code graph whenever a commit lands on a repository's default branch, with git hooks and watch mode covering the local CLI. The vendor's reasoning is that a graph describes only the commit it was built from, so an agent reading an old one can point at functions that have since moved.

Hosted indexing on push

In the hosted Graphify product, a push to a repository's default branch triggers indexing of that commit and updates the graph that agents, reviews and the wiki read. There is one graph per repository, and it tracks the default branch. Nothing needs to be scheduled, and no manual rebuild is needed after a merge.

  • Repositories created after installing the GitHub App appear in Graphify automatically, and GitHub permission changes show up without reconnecting.
  • Sync on the Repositories page re-reads GitHub on demand.
  • A running index can be cancelled from the console, for example if a repository was connected by mistake.
  • If nothing has changed since the last build, the rebuild is skipped and the console says so, rather than quietly returning the previous build.
  • Builds show how many nodes each one added or removed.

Keeping a local graph fresh

The open-source CLI has graphify hook install, which rebuilds the graph after commits, checkouts, merges and rewrites using standard git hooks. The rebuild starts in the background after the commit, so the commit does not wait on it. graphify hook uninstall removes the hooks.

The setup from the guide is:

uv tool install graphifyy, then graphify update ., then graphify hook install.

Watch mode

graphify watch . watches the working tree and rebuilds as files change. The guide recommends it for long editing sessions where an agent queries the graph often and uncommitted edits matter. Hooks suit most workflows, since commits are natural checkpoints.

Branches

The hosted graph tracks only each repository's default branch and does not index feature branches. For a graph of the branch being worked on, the guide points to the CLI.

Loading replies…
Loading replies