canasta extension add
canasta extension add
Add a non-bundled extension from its git repository
Synopsis
Add a MediaWiki extension that is not bundled with Canasta by cloning its git repository into the instance's extensions/ directory.
The extension's git URL is resolved from ExtensionJson.json (the extjsonuploader Toolforge dataset); pass --repository to override the lookup, or --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 extension 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.
On a gitops instance the extension is added as a submodule and committed (run canasta gitops push to distribute it). The extension 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 extension add [flags] NAMES
Examples
canasta extension add OAuth
canasta extension add OAuth --mw-version 1.43.2
canasta extension add MyExtension --repository https://example.org/MyExtension.git --branch main
Arguments
| Argument | Description | Default | Required | Orchestrator |
|---|---|---|---|---|
NAMES |
Comma-separated extension names | ✓ | Both |
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--branch |
Branch to check out (overrides auto branch selection); only with a single name | 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 | |||
--repository |
Git URL to clone (overrides ExtensionJson.json lookup); only with a single name | Both | |||
--skip-enable |
Add the code only; do not enable the extension | Both | |||
--skip-update |
Skip running update.php after enabling | Both | |||
--wiki |
-w |
Wiki ID to enable the extension 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 |