CME(1)
๐ CME(1) โ bestie edition ๐
okay so you found CME(1), which lives in the User Contributed Perl Documentation section of your man pages. Sit down, grab a boba, we're doing this ๐งโจ
๐ธ NAME ๐ธ
cme โ Check or edit configuration data with Config::Model
โญ VERSION โญ
version 1.044
๐ฆ SYNOPSIS ๐ฆ
# general synopsis
cme [ global_options ] command application [ options ] [ file ] [ modification_instructions ]
# edit dpkg config with GUI (and Config::Model::Dpkg)
cme edit dpkg
# read data from arbitrary file (for model read from alternate file)
cme check dpkg-copyright -file path/to/file
# edit /etc/sshd_config (with Config::Model::OpenSsh)
sudo cme edit sshd
# edit ~/.ssh/config (with Config::Model::OpenSsh)
cme edit ssh
# check validity
cme check dpkg
# check dpkg files, update deprecated parameters and save
cme migrate dpkg
# like migrate, but also apply all suggested fixes
cme fix dpkg
# modify configuration with command line
cme modify dpkg source 'format="(3.0) quilt"'
# likewise with an application that accepts file override
cme modify dpkg-copyright 'Comment="Modified with cme"'
# map conf data to a fuse file system
cme fusefs dpkg-copyright -d fuse_dir
$ ls -l fuse_dir/License/LGPL-2.1+/text
-rw-r--r-- 1 domi domi 391 30 Jan 19:00 fuse_dir/License/LGPL-2.1+/text
$ fusermount -u fuse_dir
# list all available applications (depends on your installation)
cme list
like, look at all those little recipes ๐ฅน every one of them is a real thing you can run.
๐ DESCRIPTION ๐
Depending on which command you pick (they're listed below, don't worry), the cme program uses Config::Model configuration descriptions to check, modify, or fix configuration files. it's giving very much "one tool, many vibes".
The 3rd parameter tells cme which application you want to work on. Most of the time cme will just find the relevant configuration file(s) all by itself โ this is the most simple case, the no-thoughts-just-vibes case. For instance:
sudo cme check popcon
Some applications โ like the late multistrap ๐ชฆ โ have no constraint on the configuration file name, so you have to specify your file name yourself:
cme check multistrap raspbian.conf
or
cme check multistrap -file raspbian.conf
๐๏ธ Configuration file specification ๐๏ธ
The configuration of an application can take different forms, and she contains multitudes:
- several files (like debian packages)
- a single file with a predefined file (popcon)
- a single file with an arbitrary file name (like the late
multistrap)
When needed, the configuration file name is specified as the 3rd command argument, i.e. cme command application file_name. This applies if the application requires a configuration file name to edit, or if the application allows configuration file override. ๐ซถ
๐ Main commands ๐
This section describes the main commands shipped with cme. Other Config::Model extensions can bring more commands. Run cme help to get the list of available commands on your system. (yes, cme help is your friend, go say hi ๐)
๐ list
Show a list all applications where a model is available. This list depends on installed Config::Model modules.
โ๏ธ edit
Edit a configuration. By default, a Tk GUI will be opened if Config::Model::TkUI is installed. See App::Cme::Command::edit.
๐ shell
Edit the configuration with a shell like interface. See App::Cme::Command::shell.
โ check
Checks the content of the configuration file of an application. See App::Cme::Command::check.
๐ migrate
Update deprecated parameters (old value are saved to new parameters) and save the new configuration. See App::Cme::Command::migrate.
๐ฉน fix
Migrate data and fix warnings. See App::Cme::Command::fix.
๐ modify
Modify a configuration file with the values passed on the command line. See App::Cme::Command::modify.
๐ update
Update the content of the configuration file from external data. Currently, only dpkg-copyright model support update sub command. See App::Cme::Command::update.
๐ search
Search configuration data for a specific string. See App::Cme::Command::search.
๐ fusefs
Map the configuration file content to a FUSE virtual file system on a directory specified with option -fuse-dir. Modifications done in the fuse file system are saved to the configuration file when the fusermount -u is run. (it's giving โจmagicโจ, truly)
๐ Global options ๐
The following options are available for all commands โ universal queens, every single one:
-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, because a missing configuration file often indicates an error during the installation of the application. ๐-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
-force-loadโ Load file even if errors are found in data. Bad data is discarded. ๐-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. (she's experimental, be gentle)-backupโ Create a backup of configuration files before saving. By default,oldwill be appended to the backup file. I.e.foo.confwill be backed up asfoo.conf.old. You can specify an alternate suffix. For instance-backup dpkg-old.-saveโ Force a save even if no change was done. Useful to reformat the configuration file.-strictโ When set, cme will exit1if warnings are found during check (of left after fix).-verboseโ Show more information about what's going on. ๐-quietโ Suppress all output except error messages. ๐คซ
๐ฎ Advanced options ๐ฎ
-model-dirโ Specify an alternate directory to find model files. Mostly useful for tests.-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-modeloption). For instance, if you specify~/mytest, the/etc/ssh/sshd_configfiles will be written in~/mytest/etc/ssh/directory.-stack-traceโ Provides a full stack trace when exiting on error. ๐ต๏ธ-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.
๐งฉ Embedding cme ๐งฉ
You can use cme from another program by using -ui simple option. This way you will be able to send command on the standard input of cme and get the results from the standard output. bestie-to-bestie pipeline energy ๐ซถ
๐ Logging ๐
All Config::Model logging is now based on Log::Log4perl. Logging can be configured in the following files:
~/.log4config-model/etc/log4config-model.conf
A sample of a .log4config-model is provided in contrib directory in Config::Model distribution of on github (https://github.com/dod38fr/config-model/blob/master/contrib/log4config-model)
Without these files, the following Log4perl config is used:
log4perl.rootLogger=WARN, Screen
log4perl.logger.Model.Legacy = INFO, SimpleScreen
log4perl.additivity.Model.Legacy = 0
log4perl.appender.Screen = Log::Log4perl::Appender::Screen
log4perl.appender.Screen.stderr = 0
log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern = %M %m (line %L)%n
log4perl.appender.SimpleScreen = Log::Log4perl::Appender::Screen
log4perl.appender.SimpleScreen.stderr = 0
log4perl.appender.SimpleScreen.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.SimpleScreen.layout.ConversionPattern = %p: %m%n
log4perl.oneMessagePerAppender = 1
Log4perl uses the following categories:
AnythingAnything::Changeโ Trace change notification through configuration tree and instance.BackendBackend::Debian::DpkgBackend::Debian::Dpkg::ControlBackend::Debian::Dpkg::CopyrightBackend::FstabBackend::IniFileBackend::PlainFileBackend::ShellVarBackend::YamlFuseUIInstanceLoaderModel::SearcherTree::Element::CheckListTree::Element::IdTree::Element::Id::HashTree::Element::Id::ListTree::Element::ValueTree::Element::Value::DependencyTree::NodeTree::Node::WarpedValueComputerWarperIteratorModel
More categories will come. ๐ฎ (they're cooking, fr fr)
๐ EXIT CODE ๐
cme exits 0 when no errors are found. Exit 1 otherwise.
๐ญ BUGS ๐ญ
Files may be re-ordered
cme imposes a specific ordering of the parameters of a configuration file. This ordering is derived from the documentation of the configuration, like ssh_confg. cme writes back files using this ordering.
Thus, the diff between the original configuration files and the new version of the file may be more important than expected when cme is used the first time. ๐ณ so like, first-time diffs are gonna look WILD, don't panic.
Comments may be dropped
Comments are not supported in some applidations (like the one that use YAML in configuration files). Comments are dropped when using cme to edit or modify such files. For more details, see Available backend page: https://github.com/dod38fr/config-model/wiki/Available-models-and-backends#Available_backend. ๐ซฃ your comments, gone, poof.
Configuration models can lag behind the target application
If a configuration model is not up-to-date, you will get errors complaining about unknown parameters. In such a case, please file a bug on github (https://github.com/dod38fr/cme-perl/issues) or fix the model and send a pull request. You can see this example from OpenSsh (https://github.com/dod38fr/config-model/wiki/New-parameter-for-openssh-example) to learn how to fix a model. ๐ ๏ธ you can be the fix, icon behavior.
๐ FOR MORE INFORMATION ๐
For more information, please check:
- config-model wiki:
http://github.com/dod38fr/config-model/wiki - Blogs about this project:
https://ddumont.wordpress.com/category/perl/configmodel/
๐ซถ CONTRIBUTORS ๐ซถ
In alphabetical order:
- Ross Vandegrift
๐ FEEDBACKS ๐
Feedback from users are highly desired. If you find this module useful, please share your use cases, success stories with the author. (literally please, they want to hear from you ๐ฅน)
๐ SEE ALSO ๐
Config::Model::Model, Config::Model::Instance, Config::Model::Node, Config::Model::HashId, Config::Model::ListId, Config::Model::WarpedNode, Config::Model::Value
โ๏ธ AUTHOR โ๏ธ
Dominique Dumont
โ๏ธ COPYRIGHT AND LICENSE โ๏ธ
This software is Copyright (c) 2014-2022 by Dominique Dumont <ddumont@cpan.org>.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
and that's the whole page bestie!! ๐ this was perl v5.42.0, dated 2026-02-02, page CME(1) โ slay, go check your configs, mwah ๐
๐
๐ฆ where this page comes from
- fedora 43: perl-App-Cme 1.044-1.fc43 ยท LGPL-2.1-or-later
- fedora 44: perl-App-Cme 1.044-1.fc44 ยท LGPL-2.1-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms