canasta skin add
canasta skin add
Add a skin, cloning it from its git repository if needed
Synopsis
Add a MediaWiki skin to the instance and enable it. Each name is matched case-insensitively and handled in this order:
- Already in the instance's skins/ directory: the existing checkout is kept and its branch is verified.
- Bundled with Canasta (shipped in the image): nothing is cloned; the skin is only enabled.
--repositoryand--branchare refused, since the image sets its version, unless--overrideis given. - Otherwise it is cloned into skins/, which requires
--clone(or an explicit--repository). Without it the command fails before changing anything and names the URL it would clone and where that URL came from.
When cloning, the git URL is taken from --repository, else from Wikimedia Gerrit (mediawiki/skins/<Name>), which must be https. When Gerrit does not answer, its GitHub mirror (github.com/wikimedia/mediawiki-skins-<Name>) is used instead. The URL and its source are printed for every clone, flagged when the repository is not hosted on Wikimedia Gerrit. A skin hosted elsewhere, or archived on Gerrit, needs --repository. Pass --branch to pin a specific branch. The branch is chosen automatically as REL1_YY matching the instance's MediaWiki version (e.g. MediaWiki 1.43 -> REL1_43), tried on every remote (GitHub and GitLab mirrors carry the same REL branches); if the REL branch does not exist there, the default branch is used unless --branch is given. Override the detected version with --mw-version.
If the skin ships a composer.json, its non-dev requirements are installed: it is registered in config/composer.local.json (committed in gitops) and composer update --no-dev runs in the web container. A composer.json whose autoload.files names a file the skin does not ship is not registered, and the command fails; so does a composer update after which the autoloader requires a missing file, with the registration rolled back so the wikis keep loading.
With --override, a bundled skin is cloned like any other, at the branch --branch names (or the automatic one), from --repository or the usual lookup, and --clone is not needed. The copy in skins/ overrides the bundled one: the command warns, naming both versions, and restarts the instance so the copy is loaded. canasta skin list marks it, canasta upgrade warns while its version differs from the bundled one, and canasta skin remove deletes the copy, so the bundled skin is used again, still enabled.
On a gitops instance the skin is added as a submodule and committed (run canasta gitops push to distribute it). The skin is then enabled automatically (write settings + run update.php); use --skip-enable to add the code only.
Requires a Compose (including gitops) instance; Kubernetes is not supported.
canasta skin add [flags] NAMES
Examples
canasta skin add Timeless
canasta skin add Mirage --clone
canasta skin add Mirage --clone --mw-version 1.43.2
Arguments
| Argument | Description | Default | Required | Orchestrator |
|---|---|---|---|---|
NAMES |
Comma-separated skin names | ✓ | Both |
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--branch |
Branch to check out (overrides auto branch selection); only with a single name | Both | |||
--clone |
Allow cloning skins that are neither bundled nor already in skins/ | Both | |||
--id |
-i |
Canasta instance ID | * | Both | |
--mw-version |
MediaWiki version (e.g. 1.43.2); overrides auto-detection for REL1_YY branch selection | Both | |||
--override |
Clone a bundled skin into skins/, where the copy overrides the bundled one | Both | |||
--repository |
Git URL to clone (overrides the name lookup); only with a single name | Both | |||
--skip-enable |
Add the code only; do not enable the skin | Both | |||
--skip-update |
Skip running update.php after enabling | Both | |||
--wiki |
-w |
Wiki ID to enable the skin for (passed to enable) | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |