Coverage for src / rhiza / commands / welcome.py: 100%
4 statements
« prev ^ index » next coverage.py v7.13.1, created at 2025-12-29 01:59 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2025-12-29 01:59 +0000
1# This file is part of the jebel-quant/rhiza repository
2# (https://github.com/jebel-quant/rhiza).
3#
4"""Command to display a welcome message and explain Rhiza.
6This module provides the welcome command that displays a friendly greeting
7and explains what Rhiza is and how it can help manage configuration templates.
8"""
10from rhiza import __version__
13def welcome():
14 """Display a welcome message and explain what Rhiza is.
16 Shows a friendly greeting, explains Rhiza's purpose, and provides
17 next steps for getting started with the tool.
19 This command is useful for new users to understand what Rhiza does
20 and how to get started. It provides a high-level overview without
21 performing any operations on the file system.
22 """
23 # Construct a nicely formatted welcome message with ASCII art border
24 # The version is dynamically inserted from the package metadata
25 welcome_message = f"""
26╭───────────────────────────────────────────────────────────────╮
27│ │
28│ 🌿 Welcome to Rhiza v{__version__:<39} │
29│ │
30╰───────────────────────────────────────────────────────────────╯
32Rhiza helps you maintain consistent configuration across multiple
33Python projects using reusable templates stored in a central repository.
35✨ What Rhiza can do for you:
37 • Initialize projects with standard configuration templates
38 • Materialize (inject) templates into target repositories
39 • Validate template configurations
40 • Keep project configurations synchronized
42🚀 Getting started:
44 1. Initialize a project:
45 $ rhiza init
47 2. Customize .github/rhiza/template.yml to match your needs
49 3. Materialize templates into your project:
50 $ rhiza materialize
52📚 Learn more:
54 • View all commands: rhiza --help
55 • Project repository: https://github.com/jebel-quant/rhiza-cli
56 • Documentation: https://jebel-quant.github.io/rhiza-cli/
58Happy templating! 🎉
59"""
61 # Print the welcome message to stdout
62 print(welcome_message)