Coverage for src / rhiza / __init__.py: 100%
6 statements
« prev ^ index » next coverage.py v7.14.0, created at 2026-07-16 12:51 +0000
« prev ^ index » next coverage.py v7.14.0, created at 2026-07-16 12:51 +0000
1"""Rhiza — Manage reusable configuration templates for Python projects.
3Rhiza is a command-line interface (CLI) that helps you maintain consistent
4configuration across multiple Python projects using templates stored in a
5central repository. It syncs (injects) template files into a target repository,
6loading and validating the template configuration each time it runs.
8## Key features
10- Template sync with selective include/exclude support.
11- Configuration loaded and validated on every sync.
12- Validating dry-run preview via ``rhiza sync --strategy diff``.
13- Multi-host support (GitHub and GitLab).
15## Quick start
17Create a `.rhiza/template.yml` file in your project by hand — it must specify a
18`template-repository` and one of `include`, `templates`, or `profiles`. Then
19sync templates into your project:
21```bash
22rhiza sync
23```
25Preview what would change first with a validating dry-run:
27```bash
28rhiza sync --strategy diff
29```
31## Main modules
33- `rhiza.commands` — Core command implementations (sync, summarise).
34- `rhiza.models` — Data models and schemas for template configuration.
36## Documentation
38For an overview and usage guides, see the repository files:
40- [README.md](https://github.com/jebel-quant/rhiza-cli/blob/main/README.md) —
41Project overview and installation instructions.
42- [USAGE.md](https://github.com/jebel-quant/rhiza-cli/blob/main/USAGE.md) —
43Practical examples, workflows, and best practices.
44- [CLI.md](https://github.com/jebel-quant/rhiza-cli/blob/main/CLI.md) —
45Command reference with examples.
47Latest version and updates: https://github.com/jebel-quant/rhiza-cli
48"""
50from importlib.metadata import PackageNotFoundError, version
52try:
53 __version__ = version("rhiza")
54except PackageNotFoundError:
55 # Package is not installed, use a fallback version
56 __version__ = "0.0.0+dev"
58__all__ = ["commands", "models"]