chant workspace lineage
Synopsis
Section titled “Synopsis”chant workspace lineage [--json]chant workspace lineage resolve <path>Description
Section titled “Description”chant workspace lineage reads .chant/workspace.lock.json in the current directory and prints one entry per scope. Each entry names the scope’s template and pin, and its source kind followed by where that source points. The kinds are the type values listed under Sources. It then counts the files the project has edited or deleted since, and lists open manual steps. Generated files are left out of the counts, because their command rebuilds them.
A scope that chant workspace adopt-lineage adopted by its files has one more line, with the commit it was adopted at and its provenance: adopted once the trust policy at the base revision admits that range, unattested with the reason until then. A directory lineage moved onto git names the directory it was moved from.
It needs no chant.workspace.json. Any project with a lock can use it, including a plain project made by chant init --from. The command exits 1 when there is no lock.
$ chant workspace lineage. template github.com/acme/starter#service@v1.4.0 (4624a0b6ca83) source: git acme/starter#service 12 file(s), 2 edited, 0 deletedvendor/web-app vendor web-app local:../shared/web-app@v1.2.0 source: local ../shared/web-app 3 file(s), 1 edited, 0 deleted manual step: vendor/web-app/index.ts (changed-locally)2 scope(s), 1 manual step(s) openresolve <path>
Section titled “resolve <path>”Closes the manual step for <path>, given relative to the lock’s directory. Run it after merging the source’s changes into the file by hand. The file as it stands is kept, and the source’s version becomes its new merge base. For a file the source removed, the file leaves the lineage and stays as the project’s own. The command exits 1 when <path> has no open step.
Options
Section titled “Options”| Option | Effect |
|---|---|
--json | Print { lock, scopes }, where each scope has scope, kind, name (vendor only), template, source (as the lock records it), ref, address, files (a count), edited, missing and manualSteps, plus adoption (as the lock records it) for an adopted scope, and provenance (level and reason) for one adopted by its files. |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | The lock was read, or the step was closed |
| 1 | No lock, an invalid lock, or no open step for the path |