NAME

Mojolicious::Plugin::Config::Structured::Command::config_dump - dump a Config::Structured configuration to text

SYNOPSIS

Dump a Config::Structured configuration to text
Usage: <APP> config-dump [--verbose] [--depth n] [--path str] [--reveal-sensitive]

Options:
  --verbose             display all node metadata instead of just the value
  --depth n             truncate/ignore nodes below depth n (relative to real root, not --path)
  --path str            display only config nodes from str down
  --reveal-sensitive    do not obscure sensitive values in output

DESCRIPTION

config_dump is a utility for displaying a Config::Structured config that has been loaded into Mojolicious as formatted text

In its default mode, it displays each node name and the associated value. With the --verbose flag, though, all node metadata is output, including description, examples, notes, and where the configured value came from.

OPTIONS

verbose

Display complete node metadata instead of just node names and values. All supported Config::Structured node metadata keys and values are included.

path

Begin the output at the specified configuration path, ignoring configuration nodes above/outside that point

depth

End the output at the specified configuration depth (relative to the original root node -- does not regard --path), ignoring configuration nodes below that point

reveal-sensitive

By default, configured values for any nodes marked sensitive are obscured and replaced by a string of asterisks. Use this option to show the actual values for these nodes

EXAMPLES

Standard:

/app$ script/myapp config-dump
secrets => "************"
db      =>
  dsn       => "dbi:mysql:host=mydb;port=3306;database=myapp_dev"
  pass      => "************"
  user      => "myapp_user"
  migration =>
    directory => "/schema"
    pass      => "************"
    registry  => "sqitch_myapp_dev"
    user      => "sqitch"

At path:

/app$ script/myapp config-dump --path /db/migration
directory => "/schema"
pass      => "************"
registry  => "sqitch_myapp_dev"
user      => "sqitch"

With depth limit:

/app$ script/myapp config-dump --path /db --depth 1
dsn       => "dbi:mysql:host=mydb;port=3306;database=myapp_dev"
pass      => "************"
user      => "myapp_user"
migration => {...}

Without sensitive obscurement:

/app$ script/myapp config-dump --path /db --depth 1 --reveal-sensitive
dsn       => "dbi:mysql:host=mydb;port=3306;database=myapp_dev"
pass      => "&xyus7#^kP**6Eeo9Yht6fU"
user      => "devapps"
migration => {...}

Verbose:

/app$ script/myapp config-dump --verbose
/secrets
  private key to encrypt session data with
  Type:       ArrayRef[Str]
  Sensitive:  Y
  Default:    ["not-very-secret"]
  Value:      "************"

/db/dsn
  Data Source Name for the database connection
  Type:       Str
  URL:        https://en.wikipedia.org/wiki/Data_source_name
  Default:    "dbi:mysql:host=localhost;port=3306;database=myapp"
  Value:      "dbi:mysql:host=mydb;port=3306;database=myapp_dev"

/db/pass
  database connection password
  | Often passed as a file or ENV for security
  Type:       Str
  Sensitive:  Y
  Ref<File>:  /run/secrets/app_db_password
  Value:      "************"

/db/user
  database connection username
  Type:       Str
  Default:    "app_user"
  Value:      "myapp_user"

/db/migration/directory
  location of schema migration files
  Type:       Str
  Default:    "/schema"
  Value:      "/schema"

/db/migration/pass
  database connection password for migrations
  | Often passed as a file or ENV for security
  Type:       Str
  Sensitive:  Y
  Ref<File>:  /run/secrets/sqitch_password
  Value:      "************"
...

AUTHOR

Mark Tyrrell <mark@tyrrminal.dev>

LICENSE

Copyright (c) 2024 Mark Tyrrell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.