Scholar Sidekick (CLI) — Citations, Retraction & Open-Access from the terminal
Turn a scholarly identifier into a formatted citation, a bibliography file, or an integrity
check (retraction / open-access / fabrication) by running the scholar command. The CLI is a
thin wrapper over the public Scholar Sidekick REST API. No API key required for the free,
rate-limited tier — and ergonomic subcommands mean you don't hand-build JSON request bodies.
Sibling skills, same capabilities: use scholar-sidekick-api if there's no Node runtime (plain curl), or scholar-sidekick-mcp if an MCP host is connected. This skill is the typed-CLI path for Node ≥20.
When to Use
- The user has an identifier (DOI, PMID, PMCID, ISBN, arXiv, ISSN, ADS bibcode, WHO IRIS URL; shortDOI aliases like
10/aabbe accepted) and wants metadata, a formatted citation, or a bibliography file, and the environment has Node ≥20.
- "Cite this in APA/Vancouver/Chicago…", "give me a BibTeX/RIS file", "export these refs to a file".
- "Has this been retracted?", "is this open access?", "is this citation real / did you make it up?"
- "Audit my bibliography" / "check all the references in this .bib file" — a whole reference list at once.
- Batch jobs: several identifiers at once, or streaming results as they resolve.
- Do NOT use to search for papers by topic — that's discovery (see the
arxiv skill). This assumes you already have an identifier.
- Prefer
scholar-sidekick-api instead when there is no Node runtime, or scholar-sidekick-mcp when an MCP host is connected.
Install
The CLI ships on npm as scholar-sidekick-cli (bin: scholar). Requires Node.js ≥ 20.
# zero-install, per-invocation
npx -y scholar-sidekick-cli format 10.1038/nphys1170 --style apa
# or install globally and call `scholar`
npm install -g scholar-sidekick-cli
scholar health
The examples below use scholar; substitute npx -y scholar-sidekick-cli if you didn't install globally.
Commands
| Command |
What it does |
Batch? |
format <ids...> |
Format identifiers into a citation style. --style, --lang, --footnote, --output text|html|json. |
yes |
resolve <ids...> |
Resolve identifiers to bibliographic metadata (CSL/Biblio JSON). |
yes |
export <ids...> |
Export to a file format: --format bib|ris|csv|csl|endnote-xml|endnote-refer|refworks|medline|zotero-rdf|txt. Raw file content on stdout. |
yes |
format-items |
Format pre-resolved items from --file <json> or stdin (a JSON array). |
— |
stream <ids...> |
Format a batch, streaming each result as NDJSON as it resolves. |
yes |
verify |
Verify a claimed citation against the record at its identifier. --title (required) + an identifier flag (--doi, --pmid, …). |
no |
audit [file] |
Audit a whole bibliography (BibTeX/RIS/CSL-JSON file, or stdin): per-entry fabrication check + retraction status, plus a corpus summary. --format, --no-retraction, --fail-on-issues. Max 25 entries. |
file |
retraction <id> |
Retraction / correction / expression-of-concern status (Crossref / Retraction Watch). Alias context: single id. |
no |
oa <id> |
Open-access status and best legal copy (Unpaywall). Alias: open-access. |
no |
styles [query] |
List/search available CSL citation styles (paginated). |
— |
health |
Service liveness and diagnostics. |
— |
format, resolve, export, and stream accept multiple identifiers (space-, comma-, or
newline-separated). verify, retraction, and oa take a single identifier; audit takes a
bibliography file (or stdin) rather than identifiers. Run scholar <command> --help for the
full option list.
Procedure
Format a citation
scholar format 10.1038/nphys1170 --style vancouver
scholar format 10.1038/nphys1170 PMID:30049270 --style apa # batch
--style: vancouver (default), ama, apa, ieee, cse, or any CSL style ID (chicago-author-date, harvard-cite-them-right, nature, the-lancet, …). Use scholar styles <query> to discover IDs.
- Pass identifiers verbatim —
PMID:, arXiv:, ISBN hyphens, and https://doi.org/… are all tolerated. A shortDOI alias (10/aabbe, from shortdoi.org) is accepted anywhere a DOI is, and expanded to the full DOI before resolving.
Export a bibliography file
scholar export 10.1038/nphys1170 PMID:30049270 --format ris > refs.ris
export writes the raw file content to stdout, so redirect it straight to a file. Formats:
bib, ris, csv, csl, endnote-xml, endnote-refer, refworks, medline, zotero-rdf, txt.
Check retraction / open access
scholar retraction 10.1016/S0140-6736(97)11096-0
scholar oa 10.1371/journal.pone.0173664
One identifier per call. Books/ISBNs have no DOI, so these report a "no DOI" result.
Verify a claimed citation (catch fabrication)
scholar verify --title "The title exactly as cited" --doi 10.1016/S0140-6736(26)00603-3
--title is required plus an identifier flag. Verdict ∈ matched / mismatch / ambiguous /
not_found:
mismatch — identifier resolves but the title doesn't: the dominant AI-fabrication pattern (real DOI + invented title; Topaz et al., Lancet 2026).
ambiguous — identifier resolves to one paper but the claimed title matches a different real paper (wrong-identifier error, not fabrication).
Use this for "is this citation real?", not a plain format/resolve. Add --fail-on-mismatch
to make mismatch/not_found exit non-zero for scripting/CI.
Audit a whole bibliography (batch fabrication + retraction check)
scholar audit refs.bib # BibTeX/RIS/CSL-JSON, format auto-detected
cat refs.ris | scholar audit # or pipe via stdin
scholar audit refs.bib --json | jq '.summary'
The batch counterpart to verify: every entry gets the fabrication check plus a retraction
lookup, and the command prints a per-entry verdict table and a corpus summary
(total / matched / mismatch / ambiguous / not_found / errored / retracted). Flags:
--format bibtex|ris|csl-json overrides auto-detection, --no-retraction skips the
retraction lookup, --fail-on-issues exits non-zero when any entry is mismatch,
not_found, or retracted (for scripting/CI). Max 25 entries per call; one bad entry becomes
status: "error" without failing the batch. This audits citation identity — it does not
check whether each source supports the claim it is cited for.
Error-recovery loop (verify). Correctness matters here, so don't guess on failure:
- Run
scholar verify ….
- Check the exit code.
0 → trust the printed verdict.
- On non-zero, re-run with
--json and read the verdict/error field — distinguish a real
mismatch/not_found (report it as such) from a network/usage error (code 2/3, retry or fix flags).
- Report exactly what the CLI returned. Never emit a
matched/genuine verdict the tool did not produce.
Output & parsing (for agents)
Authentication, limits & exit codes
Works anonymously at the free, rate-limited tier — fine for normal agent use. Optional ssk_
or RapidAPI keys raise limits. The CLI uses standard exit codes (0 ok, 1 API error, 2
network/timeout, 3 usage error). Full detail — keys, --base-url/--timeout, and the exit-code
table — is in REFERENCE.md.
Always check the exit code; on non-zero, report the failure — never invent a citation,
retraction status, OA verdict, or a matched verdict.
Pitfalls
- Needs Node ≥20. If unavailable, use the
scholar-sidekick-api skill (plain curl) instead.
- Pass identifiers verbatim; don't strip prefixes.
--json is what you parse; the default text and the stderr footer are for humans.
verify/retraction/oa are single-identifier; only format/resolve/export/stream batch. To check a whole reference list in one call, use audit with a file (not identifiers).
- Under a RapidAPI key,
format-items/stream/styles aren't available — run those anonymously or with an ssk_ key.
Verification
scholar health (or --json) returns an ok: true payload.
- A good
scholar format … --json response has a non-empty formatted citation in the JSON.
1---2name: scholar-sidekick-cli3description: Resolve scholarly identifiers (DOI including shortDOI aliases, PMID, PMCID, ISBN, arXiv, ISSN, ADS bibcode, WHO IRIS URL) into formatted citations (10,000+ CSL styles) and bibliography exports (BibTeX, RIS, EndNote, CSV…), and check retraction, open-access, and citation-fabrication status — from the terminal via the `scholar` CLI. Wraps the public REST API; needs Node ≥20 but no API key for the free tier. Use when the user wants to look up, cite, export, or verify a reference by DOI, PMID, PMCID, ISBN, arXiv ID, ISSN, ADS bibcode, or WHO IRIS URL from the terminal — including retraction, open-access, and fabricated-citation checks, or a whole-bibliography audit of a .bib/.ris/CSL-JSON file.4license: MIT5---67# Scholar Sidekick (CLI) — Citations, Retraction & Open-Access from the terminal89Turn a scholarly identifier into a formatted citation, a bibliography file, or an integrity10check (retraction / open-access / fabrication) by running the `scholar` command. The CLI is a11thin wrapper over the public Scholar Sidekick REST API. **No API key required** for the free,12rate-limited tier — and ergonomic subcommands mean you don't hand-build JSON request bodies.1314> Sibling skills, same capabilities: use **`scholar-sidekick-api`** if there's no Node runtime (plain `curl`), or **`scholar-sidekick-mcp`** if an MCP host is connected. This skill is the typed-CLI path for Node ≥20.1516## When to Use17- The user has an identifier (DOI, PMID, PMCID, ISBN, arXiv, ISSN, ADS bibcode, WHO IRIS URL; shortDOI aliases like `10/aabbe` accepted) and wants metadata, a formatted citation, or a bibliography file, **and** the environment has Node ≥20.18- "Cite this in APA/Vancouver/Chicago…", "give me a BibTeX/RIS file", "export these refs to a file".19- "Has this been retracted?", "is this open access?", "is this citation real / did you make it up?"20- "Audit my bibliography" / "check all the references in this .bib file" — a whole reference list at once.21- Batch jobs: several identifiers at once, or streaming results as they resolve.22- Do NOT use to *search* for papers by topic — that's discovery (see the `arxiv` skill). This assumes you already have an identifier.23- Prefer `scholar-sidekick-api` instead when there is no Node runtime, or `scholar-sidekick-mcp` when an MCP host is connected.2425## Install26The CLI ships on npm as `scholar-sidekick-cli` (bin: `scholar`). Requires Node.js ≥ 20.2728```bash29# zero-install, per-invocation30npx -y scholar-sidekick-cli format 10.1038/nphys1170 --style apa3132# or install globally and call `scholar`33npm install -g scholar-sidekick-cli34scholar health35```36The examples below use `scholar`; substitute `npx -y scholar-sidekick-cli` if you didn't install globally.3738## Commands3940| Command | What it does | Batch? |41|---|---|---|42| `format <ids...>` | Format identifiers into a citation style. `--style`, `--lang`, `--footnote`, `--output text\|html\|json`. | yes |43| `resolve <ids...>` | Resolve identifiers to bibliographic metadata (CSL/Biblio JSON). | yes |44| `export <ids...>` | Export to a file format: `--format bib\|ris\|csv\|csl\|endnote-xml\|endnote-refer\|refworks\|medline\|zotero-rdf\|txt`. Raw file content on stdout. | yes |45| `format-items` | Format pre-resolved items from `--file <json>` or stdin (a JSON array). | — |46| `stream <ids...>` | Format a batch, streaming each result as NDJSON as it resolves. | yes |47| `verify` | Verify a claimed citation against the record at its identifier. `--title` (required) + an identifier flag (`--doi`, `--pmid`, …). | no |48| `audit [file]` | Audit a whole bibliography (BibTeX/RIS/CSL-JSON file, or stdin): per-entry fabrication check + retraction status, plus a corpus summary. `--format`, `--no-retraction`, `--fail-on-issues`. Max 25 entries. | file |49| `retraction <id>` | Retraction / correction / expression-of-concern status (Crossref / Retraction Watch). Alias context: single id. | no |50| `oa <id>` | Open-access status and best legal copy (Unpaywall). Alias: `open-access`. | no |51| `styles [query]` | List/search available CSL citation styles (paginated). | — |52| `health` | Service liveness and diagnostics. | — |5354`format`, `resolve`, `export`, and `stream` accept multiple identifiers (space-, comma-, or55newline-separated). `verify`, `retraction`, and `oa` take a single identifier; `audit` takes a56bibliography file (or stdin) rather than identifiers. Run `scholar <command> --help` for the57full option list.5859## Procedure6061### Format a citation62```bash63scholar format 10.1038/nphys1170 --style vancouver64scholar format 10.1038/nphys1170 PMID:30049270 --style apa # batch65```66- `--style`: `vancouver` (default), `ama`, `apa`, `ieee`, `cse`, or any CSL style ID (`chicago-author-date`, `harvard-cite-them-right`, `nature`, `the-lancet`, …). Use `scholar styles <query>` to discover IDs.67- Pass identifiers verbatim — `PMID:`, `arXiv:`, ISBN hyphens, and `https://doi.org/…` are all tolerated. A shortDOI alias (`10/aabbe`, from shortdoi.org) is accepted anywhere a DOI is, and expanded to the full DOI before resolving.6869### Export a bibliography file70```bash71scholar export 10.1038/nphys1170 PMID:30049270 --format ris > refs.ris72```73`export` writes the **raw file content to stdout**, so redirect it straight to a file. Formats:74`bib`, `ris`, `csv`, `csl`, `endnote-xml`, `endnote-refer`, `refworks`, `medline`, `zotero-rdf`, `txt`.7576### Check retraction / open access77```bash78scholar retraction 10.1016/S0140-6736(97)11096-079scholar oa 10.1371/journal.pone.017366480```81One identifier per call. Books/ISBNs have no DOI, so these report a "no DOI" result.8283### Verify a claimed citation (catch fabrication)84```bash85scholar verify --title "The title exactly as cited" --doi 10.1016/S0140-6736(26)00603-386```87`--title` is required plus an identifier flag. Verdict ∈ `matched` / `mismatch` / `ambiguous` /88`not_found`:89- `mismatch` — identifier resolves but the title doesn't: the dominant AI-fabrication pattern (real DOI + invented title; Topaz et al., Lancet 2026).90- `ambiguous` — identifier resolves to one paper but the claimed title matches a *different* real paper (wrong-identifier error, not fabrication).9192Use this for "is this citation real?", not a plain `format`/`resolve`. Add `--fail-on-mismatch`93to make `mismatch`/`not_found` exit non-zero for scripting/CI.9495### Audit a whole bibliography (batch fabrication + retraction check)96```bash97scholar audit refs.bib # BibTeX/RIS/CSL-JSON, format auto-detected98cat refs.ris | scholar audit # or pipe via stdin99scholar audit refs.bib --json | jq '.summary'100```101The batch counterpart to `verify`: every entry gets the fabrication check plus a retraction102lookup, and the command prints a per-entry verdict table and a corpus summary103(`total / matched / mismatch / ambiguous / not_found / errored / retracted`). Flags:104`--format bibtex|ris|csl-json` overrides auto-detection, `--no-retraction` skips the105retraction lookup, `--fail-on-issues` exits non-zero when any entry is `mismatch`,106`not_found`, or retracted (for scripting/CI). Max 25 entries per call; one bad entry becomes107`status: "error"` without failing the batch. This audits citation *identity* — it does not108check whether each source supports the claim it is cited for.109110**Error-recovery loop (verify).** Correctness matters here, so don't guess on failure:1111. Run `scholar verify …`.1122. Check the exit code. `0` → trust the printed verdict.1133. On non-zero, re-run with `--json` and read the `verdict`/error field — distinguish a real114 `mismatch`/`not_found` (report it as such) from a network/usage error (code `2`/`3`, retry or fix flags).1154. Report exactly what the CLI returned. **Never** emit a `matched`/genuine verdict the tool did not produce.116117## Output & parsing (for agents)118- Default output is human-readable text. **Pass `--json` to any command** to get the raw API JSON — parse that, don't scrape the pretty text:119 ```bash120 scholar resolve 10.1016/S0140-6736(26)00603-3 --json | jq '.[0].title'121 ```122- A dim provenance footer (request id, cache status, style, version) goes to **stderr**, so it never pollutes piped stdout. Suppress it with `--quiet`. Colour auto-disables off-TTY / with `NO_COLOR` / `--no-color`.123124## Authentication, limits & exit codes125Works **anonymously** at the free, rate-limited tier — fine for normal agent use. Optional `ssk_`126or RapidAPI keys raise limits. The CLI uses standard exit codes (`0` ok, `1` API error, `2`127network/timeout, `3` usage error). Full detail — keys, `--base-url`/`--timeout`, and the exit-code128table — is in [`REFERENCE.md`](REFERENCE.md).129130Always check the exit code; on non-zero, report the failure — **never invent** a citation,131retraction status, OA verdict, or a `matched` verdict.132133## Pitfalls134- Needs Node ≥20. If unavailable, use the `scholar-sidekick-api` skill (plain `curl`) instead.135- Pass identifiers verbatim; don't strip prefixes.136- `--json` is what you parse; the default text and the stderr footer are for humans.137- `verify`/`retraction`/`oa` are single-identifier; only `format`/`resolve`/`export`/`stream` batch. To check a whole reference list in one call, use `audit` with a file (not identifiers).138- Under a RapidAPI key, `format-items`/`stream`/`styles` aren't available — run those anonymously or with an `ssk_` key.139140## Verification141- `scholar health` (or `--json`) returns an `ok: true` payload.142- A good `scholar format … --json` response has a non-empty formatted citation in the JSON.