Reference
This page documents exact behavior. Open the reference overview
init¶
init is the repository bootstrap command.
Use it when a checkout needs to establish local state, binding, and optional managed-hook setup before normal workflows begin.
Purpose¶
init prepares a repository for envctl.
It is the bootstrap command that establishes local project state and helps you get to a usable starting point.
What it does¶
- initializes the current project in the local vault
- can bootstrap a missing contract depending on
--contract - establishes or repairs the local project binding when needed
- attempts to install envctl-managed
pre-commitandpre-pushhooks - is safe to think of as “prepare this repository for envctl”
Key option¶
--contract¶
Controls how envctl handles a missing contract:
askexamplestarterskip
The exact choice changes how much scaffolding init performs when the repository does not already have a contract.
Managed hooks behavior¶
As part of bootstrap, init attempts to install the managed Git hooks that envctl uses to run guard secrets automatically.
That hook installation is intentionally non-invasive:
- it only touches supported hook names owned by
envctl - it does not overwrite foreign hooks unless you later opt into
envctl hooks install --force - it does not manage hooks paths outside the current repository perimeter
If hook installation cannot complete cleanly, init still finishes the repository bootstrap and reports the hook outcome separately.
When to use it¶
Use init:
- the first time a repository adopts
envctl - after cloning a project that already expects envctl-managed local state
- when local binding or vault setup needs to be re-established
When not to use it¶
Do not use init as a substitute for filling missing values. Once the project is initialized, use fill, check, and run for normal workflows.
Typical examples¶
Related commands¶
- use
configto create your user-level config first - use
projectwhen you need lower-level binding operations - use
fillafter initialization to add missing required values - use
hooksto inspect, repair, or remove managed Git hooks explicitly
Related pages¶
Hooks¶
See the exact command group for managed hook operations after bootstrap.