class AzuCLI::Config

Overview

Configuration management system for Azu CLI Supports environment-aware configuration with sensible defaults

Defined in:

azu_cli/config.cr

Constant Summary

DEFAULT_CONFIG_PATHS = ["./config/azu.yml", "./azu.yml", "~/.config/azu/config.yml", "~/.azu.yml"]

Default configuration file paths (searched in order)

EXIT_FAILURE = 1
EXIT_INVALID_USAGE = 2
EXIT_NOT_FOUND = 3
EXIT_SUCCESS = 0

Exit codes for consistent CLI behavior

INSTANCE = new

Class Method Summary

Instance Method Summary

Class Method Detail

def self.build_path(*segments : String) : String #

Build path from segments


[View source]
def self.generate_sample_config(path : String = "./azu.yml") #

Generate sample configuration file


[View source]
def self.instance #

[View source]
def self.load!(config_path : String | Nil = nil) #

[View source]

Instance Method Detail

def colored_output=(colored_output : Bool) #

[View source]
def colored_output? : Bool #

[View source]
def config_file_path : String | Nil #

[View source]
def config_file_path=(config_file_path : String | Nil) #

[View source]
def database_adapter : String #

[View source]
def database_adapter=(database_adapter : String) #

[View source]
def database_host : String #

[View source]
def database_host=(database_host : String) #

[View source]
def database_name : String | Nil #

[View source]
def database_name=(database_name : String | Nil) #

[View source]
def database_password : String #

[View source]
def database_password=(database_password : String) #

[View source]
def database_port : Int32 #

[View source]
def database_port=(database_port : Int32) #

[View source]
def database_url : String | Nil #

Database configuration


[View source]
def database_url=(database_url : String | Nil) #

Database configuration


[View source]
def database_user : String #

[View source]
def database_user=(database_user : String) #

[View source]
def debug_mode : Bool #

Global configuration


[View source]
def debug_mode=(debug_mode : Bool) #

Global configuration


[View source]
def dev_server_host : String #

Development server configuration


[View source]
def dev_server_host=(dev_server_host : String) #

Development server configuration


[View source]
def dev_server_port : Int32 #

[View source]
def dev_server_port=(dev_server_port : Int32) #

[View source]
def dev_server_rebuild=(dev_server_rebuild : Bool) #

[View source]
def dev_server_rebuild? : Bool #

[View source]
def dev_server_watch=(dev_server_watch : Bool) #

[View source]
def dev_server_watch? : Bool #

[View source]
def development? #

Check if running in development environment


[View source]
def environment : String #

[View source]
def environment=(environment : String) #

[View source]
def full_database_url : String #

Get full database URL


[View source]
def load!(config_path : String | Nil = nil) #

[View source]
def log_format : String #

[View source]
def log_format=(log_format : String) #

[View source]
def log_level : Log::Severity #

Logging configuration


[View source]
def log_level=(log_level : Log::Severity) #

Logging configuration


[View source]
def output_path : String #

[View source]
def output_path=(output_path : String) #

[View source]
def production? #

Check if running in production environment


[View source]
def project_name : String #

Project configuration


[View source]
def project_name=(project_name : String) #

Project configuration


[View source]
def project_path : String #

[View source]
def project_path=(project_path : String) #

[View source]
def quiet : Bool #

[View source]
def quiet=(quiet : Bool) #

[View source]
def show_help_on_empty=(show_help_on_empty : Bool) #

CLI configuration


[View source]
def show_help_on_empty? : Bool #

CLI configuration


[View source]
def template_engine : String #

[View source]
def template_engine=(template_engine : String) #

[View source]
def templates_path : String #

File system configuration


[View source]
def templates_path=(templates_path : String) #

File system configuration


[View source]
def test? #

Check if running in test environment


[View source]
def test_watch_patterns : Array(String) #

Get file watch patterns for test runner


[View source]
def validate! #

Validate configuration


[View source]
def verbose : Bool #

[View source]
def verbose=(verbose : Bool) #

[View source]
def watch_patterns : Array(String) #

Get file watch patterns for development server


[View source]