Skip to content

cwp fetch

shipped 1.0.0
cwp fetch [env] [flags]

Acts on the environment the project makes obvious: the only one it defines, or the one called dev. Name another to act there. A project with several and no dev has to name one.

site → local

ArgumentWhat it isDefault
[env]environment to fetch from
FlagWhat it doesDefault
--themesthemes onlyoff
--pluginsplugins onlyoff
--yesskip the overwrite confirmationoff
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.

What it does

Brings third-party themes and plugins down from an environment.

.gitignore covers them, because cwp moves code upward only. So a freshly initialised project has a database that references a theme that is not on disk. This command closes that gap. You normally run it once, right after cwp init.

It lists the remote directories and skips everything inside a tracked path. It asks before overwriting local directories that already exist. Then it transfers each remaining directory on its own. Your site plugin is never in the blast radius.

Each directory travels as a tarball: remote tar, then pull the archive, then extract locally. cloudron sync pull in Cloudron CLI 8.2.6 exits 0 having transferred nothing (B-003). Then cwp checks every transfer against the remote file count: it will not report success over an empty directory.

Example

cwp fetch                  # themes and plugins from dev
cwp fetch --themes --yes   # just the themes, no prompt

What it does not do

It writes nothing upward, touches no tracked path, and installs or activates nothing.

It does not decide what should be on the site. That inventory is cwp plugins, and the two answer different questions: fetch copies what is there, plugins records and reproduces what ought to be.