wayglass init
Bring a repository under Wayglass: create its trunk in Artifacts and write .wayglass/policy.yaml.
Creates the project and its trunk repo through the Worker, writes .wayglass/policy.yaml (from the built-in example, if missing) and .wayglass/config.yaml, commits them, and pushes the current branch’s history to the trunk with a short-lived trunk token that is never written to disk. Run it inside the repository you want agents to work on; an existing repository with its history, branches and remotes is the normal case. Any remote it already has (origin on GitHub, say) stays as it is.
With –from <url>, init first clones that repository into dir (default: the repository’s name) with your own git credentials (ssh-agent, your credential helper; Wayglass never sees or stores them), so a private repository works, then does the same in the clone. The source stays as remote origin.
Before creating anything it checks what Artifacts would refuse: a file over 32 MB anywhere in the history is named here instead of failing the push, and a detached HEAD is refused because the trunk takes a branch. The trunk branch is main whatever the local branch is called; with –from the local branch is renamed to match. Tags stay local unless –tags.
The checkout gets a remote named wayglass for the trunk, with the same credential helper ‘wayglass clone’ configures, so plain ‘git fetch wayglass’ works read-only and brings the why-notes along. Pushes to the trunk still go through ‘wayglass land’; ‘wayglass publish’ sends landed work back to origin.
wayglass init [dir] [flags]Examples
Section titled “Examples”wayglass init # in an existing checkoutwayglass init --from https://github.com/junegunn/fzf.gitwayglass init --from git@github.com:you/private-app.git app --project appwayglass init --jurisdiction eu --tags --mirror origin| Flag | Default | Description |
|---|---|---|
--allow-local |
with –from: accept a local path or file:// URL | |
--from string |
clone this repository first (https://, ssh:// or git@host:path) and bring the clone under Wayglass | |
--jurisdiction string |
us |
where the project’s repos live (us or eu); tags every change and cannot be changed later |
--mirror string |
git remote that ‘wayglass land’ pushes the trunk and its why-notes to after landing (e.g. origin) | |
--no-push |
create the project but do not push the branch to the trunk | |
--project string |
project name (default: the directory or repository name) | |
--public |
opt the project in to the public read-only audit view (the Worker’s PUBLIC_PROJECTS must also match it) | |
--tags |
push the repository’s tags to the trunk as well |
Global flags
Section titled “Global flags”| Flag | Default | Description |
|---|---|---|
--json |
print a JSON envelope for agents (no colour, prompts or spinners) |
Exit codes and the --json envelope are the same for every command; see For agents.
See also
Section titled “See also”wayglass: Zero Trust for agentic development