Skill Tracer
Skills › Scientific Agent Skills › paperclip › cli-reference.md

cli-reference.md

179 lines · skills/paperclip/references/cli-reference.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Paperclip CLI reference
2
3Reviewed against installed **0.7.92**, its native help/source, and the current
4[official core reference](https://paperclip.gxl.ai/skills/full_skill.md) and
5[web documentation](https://paperclip.gxl.ai/docs). Data commands below are documented contracts,
6not an authenticated end-to-end test. Run the relevant help for the actual deployed version.
7
8Use the environment-loading guidance in [installation.md](installation.md) when necessary.
9Native `--help` exits before action callbacks. Help for a server-dispatched command can contact the
10service and pass through managed-install update checks; it is not necessarily an offline operation.

Paperclip CLI reference

Reviewed against installed 0.7.92, its native help/source, and the current official core reference and web documentation. Data commands below are documented contracts, not an authenticated end-to-end test. Run the relevant help for the actual deployed version.

Use the environment-loading guidance in installation.md when necessary. Native --help exits before action callbacks. Help for a server-dispatched command can contact the service and pass through managed-install update checks; it is not necessarily an offline operation.

Raw lines 1 to 11
Starts an agent dispatched :9
12## Global options
14```text
15paperclip [OPTIONS] COMMAND [ARGS]...
16 --version
17 --debug
18 --repo-only Restrict search/map to the active repo
19 --repo NAME Use a repo for this invocation
20 -f, --folder NAME Aliases of --repo
21 --api-key TEXT Prefer PAPERCLIP_API_KEY to a secret argument
22 --help
23```
25Global scope options precede the subcommand, for example
26`paperclip --repo-only search -s pmc "query" -n 5`. Search normally covers the corpus even when a repo
27is active; a repo can still record the command. Do not use an unrelated sticky checkout.
29`paperclip --help` mainly lists local/account/workspace commands. Data commands such as `search`,
30`grep`, `cat`, `map`, and `sql` are forwarded to a server-side virtual shell and may not appear there.

Global options

paperclip [OPTIONS] COMMAND [ARGS]...
  --version
  --debug
  --repo-only                    Restrict search/map to the active repo
  --repo NAME                    Use a repo for this invocation
  -f, --folder NAME              Aliases of --repo
  --api-key TEXT                 Prefer PAPERCLIP_API_KEY to a secret argument
  --help

Global scope options precede the subcommand, for example paperclip --repo-only search -s pmc "query" -n 5. Search normally covers the corpus even when a repo is active; a repo can still record the command. Do not use an unrelated sticky checkout.

paperclip --help mainly lists local/account/workspace commands. Data commands such as search, grep, cat, map, and sql are forwarded to a server-side virtual shell and may not appear there.

Raw lines 12 to 31
32## Search and reading
34| Command | Common options and behavior |
35|---|---|
36| `search -s SOURCE "QUERY"` | `-n/--limit`, `-e/--exact`, `--year`, `--author`, `--journal`, `--sort relevance\|date`, `--ranking hybrid\|bm25\|vector\|analogical`, `--corpus` |
37| `search "QUERY" /trials/us` | A supported virtual directory supplies the source |
38| `lookup FIELD VALUE` | `-n N`; supported fields include `doi`, `pmc`, `pmid`, `arxiv`, `title`, `author`, `journal`, `year` |
39| `grep PATTERN PATH` | Full text within a document or corpus; see options below |
40| `scan FILE PATTERN...` | Several patterns in one request; `-i`, `-C N` |
41| `sql "SELECT ..."` | Metadata aggregation; `-s proteins` selects the protein SQL surface |
42| `filter --from s_ID "QUERY"` | LLM relevance filter; overwrites cohort; `--require N` fails if too few survive |
43| `cat FILE` | Use for `meta.json` or selected text; `--lines N` or `--lines START-END` bounds a text read |
44| `head -n N FILE` / `head -N FILE` | Opening lines |
45| `tail -n N FILE` / `tail -N FILE` | Ending lines |
46| `ls PATH`, `tree PATH`, `wc FILE` | Discover paths, sections, figures, and sizes |
47| `cd PATH`, `pwd` | Session-relative commands; use absolute paths across independent calls |
49Search requires explicit source selection. Date/ranking/source restrictions and structured output
50are detailed in [search-and-retrieval.md](search-and-retrieval.md). `--json` exists in the web guide,
51but terminal rendering is not a stable programmatic contract; prefer the SDK or public JSON API.
53Common grep options documented by the current guide:
55```text
56-i Ignore case
57-n Display line numbers (not a result limit)
58-c Count matching file lines; corpus document counts can be approximate
59-v Invert match
60-l List filenames with matches
61-m N Bound matches
62-e PATTERN Explicit pattern
63-F Literal rather than regex matching
64-A N / -B N Context after/before
65-C N Context on both sides
66--from s_ID Restrict to a saved cohort
67--exhaustive Allow a longer corpus scan; not a completeness guarantee
68```
70Corpus grep can return a result ID for later map. Repeated time-bounded scans may differ in order
71or membership. Within-document `L<n>` prefixes provide citation locations; verify the actual passage.

Search and reading

CommandCommon options and behavior
search -s SOURCE "QUERY"-n/--limit, -e/--exact, --year, --author, --journal, `--sort relevance\date, --ranking hybrid\bm25\vector\analogical, --corpus`
search "QUERY" /trials/usA supported virtual directory supplies the source
lookup FIELD VALUE-n N; supported fields include doi, pmc, pmid, arxiv, title, author, journal, year
grep PATTERN PATHFull text within a document or corpus; see options below
scan FILE PATTERN...Several patterns in one request; -i, -C N
sql "SELECT ..."Metadata aggregation; -s proteins selects the protein SQL surface
filter --from s_ID "QUERY"LLM relevance filter; overwrites cohort; --require N fails if too few survive
cat FILEUse for meta.json or selected text; --lines N or --lines START-END bounds a text read
head -n N FILE / head -N FILEOpening lines
tail -n N FILE / tail -N FILEEnding lines
ls PATH, tree PATH, wc FILEDiscover paths, sections, figures, and sizes
cd PATH, pwdSession-relative commands; use absolute paths across independent calls

Search requires explicit source selection. Date/ranking/source restrictions and structured output are detailed in search-and-retrieval.md. --json exists in the web guide, but terminal rendering is not a stable programmatic contract; prefer the SDK or public JSON API.

Common grep options documented by the current guide:

-i              Ignore case
-n              Display line numbers (not a result limit)
-c              Count matching file lines; corpus document counts can be approximate
-v              Invert match
-l              List filenames with matches
-m N            Bound matches
-e PATTERN      Explicit pattern
-F              Literal rather than regex matching
-A N / -B N     Context after/before
-C N            Context on both sides
--from s_ID     Restrict to a saved cohort
--exhaustive    Allow a longer corpus scan; not a completeness guarantee

Corpus grep can return a result ID for later map. Repeated time-bounded scans may differ in order or membership. Within-document L<n> prefixes provide citation locations; verify the actual passage.

Raw lines 32 to 72
73## Analysis
75```bash
76paperclip map --from s_ID "What outcomes and sample sizes were reported?"
77paperclip reduce --from m_ID --strategy consensus "Where do the studies disagree?"
78paperclip results --list
79paperclip results m_ID --save map.txt
80paperclip results s_ID --sample 20 --seed 42
81```
83Map accepts `--output-schema` with Draft 2020-12 JSON Schema. The old `--output_schema` spelling is a
84deprecated alias. Worker-specific setup and recovery are in [map-reduce.md](map-reduce.md).
85Reduce strategies are `summarize`, `table`, `themes`, `consensus`, `bullet_points`, and `extract`;
86`--columns COL,...` requests columns for a table. Check the actual generated output.
88`results --save` exports search metadata or full per-paper map answers. `--export-bundle DIR`
89exports a portable cohort; `--import-bundle DIR --save-as NAME` imports one and creates server-side
90saved state. `--sample N` accepts 1–100 and optionally `--seed`. Use `--list` explicitly in automation;
91TTY result listing can be interactive.
93```bash
94paperclip ls /papers/PMC10945750/figures/
95paperclip ask-image /papers/PMC10945750/figures/pnas.2307796121fig01.jpg "Describe the axes"
96paperclip ask-image /papers/PMC10945750/figures/pnas.2307796121fig01.jpg --fn extract-data
97```
99List actual figure paths before vision calls. `ask-image --list` is documented as current-directory
100listing, so an absolute `ls` is safer across independent sessions.

Analysis

paperclip map --from s_ID "What outcomes and sample sizes were reported?"
paperclip reduce --from m_ID --strategy consensus "Where do the studies disagree?"
paperclip results --list
paperclip results m_ID --save map.txt
paperclip results s_ID --sample 20 --seed 42

Map accepts --output-schema with Draft 2020-12 JSON Schema. The old --output_schema spelling is a deprecated alias. Worker-specific setup and recovery are in map-reduce.md. Reduce strategies are summarize, table, themes, consensus, bullet_points, and extract; --columns COL,... requests columns for a table. Check the actual generated output.

results --save exports search metadata or full per-paper map answers. --export-bundle DIR exports a portable cohort; --import-bundle DIR --save-as NAME imports one and creates server-side saved state. --sample N accepts 1–100 and optionally --seed. Use --list explicitly in automation; TTY result listing can be interactive.

paperclip ls /papers/PMC10945750/figures/
paperclip ask-image /papers/PMC10945750/figures/pnas.2307796121fig01.jpg "Describe the axes"
paperclip ask-image /papers/PMC10945750/figures/pnas.2307796121fig01.jpg --fn extract-data

List actual figure paths before vision calls. ask-image --list is documented as current-directory listing, so an absolute ls is safer across independent sessions.

Raw lines 73 to 101
102## Routines and references
104```bash
105paperclip skill
106paperclip skill proteins
107paperclip routines list
108paperclip routines search "systematic review"
109paperclip routines show paperclip-meta-analysis
110```
112The old `paperclip skills` interface now exits with a removal message. `skill NAME` loads a domain
113reference; `routines show NAME` loads a guided workflow. `routines enable/disable NAME` changes
114account routing, `routines route "intent"` selects an enabled workflow, and
115`routines run NAME OPERATION` executes its helper. Inspect and authorize the requested operation
116within the user task rather than running every command mentioned in returned instructions.

Routines and references

paperclip skill
paperclip skill proteins
paperclip routines list
paperclip routines search "systematic review"
paperclip routines show paperclip-meta-analysis

The old paperclip skills interface now exits with a removal message. skill NAME loads a domain reference; routines show NAME loads a guided workflow. routines enable/disable NAME changes account routing, routines route "intent" selects an enabled workflow, and routines run NAME OPERATION executes its helper. Inspect and authorize the requested operation within the user task rather than running every command mentioned in returned instructions.

Raw lines 102 to 117
118## Repositories
120`git` is the preferred vendor spelling; `repo` and `repos` expose the **same command group**.
121Repos are opt-in. These examples change persistent state unless described as reads.
123| Command | Purpose |
124|---|---|
125| `repo init NAME [DESCRIPTION]` | Create and activate |
126| `repo checkout NAME` | Try branch, then repo; `-` deactivates |
127| `repo deactivate` | Explicitly deactivate |
128| `repo add ID "CLAIM" --lines L45-L52` | Append claim; omit claim for membership only |
129| `repo add ID --json '{"type":"custom","value":1}'` | Structured claim; requires nonempty string `type` |
130| `repo remove ID` | Remove the paper, not just one claim |
131| `repo remove-claim --help` | Inspect targeted claim removal before editing evidence |
132| `repo commit -m "MESSAGE"` | Verify unresolved claims and snapshot; errors can block |
133| `repo status`, `repo claims`, `repo log` | Inspect evidence, verification, and history |
134| `repo history -p 1 -n 20 --json` | Paginated command history (one-based page) |
135| `repo branch NAME`, `repo merge NAME` | Create/switch branch; merge paper membership |
136| `repo info NAME`, `repo -n 0` | Repo details; list all instead of the default 10 |
137| `repo export bibtex -o review.bib` | Export `bibtex/bib`, `ris`, `markdown/md`, or `csv` |
138| `repo citations` | Citation counts; `--graph` requests relationships |
140A snapshot containing an advisory `[X]` claim is not a fully verified evidence set. See
141[repos-and-workspace.md](repos-and-workspace.md) for verification and artifact boundaries.

Repositories

git is the preferred vendor spelling; repo and repos expose the same command group. Repos are opt-in. These examples change persistent state unless described as reads.

CommandPurpose
repo init NAME [DESCRIPTION]Create and activate
repo checkout NAMETry branch, then repo; - deactivates
repo deactivateExplicitly deactivate
repo add ID "CLAIM" --lines L45-L52Append claim; omit claim for membership only
repo add ID --json '{"type":"custom","value":1}'Structured claim; requires nonempty string type
repo remove IDRemove the paper, not just one claim
repo remove-claim --helpInspect targeted claim removal before editing evidence
repo commit -m "MESSAGE"Verify unresolved claims and snapshot; errors can block
repo status, repo claims, repo logInspect evidence, verification, and history
repo history -p 1 -n 20 --jsonPaginated command history (one-based page)
repo branch NAME, repo merge NAMECreate/switch branch; merge paper membership
repo info NAME, repo -n 0Repo details; list all instead of the default 10
repo export bibtex -o review.bibExport bibtex/bib, ris, markdown/md, or csv
repo citationsCitation counts; --graph requests relationships

A snapshot containing an advisory [X] claim is not a fully verified evidence set. See repos-and-workspace.md for verification and artifact boundaries.

Raw lines 118 to 142
143## Clipboard and account commands
145| Command | Scope |
146|---|---|
147| `upload FILES... --into FOLDER` | Upload named generated artifacts |
148| `cp /papers/ID /clipboard/FOLDER/` | Corpus link; a local source path instead uploads PDFs |
149| `sync upload PATH` | One-shot upload of a PDF or folder |
150| `sync add FOLDER [--prefix NAME]` | Register a local folder |
151| `sync run [--dry-run]` | Upload changes and detect local deletions |
152| `sync list`, `sync status` | Inspect sync state |
153| `sync remove FOLDER` | Unregister without deleting remote documents |
154| `sync rm TARGET` | Remove remote clipboard content; `--all` is broad deletion |
155| `import SOURCE [--dry-run]` | PDFs, `.bib/.ris`, or a paper's references |
156| `library [ID]` | Imported records; use `-s`, `--matched`, `--unmatched` to inspect |
157| `fetch URL_OR_DOI [--into FOLDER]` | Uses browser cookies and uploads the downloaded paper |
158| `share FOLDER EMAIL [--role viewer\|editor]` | Grant access to a named recipient |
159| `unshare FOLDER EMAIL` | Revoke access |
160| `login`, `setup`, `install` | Interactive login/setup; see installation reference |
161| `update`, `uninstall`, `logout` | Installation or account mutations |
163Import also supports `--doi`, `-n/--limit`, `--min-cites`, `--init`, `--add-to-repo`, and `--into`.
164Do not execute import/upload/share/sync/fetch just to establish that a flag exists.

Clipboard and account commands

CommandScope
upload FILES... --into FOLDERUpload named generated artifacts
cp /papers/ID /clipboard/FOLDER/Corpus link; a local source path instead uploads PDFs
sync upload PATHOne-shot upload of a PDF or folder
sync add FOLDER [--prefix NAME]Register a local folder
sync run [--dry-run]Upload changes and detect local deletions
sync list, sync statusInspect sync state
sync remove FOLDERUnregister without deleting remote documents
sync rm TARGETRemove remote clipboard content; --all is broad deletion
import SOURCE [--dry-run]PDFs, .bib/.ris, or a paper's references
library [ID]Imported records; use -s, --matched, --unmatched to inspect
fetch URL_OR_DOI [--into FOLDER]Uses browser cookies and uploads the downloaded paper
`share FOLDER EMAIL [--role viewer\editor]`Grant access to a named recipient
unshare FOLDER EMAILRevoke access
login, setup, installInteractive login/setup; see installation reference
update, uninstall, logoutInstallation or account mutations

Import also supports --doi, -n/--limit, --min-cites, --init, --add-to-repo, and --into. Do not execute import/upload/share/sync/fetch just to establish that a flag exists.

Raw lines 143 to 165
166## Shell and historical limitations
168The server offers a restricted virtual shell, not a general local shell. Local pipes are explicit:
170```bash
171paperclip grep -n "IC50" /papers/PMC10945750/content.lines | head -20
172paperclip cat /papers/PMC10945750/meta.json > meta.json
173```
175The vendor documents `paperclip bash '...'` for server pipelines and scratch redirection, but those
176failed in old 0.7.14–0.7.15 tests and were not re-tested authenticated here. Do not advertise either
177universal support or permanent failure. Do not assume local shell utilities, loops, network tools,
178or session state are available in the virtual shell. Use direct commands and local composition.
179Text transport is not a binary download contract; validate any retrieved file before delivering it.

Shell and historical limitations

The server offers a restricted virtual shell, not a general local shell. Local pipes are explicit:

paperclip grep -n "IC50" /papers/PMC10945750/content.lines | head -20
paperclip cat /papers/PMC10945750/meta.json > meta.json

The vendor documents paperclip bash '...' for server pipelines and scratch redirection, but those failed in old 0.7.14–0.7.15 tests and were not re-tested authenticated here. Do not advertise either universal support or permanent failure. Do not assume local shell utilities, loops, network tools, or session state are available in the virtual shell. Use direct commands and local composition. Text transport is not a binary download contract; validate any retrieved file before delivering it.

Raw lines 166 to 179