CME(1p)
πΈ CME(1p) πΈ
β¨ NAME β¨
okay so bestie, meet cme β it Checks or edits configuration data with Config::Model. that's the whole vibe. π
π VERSION π
version 1.049 β yeah she's on 1.049, no cap.
π¦ 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 one-liners. she's versatile, she's booked, she's thriving. β¨
π DESCRIPTION π
so depending on which command you pick (more on those below), the cme program uses Config::Model configuration descriptions to check, modify, or fix configuration files. that's the job. that's what she does. π«Ά
the 3rd parameter is the application you wanna work on. most of the time, cme will just find the relevant configuration file(s) for you. that's the easy girlie case. for example:
sudo cme check popcon
but some applications β like the late multistrap β have no constraint on the configuration file name, so you have to hand the file name over yourself:
cme check multistrap raspbian.conf
or, same energy, different outfit:
cme check multistrap -file raspbian.conf
ποΈ Configuration file specification ποΈ
an application's configuration can show up in a few different forms, bestie. either:
- several files (like debian packages),
- a single file with a predefined file (popcon), or
- a single file with an arbitrary file name (like the late multistrap).
when a file name is needed, you pass it 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 is the main-character lineup of commands that ship with cme. other Config::Model extensions can bring even more commands. run cme help to get the list of available commands on your system. π
π list
show a list all applications where a model is available. this list depends on which Config::Model modules you have installed.
βοΈ 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 the 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. π¦
π Global options π
these ones work for all commands, so they're basically universal, periodt:
-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. π-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,cmewill 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 π₯
for when you're feeling spicy:
-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 the -ui simple option. this way you'll be able to send command on the standard input of cme and get the results from the standard output. it's giving pipe 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. π±
π¦ EXIT CODE π¦
cme exits 0 when no errors are found. exit 1 otherwise. simple as that, bestie. βοΈ
π BUGS π
not bugs like glitches, bugs like the known quirks. read carefully, she's warning you.
π 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.
so 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. π
π Comments may be dropped
comments are not supported in some applications (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 https://github.com/dod38fr/config-model/wiki/Available-models-and-backends#Available-backend page.
π’ Configuration models can lag behind the target application
if a configuration model is not up-to-date, you'll 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. π«Ά
π FOR MORE INFORMATION π
for more info, 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. she wants the lore, bestie. π
π 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
okay that's the whole page, you made it to the end π this was perl v5.40.1, dated 2026-06-29, and it's the CME(1p) manual β go forth and config, bestie, you've got this πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: cme 1.049-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms