Agent-friendly Zenodo CLI for records, files, search, and InvenioRDM API access.
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.
- Single binary: no runtime, containers, or Python environment required
- JSON-first:
--jsonon every command with a consistent envelope - Safety gates:
--read-only,--dry-run, and--confirmfor remote mutations - Agent-ready: predictable exit codes, error categories, request IDs, and secret redaction
- Sandbox support: test against
sandbox.zenodo.orgwith--sandboxorZENODO_SANDBOX=1
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 |
Run the following on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/thedavidweng/zenodo-cli/main/install.sh | shRun 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 zenodoGo:
go install github.com/thedavidweng/zenodo-cli/cmd/zenodo@latestManual 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 buildzenodo auth login --token YOUR_TOKEN
zenodo doctorGet 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# 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
- Command Reference — all commands with flags, examples, and configuration
- Authentication — token setup, profiles, sandbox mode
- Safety Model —
--read-only,--dry-run,--confirmgates - JSON Contract — envelope schema, output modifiers
- Global Flags & Environment Variables — all CLI flags and env vars
- Architecture — codebase structure and design decisions
- Agent Guide — scripting, JSON mode, exit codes
- CI/CD: cli-workflow-template — reusable GitHub Actions workflows
- Docs: site — landing page and documentation