papiers 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Search and read your Papiers library from the terminal.
|
|
4
4
|
|
|
5
|
+
The CLI is read-only: it can inspect your saved documents, highlights, notes,
|
|
6
|
+
and conversations, but it cannot change your library.
|
|
7
|
+
|
|
5
8
|
## Install
|
|
6
9
|
|
|
7
10
|
```bash
|
|
@@ -10,17 +13,60 @@ npm install -g papiers
|
|
|
10
13
|
|
|
11
14
|
Requires Node.js 22 or newer.
|
|
12
15
|
|
|
13
|
-
##
|
|
16
|
+
## First run
|
|
14
17
|
|
|
15
|
-
In Papiers, open Settings -> API tokens
|
|
18
|
+
1. In Papiers, open Settings -> API tokens and create a token.
|
|
19
|
+
2. Sign in and check the connection:
|
|
16
20
|
|
|
17
21
|
```bash
|
|
18
22
|
papiers auth login
|
|
23
|
+
papiers auth status
|
|
24
|
+
papiers doctor
|
|
19
25
|
```
|
|
20
26
|
|
|
21
27
|
Paste the token when prompted. The CLI saves it locally so you do not need to
|
|
22
28
|
paste it again.
|
|
23
29
|
|
|
30
|
+
3. Explore your library with human-readable output:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# See what you saved recently.
|
|
34
|
+
papiers list --kind document --limit 5 --pretty
|
|
35
|
+
|
|
36
|
+
# Search across documents, passages, highlights, notes, and conversations.
|
|
37
|
+
papiers search "retrieval augmented generation" --limit 5 --pretty
|
|
38
|
+
|
|
39
|
+
# List notes, then read one using the nte_... ID from the result.
|
|
40
|
+
papiers list --kind note --limit 5 --pretty
|
|
41
|
+
papiers read nte_... --format markdown --pretty
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Run `papiers <command> --help` for command-specific options or
|
|
45
|
+
`papiers help --all` for the complete CLI reference.
|
|
46
|
+
|
|
47
|
+
## Common workflows
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Recent highlights.
|
|
51
|
+
papiers list --kind highlight --since 30d --limit 10 --pretty
|
|
52
|
+
|
|
53
|
+
# Read the matching passages from a search through stdin.
|
|
54
|
+
papiers search "retrieval" --kind passage --limit 5 --passage-ids \
|
|
55
|
+
| papiers read @- --format plain --pretty
|
|
56
|
+
|
|
57
|
+
# Read document metadata without fetching its full content.
|
|
58
|
+
papiers read doc_... --format metadata --pretty
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Data commands emit stable JSON by default. Use `--pretty` for terminal reading;
|
|
62
|
+
use `--json`, `--ids`, `--ids0`, and `--doc-ids` for scripts and pipelines.
|
|
63
|
+
|
|
64
|
+
To forget the locally saved token:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
papiers auth logout
|
|
68
|
+
```
|
|
69
|
+
|
|
24
70
|
## Use with an AI agent
|
|
25
71
|
|
|
26
72
|
This is what `papiers` is really for. Point a coding or research agent (Claude
|
|
@@ -33,9 +79,26 @@ The package ships a ready-to-use agent skill at
|
|
|
33
79
|
encodes the loop — survey what you've been reading, search across passages +
|
|
34
80
|
highlights + notes + conversations in one ranking, then read and cite your own
|
|
35
81
|
sources.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
82
|
+
|
|
83
|
+
After a global install, locate the packaged skill under the npm root:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
PAPIERS_ROOT="$(npm root -g)/papiers"
|
|
87
|
+
|
|
88
|
+
# Claude Code, project-local skill
|
|
89
|
+
mkdir -p .claude/skills/papiers-research
|
|
90
|
+
cp "$PAPIERS_ROOT/skills/papiers-research/SKILL.md" \
|
|
91
|
+
.claude/skills/papiers-research/SKILL.md
|
|
92
|
+
|
|
93
|
+
# Codex, project-local skill
|
|
94
|
+
mkdir -p .codex/skills/papiers-research
|
|
95
|
+
cp "$PAPIERS_ROOT/skills/papiers-research/SKILL.md" \
|
|
96
|
+
.codex/skills/papiers-research/SKILL.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For another agent, add the same file through its normal skill or project
|
|
100
|
+
instructions mechanism. Then ask the agent to propose an idea, design an
|
|
101
|
+
experiment, or review a draft. It will think with your library, not around it.
|
|
39
102
|
|
|
40
103
|
```bash
|
|
41
104
|
# the agent only needs your token in its environment:
|
|
@@ -45,18 +108,28 @@ export PAPIERS_TOKEN=pap_live_...
|
|
|
45
108
|
Every data command emits a stable JSON envelope (`--json` makes errors JSON
|
|
46
109
|
too), so an agent can learn the whole tool from `papiers --help --all` alone.
|
|
47
110
|
|
|
48
|
-
##
|
|
111
|
+
## Automation
|
|
49
112
|
|
|
50
113
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
papiers
|
|
114
|
+
# Keep the token in the process environment rather than passing it as an
|
|
115
|
+
# argument. Do not commit it to source control.
|
|
116
|
+
export PAPIERS_TOKEN=pap_live_...
|
|
117
|
+
papiers search "mixture of experts" --limit 10 --json
|
|
55
118
|
```
|
|
56
119
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
##
|
|
61
|
-
|
|
62
|
-
|
|
120
|
+
`PAPIERS_TOKEN` takes precedence over a token saved by `papiers auth login`.
|
|
121
|
+
Run `papiers doctor` to see which token source and API endpoint are active.
|
|
122
|
+
|
|
123
|
+
## Troubleshooting
|
|
124
|
+
|
|
125
|
+
- **`papiers: command not found`:** run `npm prefix -g` and make sure that
|
|
126
|
+
installation's binary directory is on `PATH`.
|
|
127
|
+
- **Unsupported Node.js version:** run `node --version` and install Node.js 22
|
|
128
|
+
or newer.
|
|
129
|
+
- **Authentication failed:** run `papiers auth status`. If necessary, run
|
|
130
|
+
`papiers auth logout`, create a fresh token in Papiers, and sign in again.
|
|
131
|
+
- **Wrong token or endpoint:** run `papiers doctor`. Unset `PAPIERS_TOKEN` or
|
|
132
|
+
`PAPIERS_API_BASE_URL` if an automation environment is overriding your saved
|
|
133
|
+
login or the production endpoint.
|
|
134
|
+
- **Connection or API error:** run `papiers doctor`, then retry the failing
|
|
135
|
+
command with `--json` to get a machine-readable error and request ID.
|