App-Cme

 view release on metacpan or  search on metacpan

bin/cme  view on Meta::CPAN

Migrate data and fix warnings.  See L<App::Cme::Command::fix>.

=head2 modify

Modify a configuration file with the values passed on the command
line.  See L<App::Cme::Command::modify>.

=head2 update

Update the content of the configuration file from external data.
Currently, only dpkg-copyright model support update sub command.
See L<App::Cme::Command::update>.

=head2 search

Search configuration data for a specific string. See L<App::Cme::Command::search>.

=head2 fusefs

Map the configuration file content to a FUSE virtual file system on a
directory specified with option C<-fuse-dir>. Modifications done in
the fuse file system are saved to the configuration file when the
C<fusermount -u> is run.

=head1 Global options

The following options are available for all commands:

=over

=item -create

Perform the operation even if the configuration file is missing. This
may be used to create a minimal configuration file. This option is
disabled by default as a missing configuration file often indicates an
error during the installation of the application.

=item -file

For model that support it, specify an alternate file to read and write the
configuration.

You can use this option for model that require the target file to be
specified (e.g. the late multitrap model). A file can also be
specified with the 4th command argument. E.g. these 2 commands have
the same effect:

  cme check multistrap foo.conf
  cme check multistrap -file foo.conf

=item -force-load

Load file even if errors are found in data. Bad data is discarded

=item -canonical

Write config data back using model order. By default, write items back
using the order found in the configuration file. This feature is
experimental and not supported by all backends.

=item -backup

Create a backup of configuration files before saving. By default, C<old> will
be appended to the backup file. I.e. C<foo.conf> will be backed up as C<foo.conf.old>.
You can specify an alternate suffix. For instance C<-backup dpkg-old>.

=item -save

Force a save even if no change was done. Useful to reformat the configuration file.

=item -strict

When set, cme will exit 1 if warnings are found during check (of left after fix)

=item -verbose

Show more information about what's going on.

=item -quiet

Suppress all output except error messages.

=back

=head1 Advanced options

=over

=item -model-dir

Specify an alternate directory to find model files. Mostly useful for
tests.

=item -root-dir

Specify a pseudo root directory to read and write the configuration
files. (Actual default directory and file names depends on the model
(See C<-model> option). For instance, if you specify C<~/mytest>, the
C</etc/ssh/sshd_config> files will be written in C<~/mytest/etc/ssh/>
directory.

=item -stack-trace

Provides a full stack trace when exiting on error.

=item -try-app-as-model

When set, try to load a model using directly the application name specified as 3rd parameter
on the command line. Experimental.

=back

=head1 Embedding cme

You can use cme from another program by using C<-ui simple>
option. This way you will be able to send command on the standard input
of C<cme> and get the results from the standard output.

=head1 Logging

All Config::Model logging is now based on L<Log::Log4perl>.
Logging can be configured in the following files:

=over



( run in 0.657 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )