Skip to content

TomBener/craftero

Repository files navigation

Craftero

Craftero command icon

Overview

Craftero bridges your research workflow between Zotero and Craft. It enables fast, fuzzy searching of your Zotero library directly from Raycast and syncs items into structured Craft collections with AI-powered summaries.

graph LR
    Z[(Zotero Local DB)] -- "Fuzzy Search" --> R(Craftero)
    R -- "Sync metadata via Craft API" --> C["Craft Collection"]
    R -- "Provide Item Key" --> AI["Raycast AI Command + Zotero MCP & Craft MCP"]
    AI -- "Get Fulltext & Summarize" --> C
Loading

Demo

craftero-usage-demo.mp4

Features

  • Local-first Zotero database access
  • Fast fuzzy search across titles, authors, tags, DOI, abstracts, and citation keys
  • Collection dropdown to filter search results by specific Zotero collections
  • Smart sync with automatic deduplication by Zotero URI
  • Batch sync all visible search results to Craft at once
  • Multiple sync workflows: Sync, Sync & Open in Craft, Sync & AI Summarize
  • Optional sync of Zotero notes and PDF annotations
  • Daily note linking in Craft for reading dates
  • Item management actions: copy item keys, delete from Craft, open URL/DOI, open in Zotero
  • AI integration via Raycast AI Commands with MCP server support for automated paper summaries

Installation

Prerequisites

Step 1: Duplicate Craft Template

Duplicate the Craftero template to your Craft Space. This template includes a collection with the following fields for syncing Zotero items:

Craft Field Name Type Zotero Metadata
Title Title (Primary) Paper Title
Citation Key Text Zotero Item Key (Generated by Better BibTeX)
Author(s) Text Creator list (First Last)
Publication Year Text Publication Year
Journal/Publisher Text Journal name or Publisher
Abstract Text Item Abstract
Tags Multiple Select Zotero Tags
Zotero URI URL zotero://select/library/items/<Item Key>
Status Single Select Defaulted to "To Read"
Date Added Date Zotero Date Added
Reading Date Link to Block Link current collection item as backlink of daily note
View the Collection fields screenshot in Craft

Mapping Collection Fields

Step 2: Install Craftero

Craftero has been submitted to the Raycast Store and is pending review. Currently, you can install it locally:

git clone https://github.com/TomBener/craftero
cd craftero
npm install
npm run dev

The extension will appear in Raycast immediately. You can stop the process (⌃ + C) after installation, Craftero will remain available in Raycast.

Step 3: Configure Craftero

Open Raycast, search for Craftero, and configure the following settings:

Setting Description Note
Zotero Path Path to your Zotero database file Default: ~/Zotero/zotero.sqlite
Cache Period (in minutes) Duration to cache search results locally Default: 10
Craft API Base URL Craft API endpoint (e.g. https://connect.craft.do/links/XXXXX/api/v1) Required
Craft API Key Craft API authentication token Not required if API URL is public
Craft Space ID Unique identifier for your Craft space Required
Craft Collection ID Target collection for synced items Required
Max Items Maximum number of search results to display Default: 10
Sync Notes Include Zotero notes and PDF annotations Default: true

Craftero Settings

Should I use the All Documents or Selected Documents API?

To sync "Reading Date" as a daily note backlink (shown below), you must use the All Documents API. This links your reading activity to daily notes automatically. If you don't need this feature, use the Selected Documents API instead.

Link to Daily Note

How to get the Space ID?
  1. Open any document in Craft
  2. Copy the deeplink with ⌘ + ⌥ + L
  3. You'll get a URL like: craftdocs://open?blockId=5E8FD524-1E73-461A-895A-FDF6E18E8507&spaceId=123e4567-e89b-12d3-a456-426614174035
  4. Extract the value after spaceId=
How to get the Collection ID?
  1. Duplicate the Craftero template to your Craft space
  2. Right-click on the collection to open the context menu
  3. Select Copy As → Deeplink
  4. You'll get a URL like: craftdocs://open?blockId=7f2a4c91-5e3b-4d6a-b9e2-1c8d3f5a7b2e&spaceId=a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6
  5. Extract the value after blockId=

Copy Collection ID

Step 4: Enable AI Summarization with MCP

To enable the AI summarization feature, install two MCP servers in Raycast:

Zotero MCP Craft MCP
Zotero MCP Craft MCP

Create an AI Command in Raycast named AI Summary with MCP to Craft.

View AI Command screenshot

AI Command MCP Summary

Note

The AI Command name must exactly match the name above for Craftero to invoke it correctly. You can import this AI Command JSON directly into Raycast.

View the AI Command prompt
@zotero @craft {argument name="PaperInfo"}

Please help me summarize this paper and write the summary to Craft.

**Task Steps:**
1. Parse the data above to extract:
   - Zotero Item Key
   - Zotero URI

2. Use @zotero tool `zotero-zotero_get_item_fulltext` to fetch the full text
   - If unavailable, use `zotero-zotero_get_item_metadata` with `include_abstract: true`

3. Read the paper and write a comprehensive summary in the same language as the paper:
   - **Background & Research Question**: What problem does this paper address?
   - **Data & Methods**: What data and methods are used? Key contributions and innovation?
   - **Results & Conclusions**: Main findings? Practical implications?

4. Write the summary to Craft:
   - **Skip verification step** - directly write to the collection item
   - Use `craft-collections_list` (no arguments) to list collections
   - Pick the collection whose schema includes property key `zotero_uri`
   - Call `craft-collectionItems_get` with:
     - collectionBlockId: <Picked Collection ID>
     - maxDepth: 0
   - Find the collection item whose properties.zotero_uri equals <Zotero URI>
   - Use that item's id as the pageId
   - Call `craft-markdown_add` with:
     - position: { position: "end", pageId: <Matched Item ID> }
     - markdown: `## AI Summary\n\n<summary text>`

**Important:**
- Do NOT include paper metadata (title, authors, year, journal) in summary
- Do NOT use craft-blocks_get for verification - it may fail for collection items
- If collection lookup or craft-markdown_add fails, reply "Not added"

**Reply:** "Added" if successful, "Not added" if failed. No details needed.

Usage

  1. Open Raycast and search for Craftero
  2. Type your search query (title, author, tag, etc.)
  3. You can filter by Zotero collection using the dropdown at the top-right
  4. Select an item and choose an action:
Action Shortcut Description Note
Sync Item to Craft Enter Sync selected item
Sync & Open in Craft ⌘ + ↩ Sync and open in Craft
Sync & AI Summarize ⌘ + S Sync item and invoke AI Command to summarize full text
Open Existing in Craft ⌘ + ⇧ + O Open synced item in Craft Only visible if item exists in Craft
Copy Item Key ⌘ + ⇧ + I Copy Zotero item key to clipboard
Delete from Craft ⌘ + ⇧ + D Remove item from Craft Only visible if item exists in Craft
Sync All Results ⌘ + ⇧ + A Sync all visible results 10 items by default
Open in Zotero ⌘ + ⇧ + Z Open item in Zotero
Open URL ⌘ + ⇧ + U Open item's URL or DOI in browser

Troubleshooting

Database locked

Quit Zotero and try again. Zotero locks the database while it's running to prevent concurrent access.

Daily note not found

The daily note for today doesn't exist yet. Create it in Craft or the field will be skipped.

Field not mapping

Check that your Craft collection has a field with a matching name. Field names are case-insensitive.

Note

The Citation Key field is extracted from Zotero's Extra field generated by Better BibTeX and will be empty if not present in your Zotero item.

No results found

  • Verify that the Zotero database path is correct in settings
  • Try a simpler or more specific search query
  • Adjust the cache period in settings or restart Raycast

License

MIT License - see LICENSE for details

About

Sync Zotero items to Craft with AI-powered summaries

Topics

Resources

License

Stars

Watchers

Forks