Skip to content

What a snapshot captures ​

hiarky snap statically analyses your project and records every module-scope declaration as a symbol with a stable id (<file>#<name>).

FieldWhat it holds
kindcomponent, function, class, type, const, route, procedure, model, migration, config
exportdefault, named or none
signatureNormalised parameters and return type, for functions
membersComponent props, interface and enum members, class members, object-literal keys
hooksEvery useX(...) call, with the bound variable name (useState → count)
edgesrenders (JSX children), calls (project functions and imports), extends, references
roleTags such as client / server (from "use client"), class for class components
routeThe URL a page or handler serves: /dashboard/company/:id, GET /api/health
bodyHashHash of the declaration's source, so body-only edits are detected

Components ​

Function, arrow, memo/forwardRef-wrapped and class components are recognised. Props come from destructured parameters and TypeScript annotations (inline literals plus same-file interfaces and type aliases). Class components use this.props.x accesses.

Imports ​

Imports are resolved so the graph connects in real projects: relative paths, tsconfig.json path aliases (jsonc and extends chains included), workspace packages (package.json#workspaces and pnpm-workspace.yaml) and barrel files. When a barrel re-exports a third-party package, the edge records that package, not the local alias.

Storage ​

Snapshots are stored as .hiarky/snapshots/<timestamp>-<uuid>.snapshot, in YAML so they are readable and diffable in git. Metadata includes the timestamp, UUID, git commit, branch, dirty flag and file, symbol and component counts.

A snapshot identical to the previous one is skipped. Snapshots written by earlier versions are upgraded on read, so an existing history keeps working.

Released under the MIT License.