papermark 0.0.1 → 0.2.0
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 +85 -5
- package/dist/index.js +2216 -0
- package/dist/index.js.map +1 -0
- package/docs/CONTRACT_V1.md +108 -0
- package/openai.yaml +56 -0
- package/package.json +56 -10
- package/skills/papermark/SKILL.md +99 -0
package/README.md
CHANGED
|
@@ -1,8 +1,88 @@
|
|
|
1
|
-
#
|
|
1
|
+
# papermark
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line interface for [Papermark](https://www.papermark.com).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Upload documents, create share links, manage datarooms, and read analytics
|
|
6
|
+
from your terminal. Built to be scriptable and agent-friendly — every
|
|
7
|
+
command supports `--json`, and the output contract is pinned at
|
|
8
|
+
[`docs/CONTRACT_V1.md`](./docs/CONTRACT_V1.md).
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g papermark
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
papermark login # OAuth 2.1 device flow in your browser
|
|
20
|
+
papermark documents list
|
|
21
|
+
papermark documents upload ./deck.pdf --link
|
|
22
|
+
papermark links create --document <id> --name "Acme Pitch" --password <pw>
|
|
23
|
+
papermark views list --link <link-id>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Authentication
|
|
27
|
+
|
|
28
|
+
Four ways to authenticate, highest precedence first:
|
|
29
|
+
|
|
30
|
+
1. `PAPERMARK_TOKEN` env var
|
|
31
|
+
2. `PAPERMARK_CREDENTIALS_FILE` — path to a JSON file with `{token, apiUrl}`
|
|
32
|
+
3. `papermark auth set --stdin` — pipe a token over stdin (CI-friendly; no
|
|
33
|
+
tempfile, no shell-history leak)
|
|
34
|
+
4. Stored config (`papermark login`, or `papermark login --token pm_live_...`)
|
|
35
|
+
|
|
36
|
+
Scopes supported: `documents.{read,write}`, `links.{read,write}`,
|
|
37
|
+
`datarooms.{read,write}`, `analytics.read`, `visitors.read`.
|
|
38
|
+
|
|
39
|
+
Tokens expire after 90 days (Stripe-CLI pattern); re-login when prompted.
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
papermark login Sign in via OAuth device flow
|
|
45
|
+
papermark logout Remove the stored token
|
|
46
|
+
papermark whoami Show the active token + API URL + source
|
|
47
|
+
papermark doctor Scriptable preflight health check
|
|
48
|
+
papermark auth export [--unmasked] Print credentials as JSON (for CI)
|
|
49
|
+
papermark auth set --stdin [--json] Read credentials from stdin
|
|
50
|
+
|
|
51
|
+
papermark documents list List documents
|
|
52
|
+
papermark documents get <id> Fetch a single document
|
|
53
|
+
papermark documents upload <file> Upload a local file
|
|
54
|
+
papermark documents delete <id> Delete a document
|
|
55
|
+
papermark documents search <query> Search documents by name
|
|
56
|
+
|
|
57
|
+
papermark links list List share links
|
|
58
|
+
papermark links create --document <id> Create a share link
|
|
59
|
+
papermark links delete <id> Revoke a share link
|
|
60
|
+
|
|
61
|
+
papermark views list --link <link-id> List views for a link
|
|
62
|
+
|
|
63
|
+
papermark config set <key> <value> Change stored settings (api-url, …)
|
|
64
|
+
papermark config get [key] Read stored settings
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Global flags
|
|
68
|
+
|
|
69
|
+
- `--json` — emit machine-readable JSON (auto-enabled when stdout is piped)
|
|
70
|
+
- `--dry-run` — print the HTTP request that would be sent and exit (token redacted)
|
|
71
|
+
- `--no-color` — disable ANSI color (same as `NO_COLOR=1`)
|
|
72
|
+
|
|
73
|
+
## Configuration
|
|
74
|
+
|
|
75
|
+
- `PAPERMARK_API_URL` — defaults to `https://api.papermark.com`
|
|
76
|
+
- `PAPERMARK_TOKEN` — if set, bypasses `papermark login`
|
|
77
|
+
- `PAPERMARK_CREDENTIALS_FILE` — path to a `{token, apiUrl}` JSON file
|
|
78
|
+
- `PAPERMARK_DEBUG=1` — log every outbound HTTP request to stderr
|
|
79
|
+
|
|
80
|
+
## Exit codes
|
|
81
|
+
|
|
82
|
+
`0` success · `1` api error · `2` auth error · `3` validation error ·
|
|
83
|
+
`4` network error · `5` internal CLI bug. Full contract in
|
|
84
|
+
[`docs/CONTRACT_V1.md`](./docs/CONTRACT_V1.md).
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|