Skip to content
read and edit a Wikibase instance from the command line
JavaScript Other
Branch: master
Clone or download
Latest commit 8ff5ccc Nov 28, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.githooks/pre-commit pre-commit script: lint only staged files Oct 1, 2019
assets readme: added link to userbox Nov 4, 2018
bin wb-query: fix property labels selection Nov 20, 2019
docs wb-data/wb-generate-template: add lazy syntax to props selection Nov 20, 2019
scripts docker_publish: fix rm command Oct 1, 2019
test output: simply joining array output instead of escaping Nov 28, 2019
.gitignore changelog: updated Nov 28, 2019 Duh Oct 7, 2019
index.js adding standardjs as linter and running it before any commit Sep 7, 2016
package-lock.json 8.2.0 Nov 28, 2019
package.json 8.2.0 Nov 28, 2019



The Command-line interface interface to Wikibase instances.

It was primarily developed to target Wikidata, but as then be decoupled to support any Wikibase instance.

This project received a Wikimedia Project Grant.

Show your support by adding {{#babel:Wikibase CLI}} to your Wikidata user page userbox

NPM DockerHub Badge

License Node JavaScript Style Guide



See for version info



  • NodeJs >= v6.4.0 (recommended way to install it: use the awesome NVM)
  • Git

Per feature

  • to use the clipboard option: see copy-paste dependencies


via npm

npm install -g wikibase-cli

Installing globally allows to make the command wb (and wd, the Wikidata-bound verion of wb) accessible from your shell $PATH.

via docker

# Might require to be run with sudo depending on your Docker installation
docker run --rm -t maxlath/wikibase-cli
# You can make an alias out of it:
alias wb="docker run --rm -t maxlath/wikibase-cli"
# You're then ready to use it as in the documentation examples
wb label Q1

That would work, but all operations cached data (such as the list of all properties) would need to re-fetch those data for each operations, and all write operations would require you to re-enter your credentials everytime. To work around this, you can allow this container to persist some files on your system, using shared volumes:

mkdir -p $HOME/.local/share/wikibase-cli
alias wb='docker run --rm --volume "$HOME/.local/share/wikibase-cli:/wikibase-cli/local" -t maxlath/wikibase-cli'

NB: Beware that using wikidata-cli through a Docker container has a performance cost of something like 1s per command, so if you need to run many commands (for instance in a script to make mass edit on the desired Wikibase instance), you should probably rather use the NPM package directly


Read operations

See Read operations

wd summary Q1

Write operations

See Write operations


Allows to persist options

See Config

See Also

You may also like

inventaire banner

Do you know Inventaire? It's a web app to share books with your friends, built on top of Wikidata! And its libre software too.



You can’t perform that action at this time.