gwz init¶
Create a workspace or initialize one from source URLs.
With no URLs, gwz init creates an empty GWZ workspace. With one or more URLs,
it creates the workspace, adds those repositories as initial members, and
materializes them from their heads.
GWZ writes workspace metadata under gwz.conf/, including the manifest
gwz.conf/gwz.yml and lock gwz.conf/gwz.lock.yml. It also writes the
root-only AGENTS_GWZ.md bootstrap file.
Use gwz init --update in an existing workspace root to refresh GWZ-managed
bootstrap files. GWZ overwrites AGENTS_GWZ.md automatically only when its
managed SHA-256 header still matches the file body; use global --force to
replace a locally edited file.
Options¶
| Option | Meaning |
|---|---|
--update |
Refresh root-only GWZ-managed bootstrap files, including AGENTS_GWZ.md. |
--path <path-prefix> |
Workspace-relative prefix for initialized source repositories. Defaults to an empty prefix. |
Global options such as --dry-run, --partial, --force, --sync,
--remote, --jobs, --max-per-host, --json, and --jsonl are also
available.
Examples¶
Create an empty workspace:
Initialize from two sources:
Place initialized repositories under a prefix:
Refresh the root bootstrap file:
Notes¶
--pathaffects paths assigned to source repositories during initialization.- If you already have a GWZ root repository cloned, use
gwz materialize --lockinstead ofgwz init. - Use
gwz repo addto register an existing local repository after workspace creation.