Skip to content

mw wiki auth login

Releasev0.35.0 · cfeceb67

mw wiki auth login [flags]

Save a wiki profile using OAuth or a username and password. When –profile is omitted, the profile name defaults to the verified username.

Wikimedia and wikibase.world have built-in public a-wikimedia-cli clients. OAuth uses authorization code with PKCE and defaults to the callback http://localhost:8765/auth/login. No client secret is required. Use –client-id and –redirect-uri for another registered public client, or –method password for a password login.

Basic access is the default. Interactive login offers a permission picker grouped by function and risk; –scope selects permissions explicitly. The wiki validates which scopes the client can request.

Use –manual when the callback port is occupied. You can also paste the callback URL during normal browser login if the redirect fails.

--all-scopes
Explicitly request every grant in the shared MediaWiki catalogue, including internal/unknown grants (the wiki validates availability)
--client-id <string>
Override the selected realm's built-in OAuth public client ID
--default
Make this profile the default (otherwise ask before switching an existing default)
--insecure-storage
Store credentials in the private plaintext configuration
--manual
Paste the callback URL without starting a local listener (pasting is also available alongside normal browser login)
--method <string>
Authentication method: oauth (public client) or password Default: oauth.
--no-browser
Print the authorization URL without opening a browser
--password-stdin
Read a wiki password from stdin
--provider <string>
Override the credential provider (keyring, windows-credential-manager, keepassxc or plaintext)
--redirect-uri <string>
Exact callback URI registered for this OAuth client Default: http://localhost:8765/auth/login.
--replace
Reauthorize an existing profile using its linked credential entry
--scope <strings>
Explicit OAuth scope names, comma-separated or repeated (basic by default)
--site <strings>
Explicitly allowed wiki API endpoints (repeat or comma-separate; includes --wiki)
--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
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.