An unofficial command-line tool to upload, list, and delete references in Paperpile.
Paperpile has no public API. This tool works by reverse-engineering the web app's internal endpoints.
Requires Go 1.26+.
go install github.com/garaemon/paperpile@latestOr build from source:
git clone https://github.com/garaemon/paperpile.git
cd paperpile
make buildThe binary is named paperpile.
Paperpile uses session cookies for authentication. This CLI obtains the session via a bookmarklet flow.
paperpile login- The CLI starts a local HTTP server and opens a setup page in your browser.
- Drag the "Paperpile: Send to CLI" bookmarklet to your bookmarks bar (one-time setup).
- Navigate to app.paperpile.com and log in.
- Click the bookmarklet. It extracts the session cookie and sends it to the CLI.
- The CLI verifies the session and saves it to
~/.config/paperpile/config.yaml.
When the session expires, run paperpile login again and click the bookmarklet.
| Flag | Default | Description |
|---|---|---|
--port |
18080 |
Local server port for receiving session |
paperpile meOutput:
Name: John Doe
Email: john@example.com
ID: 68CE82F6807411EA9B68A87FDE8EC746
paperpile upload paper.pdfPaperpile automatically extracts metadata (title, authors, journal, etc.) from the uploaded PDF.
| Flag | Description |
|---|---|
--allow-duplicates |
Import even if a duplicate already exists |
paperpile listOutput is a tab-separated table with columns: ID, Year, First Author, Title.
| Flag | Description |
|---|---|
--trashed |
Include trashed items in the output |
paperpile delete <item_id>The item_id can be found via paperpile list.
paperpile attach <item_id> paper.pdfAttaches a PDF file to a library item that does not yet have a PDF, or adds an additional file to an existing item.
paperpile note get <item_id>Prints the note text attached to the item. If no note exists, prints (no note).
paperpile note set <item_id> <text>...Sets or replaces the note on a library item. Multiple arguments are joined with spaces.
paperpile label listLists all labels in your Paperpile library with their IDs, names, and item counts.
paperpile label get <item_id>Prints the label names assigned to the item. If no labels are assigned, prints (no labels).
paperpile label create <label_name>Creates a new label in your Paperpile library.
paperpile label unassign <item_id> <label_name>Removes a label from a library item.
paperpile label assign <item_id> <label_name>Assigns an existing label to a library item.
paperpile label delete <label_name>Deletes a label from your Paperpile library.
Session credentials are stored in ~/.config/paperpile/config.yaml.
MIT