App::C...:modify(3pm)
β¨ NAME β¨
App::Cme::Command::modify β bestie, this one modifies the configuration of an application π
and honestly? iconic behaviour.
πΈ VERSION πΈ
version 1.049 π
π¦ SYNOPSIS π¦
# modify configuration with command line
cme modify dpkg source 'format="(3.0) quilt"'
π DESCRIPTION π
So basically, modify takes the values you pass on the command line and writes them into a configuration file. No cap.
Those commands have to follow the syntax defined in Config::Model::Loader β which is similar to the output of cme dump command, so if you already know what dump spits out, you're lowkey already fluent π«Ά
Example:
cme modify dpkg 'control source format="(3.0) quilt"'
cme modify ssh 'Host:"*.debian.org" User=dod'
Ngl, finding the right instructions to perform a modification can be difficult when you're starting from scratch π it's giving "where do I even begin".
So to get started, you can run cme dump --format cml to get the content of your configuration in the syntax that cme modify accepts:
$ cme dump ssh -format cml
Host:"*" -
Host:"alioth.debian.org"
User=dod -
Host:"*.debian.org"
IdentityFile:="~/.ssh/id_debian"
User=dod -
And then you can use that output to create instructions for a modification β¨:
$ cme modify ssh 'Host:"*" User=dod'
Changes applied to ssh configuration:
- Host:"*" User has new value: 'dod'
π Common options π
See "Global Options" in cme.
π options π
-saveβ forces a save even if no change was done by user (though some minor change like migrating deprecated values can still be done bycme, fr). Super useful if you want to minimize changes and reformat the configuration file. Runningcme modify xxx -saveis equivalent to runningcme migrate xxxπ«-verboseβ shows the effect of the modify instructions. Like a little receipts moment π§Ύ-commitβ says the change must be committed with the passed commit message. When you use this option,cmestashes and restores all modifications if it's used on a non-clean workspace π And heads up: this option works only withgit. No git, no commit, periodt.
Example:
cme modify -commit "set Section parameter" dpkg-control 'source Section=perl'
π Examples π
π Set identity file for a domain
$ cme modify ssh 'Host:"*.work.com" IdentityFile:="~/.ssh/id_work"'
This example requires Config::Model::OpenSsh. β¨
π Update Dpkg file
To set Architecture parameter for all binary packages:
$ cme modify dpkg-control 'binary:~".*" Architecture=any'
This achieves the same result but can be slower since all package files are read π’:
$ cme modify dpkg 'control binary:~".*" Architecture=any'
This Debian example requires libconfig-model-dpkg-perl. π
π§ Re-use your one-liners π§
These modification instructions can be re-used once they're stored in a run script (see App::Cme::Command::run for the deets π).
The following one-liner:
$ cme modify dpkg 'control binary:~".*" Architecture=any'
can be stored in ~/.cme/scripts/set-arch-as-any:
app: dpkg-control
load: binary:~".*" Architecture=any
and then run with:
$ cme run set-arch-as-any
Slay. Reusable. Main character energy. π
π SEE ALSO π
cme
π 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 bestie, every flag, every path, every example, all of it π― no skips, no summaries, we ate and left no crumbs π½οΈβ¨
Mwah π this was brought to you by perl v5.40.1, dated 2026-06-29, from the User Contributed Perl Documentation collection β stay gorgeous, stay configured π¦
π¦ 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