Skip to content

mw wiki ext wikibase item sitelink set

Releasev0.35.0 · cfeceb67

mw wiki ext wikibase item sitelink set ID SITE TITLE [flags]

Set or remove one item sitelink. Set preserves existing badges by default. Repeated –badge explicitly replaces the complete badge set; –clear-badges explicitly removes all badges. Site IDs and allowed badges are finally validated by the selected Wikibase. Every edit uses a current revision snapshot, or requires –baserevid when supplied. Dry-run reads state without fetching a CSRF token or editing.

--badge <stringArray>
Replace all badges with these item IDs (repeatable; default: preserve)
--baserevid <int>
Expected revision for an existing entity (default: read current revision before editing)
--bot
Mark the edit as a bot edit
--clear-badges
Explicitly replace badges with an empty set
--dry-run
Show the proposed edit without fetching a CSRF token or writing
--format <string>
Format the specified output
-o, --output <string>
Output format (jq|json) Default: json.
--raw
Print response bytes unchanged
--summary <string>
Edit summary Default: a Wikimedia CLI: update Wikibase entity.
--anon
Use anonymous access instead of saved credentials
--help
Help for this command
--no-interaction
Do not ask any interactive questions
--password <string>
Wiki login password (or bot password)
--password-file <string>
Read the login password from a file
--profile <string>
Saved profile name or REALM/NAME
--realm <string>
Shared-login realm (wikimedia and wikibase-world are built in)
--username <string>
Wiki login username (use Name@bot for a bot password)
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
--wiki <string>
Wiki URL or API endpoint
Terminal window
mw wiki ext wikibase item sitelink set Q42 enwiki 'Douglas Adams' --dry-run
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.