---
slug: "fbraza-pi-zenodo"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/fbraza/pi-zenodo@main/README.md"
repo: "https://github.com/fbraza/pi-zenodo"
source_file: "README.md"
branch: "main"
---
# @fbraza/pi-zenodo

A [Pi](https://pi.dev) extension providing [Zenodo](https://zenodo.org) draft
tools for journal article deposits via the Zenodo REST API.

Current scope: create Zenodo drafts, retrieve/list depositions, list licenses,
upload article PDFs/files to draft buckets, update validated journal article
metadata, delete unpublished drafts, and optionally publish after exact
confirmation and preflight validation.

Draft-only does not mean sandbox-only. Sandbox is the default test environment;
production can be selected explicitly, but records remain unpublished drafts.

## Layout

```
pi-zenodo/
├── src/                  # Extension entry point + Zenodo tool modules
│   └── tools/            # One registerXxxTool(pi) per Zenodo action
├── skills/zenodo/        # Bundled skill instructions + references
├── package.json          # pi-package manifest (extensions + skills)
└── tsconfig.json         # Editor / type-check support (runtime uses jiti)
```

## Bundled skill

The `zenodo` skill guides the agent through draft-only journal article deposits:

1. read article PDFs,
2. extract candidate metadata,
3. confirm ambiguous or policy-sensitive fields,
4. create/update/upload to a Zenodo draft,
5. retrieve the draft and stop before publish.

Publishing is a separate opt-in step requiring an exact confirmation phrase such
as `publish sandbox deposition 123` or `publish production deposition 123`.

## Environments

- **Sandbox:** `https://sandbox.zenodo.org/api/` (default during development)
- **Production:** `https://zenodo.org/api/` (opt-in only)

## Install

```bash
pi install npm:@fbraza/pi-zenodo
# or
pi install git:github.com/fbraza/pi-zenodo
```

## Develop

```bash
npm install
npm test
npm run pack:check
```

## Environment variables

| Variable | Purpose |
|---|---|
| `ZENODO_SANDBOX_TOKEN` | Sandbox access token (default environment) |
| `ZENODO_TOKEN` | Production access token |
