{"id":13554759,"url":"https://github.com/maxlath/wikibase-cli","last_synced_at":"2025-04-08T01:39:10.687Z","repository":{"id":49751632,"uuid":"58735813","full_name":"maxlath/wikibase-cli","owner":"maxlath","description":"read and edit a Wikibase instance from the command line","archived":false,"fork":false,"pushed_at":"2025-02-27T15:21:08.000Z","size":2000,"stargazers_count":231,"open_issues_count":25,"forks_count":27,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-01T00:32:34.030Z","etag":null,"topics":["cli","read","wikibase","wikidata","write"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxlath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"liberapay":"Association_Inventaire"}},"created_at":"2016-05-13T11:56:35.000Z","updated_at":"2025-02-27T15:21:08.000Z","dependencies_parsed_at":"2023-11-24T15:30:58.733Z","dependency_job_id":"80c93d4d-7782-445b-9945-baca0769ff1e","html_url":"https://github.com/maxlath/wikibase-cli","commit_stats":{"total_commits":1241,"total_committers":13,"mean_commits":95.46153846153847,"dds":0.01772763900080576,"last_synced_commit":"e3c2c4795d2e8ef954a1a77ffc42a19ac81585b5"},"previous_names":["maxlath/wikidata-cli"],"tags_count":273,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fwikibase-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fwikibase-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fwikibase-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fwikibase-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxlath","download_url":"https://codeload.github.com/maxlath/wikibase-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247761050,"owners_count":20991532,"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":["cli","read","wikibase","wikidata","write"],"created_at":"2024-08-01T12:02:54.318Z","updated_at":"2025-04-08T01:39:10.668Z","avatar_url":"https://github.com/maxlath.png","language":"JavaScript","readme":"# wikibase-cli\nThe [Command-line interface](https://en.wikipedia.org/wiki/Command-line_interface) interface to [Wikibase](https://wikiba.se) instances.\n\nThis tool is mostly a CLI interface to the JS modules [wikibase-edit](https://www.npmjs.com/package/wikibase-edit) and [wikibase-sdk](https://www.npmjs.com/package/wikibase-sdk), + some treats for the CLI lovers. And a batch mechanism to process millions of edits.\n\nIt was primarily developed to target [Wikidata](https://wikidata.org), but as then been decoupled to support any Wikibase instance.\n\nSupported systems: any system that can run [NodeJS](https://nodejs.org/en/download/) (Linux, Mac OS, Windows, and more)\n\nThis project received [a Wikimedia Project Grant](https://meta.wikimedia.org/wiki/Grants:Project/WikidataJS).\n\n\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://wikiba.se\"\u003e\u003cimg height=\"150\" src=\"https://raw.githubusercontent.com/maxlath/wikibase-sdk/master/assets/wikibase.png\" alt=\"wikibase\"\u003e\u003c/a\u003e\n  \u003c!-- yeay hacky margin \\o/ --\u003e\n  \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"https://wikidata.org\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/maxlath/wikibase-sdk/master/assets/wikidata.jpg\" alt=\"wikidata\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n[![NPM](https://nodei.co/npm/wikibase-cli.png?stars\u0026downloads\u0026downloadRank)](https://npmjs.com/package/wikibase-cli/)\n[![DockerHub Badge](https://dockeri.co/image/maxlath/wikibase-cli)](https://hub.docker.com/r/maxlath/wikibase-cli/)\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Node](https://img.shields.io/badge/node-%3E=%20v18-brightgreen.svg)](http://nodejs.org)\n[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\n[Download stats](https://npm-stat.com/charts.html?package=wikibase-cli)\n\n**Show your support** by adding `{{#babel:Wikibase CLI}}` to [your Wikidata user page](https://www.wikidata.org/w/index.php?title=Special:MyPage\u0026action=edit)\n\n\u003cimg style=\"max-width: 30em;\" src=\"https://raw.githubusercontent.com/maxlath/wikibase-cli/master/assets/userbox_wikibase_cli.jpg\" alt=\"userbox_wikibase_cli\"\u003e\n\n## Summary\n- [Changelog](CHANGELOG.md)\n- [Dependencies](#dependencies)\n  - [General](#general)\n  - [Per feature](#per-feature)\n- [Installation](#installation)\n  - [Via NPM](#via-npm)\n  - [Via Docker](#via-docker)\n- [Commands](#commands)\n  - [Read operations](docs/read_operations.md)\n  - [Write operations](docs/write_operations.md)\n  - [Config](docs/config.md)\n- [Debug](#debug)\n- [See Also](#see-also)\n- [You may also like](#you-may-also-like)\n- [License](#license)\n\n## Changelog\nSee [CHANGELOG.md](CHANGELOG.md) for version info\n\n## Dependencies\n\n### General\n* [NodeJs](https://nodejs.org) **\u003e= v18** (recommended way to install it: use [NVM](https://github.com/creationix/nvm) to install the latest LTS version `nvm install --lts`)\n* [Git](https://git-scm.com/)\n\n### Per feature\n* to use the clipboard option: see [copy-paste](https://github.com/xavi-/node-copy-paste#node-copy-paste) dependencies\n\n## Installation\n### via npm\n```sh\nnpm install -g wikibase-cli\n```\nInstalling globally allows to make the command `wb` (and `wd`, the Wikidata-bound verion of `wb`) accessible from your shell `$PATH`.\n\nIf you later need to update the package to a different version, you can run the same command but specifying the version you want (here `12.2.0`)\n```sh\nnpm install -g wikibase-cli@12.2.0\n```\nor just request the latest version\n```sh\nnpm install -g wikibase-cli@latest\n```\n\n### via docker\n```sh\n# Might require to be run with sudo depending on your Docker installation\ndocker run --rm -t maxlath/wikibase-cli\n# You can make an alias out of it:\nalias wb=\"docker run --rm -it maxlath/wikibase-cli\"\n# You're then ready to use it as in the documentation examples\nwb label Q1\n```\nThat 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:\n```sh\nmkdir -p $HOME/.config/wikibase-cli $HOME/.cache/wikibase-cli\nalias wb='docker run --rm -v \"$HOME/.config/wikibase-cli:/root/.config/wikibase-cli\" -v \"$HOME/.cache/wikibase-cli:/root/.cache/wikibase-cli\" -it maxlath/wikibase-cli'\n```\n\n\u003e NB: Beware that using wikibase-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\n\n## Commands\n\n### Read operations\nSee [Read operations](docs/read_operations.md)\n\n![wd summary Q1](https://cloud.githubusercontent.com/assets/1596934/24504647/5b17135c-1557-11e7-971e-b13648bdc604.gif)\n\n### Write operations\nSee [Write operations](docs/write_operations.md)\n\n### Config\nAllows to persist options\n\nSee [Config](docs/config.md)\n\n## Debug\nTo get debugging informations, set the `DEBUG` environment variable:\n```sh\n# Print all wikibase-cli-specific debugging information\nexport DEBUG=wikibase-cli ; wb\n# Also print wikibase-edit debugging information\nexport DEBUG=wikibase-* ; wb\n# Print only request debugging information\nexport DEBUG=wikibase-cli:request ; wd label Q1\n```\n\n## See Also\n* [wikibase-sdk](https://www.npmjs.com/package/wikibase-sdk): A javascript tool suite to query and work with Wikibase data, heavily used by wikibase-cli\n* [wikibase-edit](https://www.npmjs.com/package/wikibase-edit): Edit Wikibase from NodeJS, used in wikibase-cli for all [write operations](docs/write_operations.md)\n* [wikibase-dump-filter](https://npmjs.com/package/wikibase-dump-filter): Filter and format a newline-delimited JSON stream of Wikibase entities\n* [wikidata-subset-search-engine](https://github.com/inventaire/entities-search-engine/tree/wikidata-subset-search-engine): Tools to setup an ElasticSearch instance fed with subsets of Wikidata\n* [wikidata-taxonomy](https://github.com/nichtich/wikidata-taxonomy): A command-line tool to extract taxonomies from Wikidata\n* [import-wikidata-dump-to-couchdb](https://github.com/maxlath/import-wikidata-dump-to-couchdb): Import a subset or a full Wikidata dump into a CouchDB database\n* [Other Wikidata external tools](https://www.wikidata.org/wiki/Wikidata:Tools/External_tools)\n\n## You may also like\n\n[![inventaire banner](https://inventaire.io/public/images/inventaire-brittanystevens-13947832357-CC-BY-lighter-blue-4-banner-500px.png)](https://inventaire.io)\n\nDo you know [Inventaire](https://inventaire.io/)? It's a web app to share books with your friends, built on top of Wikidata! And its [libre software](http://github.com/inventaire/inventaire) too.\n\n## License\n[MIT](LICENSE.md)\n","funding_links":["https://liberapay.com/Association_Inventaire"],"categories":["JavaScript","cli","Tools"],"sub_categories":["Command-line"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fwikibase-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlath%2Fwikibase-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fwikibase-cli/lists"}