Skip to content

thedavidweng/zenodo-cli

Repository files navigation

zenodo-cli

zenodo-cli

Agent-friendly Zenodo CLI for records, files, search, and InvenioRDM API access.

CI Release License Go Go Report

zenodo-cli is a single-binary CLI for creating Zenodo records, uploading files, publishing drafts, searching public records, and calling the current InvenioRDM API directly.

Highlights

  • Single binary: no runtime, containers, or Python environment required
  • JSON-first: --json on every command with a consistent envelope
  • Safety gates: --read-only, --dry-run, and --confirm for remote mutations
  • Agent-ready: predictable exit codes, error categories, request IDs, and secret redaction
  • Sandbox support: test against sandbox.zenodo.org with --sandbox or ZENODO_SANDBOX=1

Why

Zenodo moved from the legacy deposit API to InvenioRDM in 2023. Tools built around /api/deposit/depositions can still install cleanly while failing on uploads and record management. zenodo-cli is built directly on the current /api/records API surface.

Used in production: 全国村界数据集 / China Village Boundaries Dataset was uploaded and published with zenodo-cli: 875,140 records across 58 Shapefile datasets.

Comparison with older Zenodo tools
Tool Language API Version Upload Works CLI Status
zenodo-cli Go InvenioRDM Yes Yes Active
zenodo-client Python Mixed old/new No Yes Upload broken
zenodo Node.js InvenioRDM Yes No Library only
zenodraft Node.js Old deposit API No Yes Deprecated API
zotzen-lib Node.js Old deposit API No Yes Unmaintained
zenodo-cli Node.js Old deposit API No Yes Deprecated

Quickstart

Install

Run the following on macOS or Linux:

curl -fsSL https://raw.githubusercontent.com/thedavidweng/zenodo-cli/main/install.sh | sh

Run the following on Windows:

powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/thedavidweng/zenodo-cli/main/install.ps1 | iex"

The installer detects Homebrew automatically and uses it when available (recommended for easy upgrades). Otherwise it downloads the binary to ~/.local/bin.

Other installation methods

Homebrew Cask (macOS/Linux):

brew tap thedavidweng/tap
brew install --cask zenodo

Go:

go install github.com/thedavidweng/zenodo-cli/cmd/zenodo@latest

Manual download: grab the archive for your platform from the latest GitHub Release, extract it, and place the zenodo binary on your PATH.

Build from source:

git clone https://github.com/thedavidweng/zenodo-cli.git
cd zenodo-cli
make build

Set up

zenodo auth login --token YOUR_TOKEN
zenodo doctor

Get a token at https://zenodo.org/account/settings/applications/tokens/

Then try it:

zenodo records create --title "My Dataset" --description "A research dataset"
zenodo files upload RECORD_ID ./data.csv
zenodo records publish RECORD_ID --confirm

Uninstall

# Homebrew Cask
brew uninstall --cask zenodo

# install.sh
curl -fsSL https://raw.githubusercontent.com/thedavidweng/zenodo-cli/main/install.sh | sh -s uninstall

# Go
rm "$(go env GOPATH)/bin/zenodo"

Remove config if desired: rm -rf ~/.config/zenodo-cli

Documentation

Infrastructure

License

Apache License 2.0

About

Agent-friendly Zenodo CLI — single-binary tool for record management, file upload, and full InvenioRDM API access

Topics

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages