snapshots
Extract a repo at sampled revisions into a temporal store (model.db).
Synopsis
codegraph snapshots [repo] --extractor FILE [--every N] [--tags] [--store FILE] [--src DIR] [--json]Arguments
| Argument | Meaning | Default |
|---|---|---|
<repo> | Path to the repository to snapshot. | . |
Options
| Option | Meaning | Default |
|---|---|---|
--extractor FILE | The extractor run at every revision, as a path: a .jar (run with java -jar), a .js (run with node), or an executable such as the installed codegraph-java ($(command -v codegraph-java)) or codegraph-csharp. All honour the extractor command-line contract. | required |
--jar FILE | Alias of --extractor, kept for the form --jar codegraph-java.jar. | — |
--every N | Snapshot every Nth first-parent commit, oldest first; the tip is always included. | — |
--tags | Snapshot the commits the repo’s tags point at instead (releases as keyframes). | — |
--store FILE | The temporal store to append to; defaults to | — |
--src DIR | Directory to extract, relative to the repo root (default: the whole repo). | — |
--json | Print the same information as a machine-readable JSON object on stdout. | — |
-h, --help | Show this help. | — |
Exit codes
0 ok · 1 internal error (a bug) · 2 usage error · 3 findings.
3 when any sampled revision failed to extract; the failures are listed and the successful frames stay in the store.
Example
$ codegraph snapshots . --jar extractors/java/target/codegraph-java.jar --tags --store /tmp/temporal.db
The command runs the extractor once per sampled revision, each in a throwaway git worktree; a rerun skips the revisions the store already holds.
See also
Last updated on