Command-line reference
This page lists every pangur command with its arguments and options, says which project each one works in, and marks the commands that edit, delete or use Pangur's model.
This page lists every command of the pangur command-line tool (version 0.3.3), grouped by what it works on. Installing the tool and signing in are covered in The command line. The tool's old name, zcp, still runs it, and some of its own messages still print zcp …, so either name works.
Run pangur --help, or pangur <command> --help, for the tool's own summary of a command. Running pangur with no command prints the help.
Conventions on this page
- KEY is an item's eight-character key, as
pangur searchprints it. ATTACHMENT is the key of a file attached to an item, aspangur getlists it. --jsonprints the server's JSON response, indented, in place of the usual table or text.--connection IDworks in the named project, by its id or its address (see Project selection). A command without this option always works in your default project.--yes(or-y) answers yes to the command's confirmation question.- Errors print to standard error as the HTTP status and the server's message, and the command exits with status 1.
Account
| Command | What it does | Options |
|---|---|---|
pangur login | Signs in with a device code: prints an address and a code to confirm on any device. | --browser signs in through a browser on this machine instead. |
pangur logout | Ends the session on Pangur's sign-in service and deletes the saved sign-in file. | — |
pangur whoami | Prints the signed-in account and its projects, with the default project marked and each project's scope (whole library or one collection). | — |
pangur projects | Lists the projects you can open, your own and your organisations', with each one's address, organisation and your role. | --json |
Reading your library
| Command | What it does | Options |
|---|---|---|
pangur overview | Prints counts, item types and recent additions for the library. | --json |
pangur search QUERY | Searches the library's titles and other details (not the text inside files). Every word must match. | --limit/-n (25), --type (an item type), --tag, --collection/-c KEY, --sort (title, creator, itemType, date, dateAdded, dateModified), --direction (asc or desc), --json |
pangur get KEY | Prints an item's full details, where its text comes from, its attachments and its notes. | --json |
pangur read KEY | Prints the readable text of an attachment. KEY can be an attachment key or an item key; for an item, its first readable attachment is used. | --offset (0), --max-chars, --all (page through the whole text), --json |
pangur cite KEY… | Prints a formatted bibliography for one or more items. | --style/-s (apa; any CSL style, such as chicago-author-date, mla, vancouver or ieee), --json (prints CSL-JSON) |
pangur collections | Prints the collection tree with item counts and keys. | --json |
pangur tags [QUERY] | Lists the library's tags, optionally only those containing QUERY. | --limit/-n (50), --json |
pangur marks ATTACHMENT | Prints your highlights on a file and the passages assistants marked on it. | --page-height (842, in points), --connection, --json |
Changing your library
These commands change the library. edit and delete are available here and in the web app, but not to assistants.
| Command | What it does | Options |
|---|---|---|
pangur edit KEY | Changes an item's fields. | --field/-f field=value (required; repeat for several fields) |
pangur delete KEY | Moves an item, with its notes and attachments, to the project's trash, after asking you to confirm. | --yes |
pangur trash list | Lists what is in the trash, newest first, with the date each thing was deleted. | |
pangur trash restore KEY | Takes something out of the trash. | |
pangur trash forget KEY | Deletes one thing in the trash for good, after asking you to confirm. | --yes |
pangur trash empty | Deletes everything in the trash for good, after asking you to confirm. | --yes |
pangur note KEY TEXT | Adds a note to an item. Line breaks become paragraphs. | — |
pangur upload FILE --item KEY | Attaches a file to an item, for example a PDF you downloaded through your library. | --item/-i KEY (required) |
pangur annotate ATTACHMENT --quote TEXT | Highlights a passage in a PDF by quoting it; Pangur finds the words on the page. | --quote/-q (required, the exact words), --comment/-c, --page (if the words recur), --colour (#ffd400), --connection |
pangur institution | Shows or sets your institutional access for the PDF finder. With no options it shows the current values. | --ezproxy URL, --openurl URL, --name TEXT |
Institutional access belongs to your account and applies in every project; see Where PDFs come from.
Adding works
pangur import
| Command | What it does | Options |
|---|---|---|
pangur import search QUERY | Searches OpenAlex and the book catalogues for works to add, and says which are already in your library. Each row ends with the add command for it. | --limit/-n (10), --provider NAME (one source alone; estc searches the English Short Title Catalogue, which the default search leaves out), --json |
pangur import lookup IDENTIFIER | Resolves a DOI or ISBN (also a PMID, arXiv id or ESTC number) to its catalogue record. | --json |
pangur import add IDENTIFIER | Adds a work by DOI, ISBN or a candidate token from import search, and tries to attach its PDF. Asks before saving a duplicate. | --collection/-c KEY (only in a project that is not scoped to a collection), --no-pdf, --connection |
pangur import refs FILE | Imports a reference file (BibTeX, BibLaTeX, RIS, CSL-JSON, PubMed, EndNote or Zotero RDF). Entries already in the library are skipped; notes come along; a BibTeX key is kept as Citation Key: in the Extra field. | --collection/-c KEY or --new-collection (named after the file), --pdfs/--no-pdfs (on by default for 100 references or fewer), --attach-files (upload files the entries name, found beside the reference file), --dry-run, --yes, --connection |
pangur import file PATH | Creates a reference from one file (PDF, Markdown or text) and attaches the file. Shows what it found and asks first. | --collection/-c, --yes, --connection, --json |
pangur add IDENTIFIER is a shorter name for pangur import add, with the same options. pangur import lookup can also be run as pangur lookup.
The web app imports the same reading lists and reference files.
pangur ingest
pangur ingest brings in files you already have. Pangur reads the first pages of each file for a DOI, ISBN or arXiv id, checks the library, and either creates a reference with the file attached, attaches the file to the existing item, or stores the file on its own until you say what it is.
| Command | What it does | Options |
|---|---|---|
pangur ingest files PATH… | Ingests files and folders. Folders are searched for .pdf, .md, .markdown, .txt, .html and .htm files. A file ingested before is recognised by its contents and not sent again. | --collection/-c, --connection, --json |
pangur ingest status [GROUP] | Shows the outcome of each file in one run, or in the most recent run. | --connection, --json |
pangur ingest resolve INGEST_ID | Gives a stored file its reference and moves the file under it. | exactly one of --doi, --isbn, --item KEY or --candidate TOKEN; --allow-duplicate, --connection, --json |
The table that ingest files prints gives each file's outcome: matched, duplicate, needs_reference or failed. The command exits with status 1 if any file failed.
pangur refs
pangur refs finds the works a document cites and imports them. Each reference it finds has one of four statuses: in_library, importable, primary_source (an archival manuscript, which cannot be imported) or unresolved.
| Command | What it does | Options |
|---|---|---|
pangur refs KEY | Lists the works a stored document cites. KEY is an item key or an attachment key. pangur refs show KEY is the same command. | --rescan (ignore the saved scan), --json |
pangur refs scan SOURCE | Scans a document that is not in your library: a file, a URL, or - for standard input. Nothing is added. | --rescan, --json |
pangur refs import KEY | Imports a stored document's references as one background batch. | --all or --pick 1,4,7-9 (one is required), --collection/-c, --no-pdfs, --dry-run, --yes, --wait (wait until the batch finishes), --connection |
pangur refs status [BATCH] | Shows recent bulk imports, or one batch with its entries. | --json |
pangur refs resume BATCH | Queues again the entries of a bulk import that failed or were deferred. | — |
pangur refs find-pdfs BATCH | Looks for PDFs for the references a finished bulk import saved without looking. | — |
Background work
| Command | What it does | Options |
|---|---|---|
pangur tasks | Lists background work you started that is waiting, running or needs you: PDF searches, imports, exports and write-ups. | --all/-a (finished tasks too), --json |
pangur jobs | Lists recent imports and their PDF status, across all your projects. | --limit/-n (20; at most 100), --json |
The same work appears on the Activity page in the web app.
Ask and conversations
| Command | What it does | Options |
|---|---|---|
pangur ask QUESTION | Asks your library a question, as Ask on the web does, and streams the answer with its numbered sources and a conversation ID. Uses Pangur's model and your plan's Ask allowance. | --thread/-t ID (continue a conversation), --materials (passages only: no answer is written, no model runs and no allowance is used), --connection, --json |
pangur threads list | Lists your conversations, newest first. | --connection, --json |
pangur threads show ID | Prints every question and answer in a conversation. Each answer says which model wrote it, or which assistant recorded it. | --connection, --json |
pangur threads delete ID | Deletes a conversation after asking. Nothing in your library depends on it. | --yes, --connection |
Documents
| Command | What it does | Options |
|---|---|---|
pangur docs list | Lists your documents, newest first. | --q TEXT (words that must all be in the title), --item KEY (documents that draw on an item), --kind, --limit (25), --connection, --json |
pangur docs show ID | Prints a document's Markdown. | --version N, --connection, --json |
pangur docs new TITLE | Creates a document from a Markdown file or standard input. | --from FILE (or - for standard input; without it the body is just the title as a heading), --kind (note by default; also summary, literature_review, outline or answer), --source-item KEY (repeat for several), --connection, --json |
pangur docs append ID | Saves a new version of a document with the full text you give. The text replaces the current version; earlier versions are kept. | --from FILE or - (standard input, the default), --connection, --json |
pangur docs export ID | Writes a document to a Word or Markdown file. | --out/-o PATH, --format (docx or md), --connection |
Despite its name, docs append does not add to the end of a document: pass the whole new text.
Exporting
| Command | What it does | Options |
|---|---|---|
pangur export refs [KEY…] | Writes references as BibTeX, BibLaTeX, RIS or CSL-JSON: the items named, one collection, or with neither the whole library. | --format/-f (bibtex, biblatex, ris or csljson), --collection/-c KEY, --output/-o FILE (otherwise standard output), --connection |
pangur export project | Builds a ZIP of everything in the project and downloads it. | --output/-o, --wait/--no-wait (with --no-wait you get an email when the ZIP is ready), --connection |
pangur export link | Prints the project's private reference link, making one if there is none. Anyone with the link can read the references. | --collection/-c (a collection's link), --format/-f (which format's address to print), --new (replace the link; the old address stops working), --off (turn the link off), --connection |
For what the project ZIP contains, see Export your work or delete your account.
Books
| Command | What it does | Options |
|---|---|---|
pangur book from-section KEY | Creates a book item from a book section's book title, editors and publisher. | --json |
pangur book chapters KEY | Shows the chapters OpenAlex lists for a book. Creates nothing. | --json |
pangur book split KEY | Creates a book section for each chapter, and by default cuts the book's PDF to each section's pages. With OpenAlex chapters and no --yes, it lists them and stops. | --attachment/-a KEY, --no-pdf, --manual/-m 'Title:12-30' (repeat; Title:12 is one page), --from-json FILE, --yes, --json |
Manuscripts
| Command | What it does | Options |
|---|---|---|
pangur manuscript create SHELFMARK | Creates a manuscript record, optionally with its facsimile. | --repository/-r, --title/-t (the shelfmark by default), --url, --file/-f PATH (a PDF or image to attach), --collection/-c, --connection, --json |
pangur manuscript facsimiles KEY | Lists the facsimiles available for a manuscript: repository images, your photographs and uploaded files. | --connection, --json |
pangur manuscript link KEY URL | Links a repository viewer or IIIF manifest to a manuscript. | --connection, --json |
pangur manuscript leaves KEY | Lists a facsimile's leaves; --query finds a folio by its label. | --source/-s, --query/-q, --offset (0), --limit/-n (50), --connection, --json |
pangur manuscript leaf KEY INDEX -o FILE | Saves one leaf, or a region of it at full resolution, as an image. INDEX counts from 0. | --output/-o (required), --source/-s, --region (full, or x,y,w,h), --enhance, --connection |
pangur manuscript transcribe KEY INDEX | Reads one leaf twice with Pangur's vision model and saves a line-by-line transcription, which is then added to what Ask can search. Counts against the daily limit on manuscript transcriptions. | --source/-s, --connection, --json |
pangur manuscript transcription KEY | Prints the saved transcription for a facsimile. | --source/-s, --connection, --json |
pangur manuscript export KEY | Exports a transcription as TEI P5, PAGE XML, ALTO v4 or plain text. TEI, PAGE and ALTO come as a ZIP with one file per page. | --format/-f (tei, page, alto or txt), --reading/-r (diplomatic or expanded), --images (include page images; not with txt), --pages ("1-40" or "3,5,9-12"), --source/-s, --version (a named version), --output/-o, --connection |
In the web app the same work is done on the transcription desk, and the export formats are described in TEI texts and transcription exports.
Reading in order, copies and groups
| Command | What it does | Options |
|---|---|---|
pangur reading [KEY…] | Prints the text of several items in order: the items named, a corpus or an arrangement. Each item's text is its TEI edition, transcription, analysed record or file text. | the KEYs, or --corpus ID, or --arrangement ID with --node ID; for a corpus --view, --at, --grain, --entity, --role, --start, --end, --order; --style (diplomatic or expanded), --list (the order only), --connection, --json |
pangur copies KEY | Lists an item's copies with the reading copy starred, or with --reading makes another copy the reading copy. KEY can be ms: followed by a catalogued manuscript's id. | --reading SET_ID, --connection, --json |
pangur groups | Reads, creates or revises source groups, and prints JSON. | --save FILE.json (create; with --group, update), --group ID, --connection |
pangur arrange-texts KEY --arrangement ID | Divides an item's text into separate texts and places them in an arrangement under a node for the item. | --spans FILE.json or --from-analysis (one is required), --parent NODE, --connection, --json |
A copy is a set of files that together show a resource, such as a scan or an afternoon's photographs, and the tools call it a surrogate set. Copies are managed in the web app as described in Manage copies and parts, and arrangements and source groups in Arrangements, source groups and vocabularies.
Corpora
These commands work on analysis corpora. Several of them print JSON only.
| Command | What it does | Options |
|---|---|---|
pangur corpus list | Lists the project's corpora and how many of their sources have been analysed. | --connection, --json |
pangur corpus events CORPUS | Lists the events a corpus's sources describe, in date order. | --start, --end, --entity, --connection, --json |
pangur corpus records CORPUS | Lists the corpus's records with their evidence (JSON). | --filters JSON, --offset (0), --limit (100), --connection |
pangur corpus series CORPUS | Counts records over time or by group, with the evidence behind the counts (JSON). | --filters, --interval (year), --grouping (source), --measure (records), --connection |
pangur corpus evidence CORPUS RECORD | Prints one record's full evidence (JSON). | --reading, --manifest, --connection |
pangur corpus dating CORPUS | Prints the corpus's dating assertions and their current revision (JSON). | --connection |
pangur corpus revise-dating CORPUS FILE.json | Adds a dating revision. | --connection |
pangur corpus source-inventories CORPUS | Reads source inventories and import receipts (JSON). | --import-key, --with-payload, --connection |
pangur corpus stage-sources CORPUS FILE.json | Stages a source inventory without changing the live corpus. | --connection |
pangur corpus activate-sources CORPUS MANIFEST_ID VERSION | Makes a staged inventory live; refused if the corpus changed in between. | --connection |
pangur corpus rollback-sources CORPUS VERSION | Restores the previous inventory and keeps both. | --connection |
The staging, activation and rollback of source inventories are explained in Source inventories and assistant-submitted analysis.
Exhibitions
| Command | What it does | Options |
|---|---|---|
pangur exhibitions list | Lists your exhibitions with their status and address. | --connection, --json |
pangur exhibitions show ID | Prints an exhibition's sections and blocks. | --json |
pangur exhibitions publish ID | Publishes an exhibition at its public address, if your plan allows another live exhibition. | --visibility (public or password; left out, the exhibition keeps its own), --password (needed the first time an exhibition is protected; left out, it keeps its password) |
pangur exhibitions unpublish ID | Takes an exhibition down and keeps the draft. | — |
Publishing is not offered on every account or deployment. What publishing does, and how many exhibitions each plan keeps live, are set out in Publish, protect and take down an exhibition.
Project selection
A command with --connection works in the project you name by its id or address, both of which pangur projects lists. Without --connection, the server uses your default project, which is the one you opened last on any device. If a personal project and an organisation project share an address, the personal one is used.
These commands have no --connection option and always work in the default project:
overview,search,get,read,cite,collectionsandtags;edit,delete,noteandupload;import searchandimport lookup(import add,import refsandimport filedo take--connection);- the
bookcommands; - the
refscommands, exceptrefs import; exhibitions show,exhibitions publishandexhibitions unpublish, which find the exhibition by its id.
institution, tasks and jobs belong to your account and cover every project. To run one of the default-project commands in another project, open that project in Pangur first.
If the project is scoped to one collection, every command sees only that collection and files new items into it. A viewer in an organisation project can read, ask and export, and every command that changes the project is refused.
Commands that use Pangur's model
Only two commands run Pangur's model and count against your allowances:
pangur askwithout--materialscounts as an Ask question on your plan and uses your daily model allowance.pangur manuscript transcribereads the leaf twice with the vision model and counts against the daily limit on manuscript transcriptions.
The citation scans behind pangur refs and pangur import refs may also use the model while they refine a scan in the background, within your daily model allowance. Every other command runs no model. The allowances themselves are set out in Plans, limits and usage.
Environment variables
All of these are optional, and the defaults point at pangur.io.
| Variable | Default | Effect |
|---|---|---|
ZCP_API_BASE | https://pangur.io | The Pangur server the command talks to. |
ZCP_ISSUER | https://auth.pangur.io/realms/zcp | The sign-in service. |
ZCP_CLIENT_ID | zcp-cli | The client used for device-code sign-in. |
ZCP_BROWSER_CLIENT_ID | zcp-cli | The client used for pangur login --browser. |
ZCP_CREDENTIALS | ~/.config/zcp/credentials.json | The file the sign-in is saved in. Point it at a different file to keep a second account. |
PANGUR_CLI_FEED | https://updates.pangur.io/pangur-cli/latest.json | Read by the install script only: the release feed it installs from. |
The command has no configuration file other than the credentials file, and no variable for a default project or output format.
MCP tools
This page lists every tool that Pangur's MCP server offers a connected assistant, with what each one does, whether it reads or adds, and its main parameters.
Keyboard shortcuts
This page lists every keyboard shortcut Pangur defines on the web, in Pangur for Mac, and on iPad and iPhone with a hardware keyboard, arranged by screen.