{"id":18123423,"url":"https://github.com/samwilson/mwcli","last_synced_at":"2025-03-30T09:32:48.485Z","repository":{"id":48295159,"uuid":"192017138","full_name":"samwilson/mwcli","owner":"samwilson","description":"A command line client for MediaWiki wikis.","archived":true,"fork":false,"pushed_at":"2025-01-28T03:08:31.000Z","size":184,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-23T01:36:31.309Z","etag":null,"topics":["backup","cli","client","export","hacktoberfest","mediawiki"],"latest_commit_sha":null,"homepage":"https://mwcli.toolforge.org/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samwilson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-14T23:46:01.000Z","updated_at":"2025-02-01T22:51:20.000Z","dependencies_parsed_at":"2023-12-06T05:43:51.079Z","dependency_job_id":null,"html_url":"https://github.com/samwilson/mwcli","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.29268292682926833","last_synced_commit":"454b91f397f1c85bfb58657a06389602ec671381"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwilson%2Fmwcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwilson%2Fmwcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwilson%2Fmwcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwilson%2Fmwcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samwilson","download_url":"https://codeload.github.com/samwilson/mwcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","cli","client","export","hacktoberfest","mediawiki"],"created_at":"2024-11-01T07:09:42.864Z","updated_at":"2025-03-30T09:32:48.480Z","avatar_url":"https://github.com/samwilson.png","language":"PHP","readme":"\u003e :warning: **This project has moved** to Wikimedia's GitLab, it can be found at https://gitlab.wikimedia.org/toolforge-repos/mwcli\n\nMediaWiki CLI\n=============\n\nA command line client for [MediaWiki](https://www.mediawiki.org/) wikis.\n\n[![CI](https://github.com/samwilson/mwcli/actions/workflows/ci.yml/badge.svg)](https://github.com/samwilson/mwcli/actions/workflows/ci.yml)\n\n## About\n\nMediaWiki CLI (or `mwcli` for short) is a multilingual cross-platform PHP command-line tool\nfor interacting with MediaWiki installations,\nto carry out tasks such as uploading and downloading files, and exporting pages.\n\nIt is designed to operate on multiple wikis\nand the configuration for these is stored in the `config.yml` file.\nThe wikis are usually remote from the computer on which wmcli is run,\nbut can also be local (i.e. it can be used on a server to perform some tasks).\nThe config file can be edited directly,\nor via commands such as `sites:add` and `sites:modify`.\n\n## Installation\n\n1. Clone the repository:\n   ```console\n   git clone https://github.com/samwilson/mwcli\n   ```\n\n2. Install dependencies:\n   ```console\n   cd mwcli\n   composer install --no-dev\n   ```\n\n3. Optionally add `mwcli` to your $PATH. For example, on Linux:\n   ```console\n   echo 'export PATH=$PATH:'$(pwd)/bin \u003e\u003e ~/.profile\n   ```\n\n## Upgrading\n\n1. Update the code:\n   ```console\n   cd mwcli\n   git pull origin main\n   ```\n\n2. Update dependencies:\n   ```console\n   composer install --no-dev\n   ```\n\n## Usage\n\n### sites:add\n\nAdd a new site to the config file.\n\n    sites:add [-c|--config [CONFIG]] [--url URL]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--url` — The URL of the wiki. Can be to any page or even api.php.\n  *Required.*\n\n### sites:info\n\nGet general information about a wiki.\n\n    sites:info [-c|--config [CONFIG]] [-w|--wiki WIKI]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n\n### sites:list\n\nList all configured sites.\n\n    sites:list [-c|--config [CONFIG]]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n\n### sites:remove\n\nRemove a site from the config file.\n\n    sites:remove [-c|--config [CONFIG]] [-w|--wiki WIKI]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n\n### export:category\n\nExport pages and files in a category (and its subcategories).\n\n    export:category [-c|--config [CONFIG]] [-w|--wiki WIKI] [-a|--category CATEGORY] [-d|--dest DEST]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--category` `-a` — Name of the category to export (with or without the leading 'Category:', and in any language).\n  *Required.*\n* `--dest` `-d` — The destination directory for exported files.\n  Default: '[CWD]/categories'\n\n### export:contribs\n\nExport a user's contributions.\n\n    export:contribs [-c|--config [CONFIG]] [-w|--wiki WIKI] [-u|--user USER] [-d|--dest DEST] [-o|--only-author]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--user` `-u` — Export contributions of this username.\n  *Required.*\n* `--dest` `-d` — The destination directory for exported files.\n  Default: '[CWD]/contribs'\n* `--only-author` `-o` — Export only where the given user is the original author of a page.\n\n### export:wikitext\n\nExport a wiki's pages as text files.\n\n    export:wikitext [-c|--config [CONFIG]] [-w|--wiki WIKI] [-d|--dest DEST] [-e|--ext EXT]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--dest` `-d` — The destination directory for exported files.\n  Default: '[CWD]/wikitext'\n* `--ext` `-e` — File extension to use for the exported files.\n  Default: 'txt'\n\n### extension:install\n\nInstall an extension into a local wiki. Requires 'install_path' to be set in a site's config.\n\n    extension:install [-c|--config [CONFIG]] [-w|--wiki WIKI] [-g|--git] [-u|--gituser GITUSER] [--] \u003cextension-name\u003e\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--git` `-g` — Use Git to install the extension, instead of the default tarball method.\n* `--gituser` `-u` — The username to use for Git. Implies \u003cinfo\u003e--git\u003c/info\u003e\n  *Required.*\n* `\u003cextension-name\u003e` The extension's name (CamelCase, with underscores for spaces).\n\n### extension:outdated\n\nShows a list of installed extensions that have updates available, including their latest version.\n\n    extension:outdated [-c|--config [CONFIG]] [-w|--wiki WIKI]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n\n### upload:files\n\nUpload local files to a wiki.\n\n    upload:files [-c|--config [CONFIG]] [-w|--wiki WIKI] [-m|--comment COMMENT] [--] [\u003cfiles\u003e...]\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--comment` `-m` — Revision comment.\n  *Required.*\n* `\u003cfiles\u003e` Filenames of files to upload.\n\n### upload:pages\n\nUpload local text files as wiki pages.\n\n    upload:pages [-c|--config [CONFIG]] [-w|--wiki WIKI] [-m|--comment [COMMENT]] [-t|--watch] [--] \u003cpages-dir\u003e\n\n* `--config` `-c` — Path of the Yaml config file to use.\n  Default: '[CONFIG]/mwcli/config.yml'\n* `--wiki` `-w` — The mwcli name of the wiki to use. Use \u003cinfo\u003esites:list\u003c/info\u003e to list all.\n  *Required.*\n* `--comment` `-m` — Revision comment.\n* `--watch` `-t` — Keep watching the files and upload on any change.\n* `\u003cpages-dir\u003e` Directory from which to import wiki pages.\n\n## License: MIT\n\nCopyright 2019 Sam Wilson.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software\nand associated documentation files (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\nBUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamwilson%2Fmwcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamwilson%2Fmwcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamwilson%2Fmwcli/lists"}