/rhiza:init¶
Bootstrap a rhiza-managed repo in the current folder. Wraps uv init for the
project skeleton — you don't need to be in a git repo first (uv creates one).
The optional argument is the repository name; it defaults to the current folder's name.
What it does¶
- Checks preconditions — if a
.rhiza/directory already exists the repo is already managed, so/inithands off to/rhiza:update(to bring the template to its latest version, never touching an existingtemplate.yml) and stops. Otherwise it captures any existing git state and confirmsuvis available. - Bootstraps the skeleton with
uv init— for Python (the default) it runsuv init --lib, which creates the git repo,pyproject.toml,src/<pkg>/,README.md,.gitignore, and.python-version. It skipsuv initwhen apyproject.tomlalready exists. Sinceuv initcreates notests/, it then seeds a starter module and test via/rhiza:newso the coverage gate starts green. (Go:git init+ ago mod inithint.) - Asks GitHub vs GitLab (auto-detecting the host from an existing
origin), then owner / name / visibility. - Picks the template repo — defaulting to
jebel-quant/rhizaorjebel-quant/rhiza-goby the language chosen in step 2, with a reachability check. - Scaffolds the rhiza-only config via
scripts/init_scaffold.py:.rhiza/template.yml, a bootstrapMakefile, and — optionally —mkdocs.yml. The project skeleton already came fromuv init, so the scaffolder no longer writespyproject.toml/src//README.md. - Runs the first sync, validates, tests, then puts everything on a
rhiza_init_<date>branch and opens a PR — never pushing rhiza changes straight to the default branch.
Prerequisites¶
uv is required (for uv init and uvx). Install
it once with curl -LsSf https://astral.sh/uv/install.sh | sh — or just run
/rhiza:init, which offers to install uv for you (with your approval) if
it's missing.
Notes¶
- Only for repos that aren't rhiza-managed yet; an existing
.rhiza/routes to/rhiza:update.