Skip to content

CLI commands for zotero and pool promote

Goal

(promoted from note)

Context

(see source note)

Prompt

Fix the issue described below (source: /storage2/arash/projects/projio/docs/log/issue/issue-arash-20260404-014926-649273.md). Understand the problem, then implement the proposed fix.


Implement: biblio CLI commands for zotero and pool promote

Add CLI subcommands that expose the Zotero and pool promote MCP functions from the command line.

Tasks

  1. biblio zotero pull CLI command:
    biblio zotero pull [--collection KEY] [--tags TAG,...] [--dry-run]
    
  2. Reads zotero config from biblio.yml
  3. Calls zotero.pull_collection() or zotero.pull_incremental()
  4. Reports pulled items count

  5. biblio zotero push CLI command:

    biblio zotero push [--citekeys CK,...] [--tags] [--notes] [--ids] [--force] [--dry-run]
    

  6. Pushes enrichments back to Zotero
  7. Default: push tags + ids, not notes

  8. biblio zotero status CLI command:

    biblio zotero status
    

  9. Shows last sync time, item counts, library info

  10. biblio pool promote CLI command:

    biblio pool promote CK1 CK2 ... [--target PATH] [--dry-run]
    biblio pool promote --all-local [--target PATH] [--dry-run]
    

  11. Promotes papers from project to pool

  12. Add zotero section to config schema in packages/biblio/src/biblio/config.py:

    zotero:
      api_key_env: ZOTERO_API_KEY
      library_type: user
      library_id: "12345"
      sync_target: pool
    

Key files

  • packages/biblio/src/biblio/cli.py — all CLI commands
  • packages/biblio/src/biblio/config.py — add ZoteroConfig
  • packages/biblio/src/biblio/zotero.py — already implemented
  • packages/biblio/src/biblio/pool.py — promote_to_pool already implemented

Acceptance Criteria

  • [ ]

Result

(pending)

Batch Result

  • status: done
  • batch queue_id: af9c0e1ecc9e
  • session: 0814e95f-6dc9-4ed7-8018-4f5aadc2120e
  • batch duration: 181.8s