@dropthis/cli 0.4.0 → 0.5.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 +39 -21
- package/dist/cli.cjs +449 -24
- package/dist/cli.cjs.map +1 -1
- package/node_modules/@dropthis/node/README.md +5 -1
- package/node_modules/@dropthis/node/dist/drops-fK63OCk6.d.cts +385 -0
- package/node_modules/@dropthis/node/dist/drops-fK63OCk6.d.ts +385 -0
- package/node_modules/@dropthis/node/dist/edge.cjs +584 -0
- package/node_modules/@dropthis/node/dist/edge.cjs.map +1 -0
- package/node_modules/@dropthis/node/dist/edge.d.cts +49 -0
- package/node_modules/@dropthis/node/dist/edge.d.ts +49 -0
- package/node_modules/@dropthis/node/dist/edge.mjs +557 -0
- package/node_modules/@dropthis/node/dist/edge.mjs.map +1 -0
- package/node_modules/@dropthis/node/dist/index.cjs +64 -37
- package/node_modules/@dropthis/node/dist/index.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.d.cts +9 -378
- package/node_modules/@dropthis/node/dist/index.d.ts +9 -378
- package/node_modules/@dropthis/node/dist/index.mjs +64 -37
- package/node_modules/@dropthis/node/dist/index.mjs.map +1 -1
- package/node_modules/@dropthis/node/package.json +11 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Requires Node.js >= 20.
|
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
dropthis login
|
|
17
|
-
dropthis
|
|
17
|
+
dropthis ./index.html # publish is the default command
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Authentication
|
|
@@ -47,6 +47,8 @@ Credentials resolve in this order:
|
|
|
47
47
|
2. `DROPTHIS_API_KEY` environment variable
|
|
48
48
|
3. Stored credential from `dropthis login`
|
|
49
49
|
|
|
50
|
+
If you run `dropthis publish` without credentials in an interactive terminal, the CLI prompts you to log in inline — no separate `dropthis login` step needed. Disable with `--no-interactive`.
|
|
51
|
+
|
|
50
52
|
```bash
|
|
51
53
|
dropthis whoami # Check current auth status
|
|
52
54
|
dropthis logout # Remove stored credentials
|
|
@@ -55,21 +57,29 @@ dropthis logout --revoke # Remove and revoke the key on the server
|
|
|
55
57
|
|
|
56
58
|
## Publish
|
|
57
59
|
|
|
60
|
+
`publish` is the default command — you can omit it and pass files directly:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# These are equivalent:
|
|
64
|
+
dropthis ./report.html
|
|
65
|
+
dropthis publish ./report.html
|
|
66
|
+
```
|
|
67
|
+
|
|
58
68
|
```bash
|
|
59
69
|
# HTML file
|
|
60
|
-
dropthis
|
|
70
|
+
dropthis ./report.html
|
|
61
71
|
|
|
62
72
|
# Directory (static site)
|
|
63
|
-
dropthis
|
|
73
|
+
dropthis ./dist
|
|
64
74
|
|
|
65
75
|
# Stdin
|
|
66
76
|
echo "<h1>Hello</h1>" | dropthis publish - --content-type text/html --path index.html
|
|
67
77
|
|
|
68
78
|
# Multiple files bundled into one drop
|
|
69
|
-
dropthis
|
|
79
|
+
dropthis index.html styles.css app.js
|
|
70
80
|
|
|
71
81
|
# Print only the URL (recommended for agents)
|
|
72
|
-
dropthis
|
|
82
|
+
dropthis ./dist --url
|
|
73
83
|
```
|
|
74
84
|
|
|
75
85
|
### Publish options
|
|
@@ -90,9 +100,7 @@ All publish flags:
|
|
|
90
100
|
| `--title <title>` | Drop title |
|
|
91
101
|
| `--visibility <public\|unlisted>` | Drop visibility |
|
|
92
102
|
| `--password <password>` | Set password protection |
|
|
93
|
-
| `--no-password` | Clear password |
|
|
94
103
|
| `--noindex` | Prevent search indexing |
|
|
95
|
-
| `--index` | Allow indexing |
|
|
96
104
|
| `--entry <path>` | Entry file for directories |
|
|
97
105
|
| `--content-type <mime>` | MIME type (required for stdin) |
|
|
98
106
|
| `--path <path>` | Filename (required for stdin) |
|
|
@@ -113,35 +121,39 @@ These flags are inherited by all commands:
|
|
|
113
121
|
|------|-------------|
|
|
114
122
|
| `--api-key <key>` | Override API key for this invocation |
|
|
115
123
|
| `--api-url <url>` | Override API base URL |
|
|
124
|
+
| `--json` | Force JSON output |
|
|
116
125
|
| `-q, --quiet` | Suppress status output and imply JSON |
|
|
126
|
+
| `--no-interactive` | Disable interactive prompts (inline auth, confirmations) |
|
|
117
127
|
|
|
118
128
|
## Update
|
|
119
129
|
|
|
130
|
+
Update an existing drop's content, metadata, or both via `drops update`:
|
|
131
|
+
|
|
120
132
|
```bash
|
|
121
133
|
# Replace content
|
|
122
|
-
dropthis update drop_abc123 ./dist-v2
|
|
134
|
+
dropthis drops update drop_abc123 ./dist-v2
|
|
123
135
|
|
|
124
136
|
# Update metadata only
|
|
125
|
-
dropthis update drop_abc123 --title "New title"
|
|
137
|
+
dropthis drops update drop_abc123 --title "New title"
|
|
126
138
|
|
|
127
139
|
# Optimistic concurrency
|
|
128
|
-
dropthis update drop_abc123 ./dist-v2 --if-revision 1
|
|
140
|
+
dropthis drops update drop_abc123 ./dist-v2 --if-revision 1
|
|
129
141
|
|
|
130
142
|
# Change vanity slug
|
|
131
|
-
dropthis update drop_abc123 --slug new-slug
|
|
143
|
+
dropthis drops update drop_abc123 --slug new-slug
|
|
132
144
|
```
|
|
133
145
|
|
|
134
|
-
|
|
146
|
+
`drops update` supports all publish flags plus `--slug` and `--if-revision`.
|
|
135
147
|
|
|
136
148
|
## Commands
|
|
137
149
|
|
|
138
150
|
```bash
|
|
139
|
-
dropthis
|
|
140
|
-
dropthis
|
|
151
|
+
dropthis [input...] # Publish content (default command)
|
|
152
|
+
dropthis publish [input...] # Same as above, explicit form
|
|
141
153
|
|
|
142
154
|
dropthis drops list # List your drops
|
|
143
155
|
dropthis drops get <drop-id> # Get drop details
|
|
144
|
-
dropthis drops update <drop-id>
|
|
156
|
+
dropthis drops update <drop-id> [input] # Update content or metadata
|
|
145
157
|
dropthis drops delete <drop-id> # Delete a drop
|
|
146
158
|
|
|
147
159
|
dropthis login # Authenticate with email OTP
|
|
@@ -166,10 +178,15 @@ dropthis commands # Machine-readable command metadata
|
|
|
166
178
|
|
|
167
179
|
The CLI is designed for non-interactive use. In non-TTY environments (pipes, CI, agents), output defaults to JSON automatically.
|
|
168
180
|
|
|
169
|
-
**Environment
|
|
181
|
+
**Environment variables:**
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
export DROPTHIS_API_KEY=sk_live_... # API key (same as --api-key)
|
|
185
|
+
export DROPTHIS_API_URL=https://... # Override API base URL (same as --api-url)
|
|
186
|
+
export DROPTHIS_NON_INTERACTIVE=1 # Disable interactive prompts (same as --no-interactive)
|
|
187
|
+
```
|
|
170
188
|
|
|
171
189
|
```bash
|
|
172
|
-
export DROPTHIS_API_KEY=sk_live_...
|
|
173
190
|
dropthis publish ./dist --url
|
|
174
191
|
```
|
|
175
192
|
|
|
@@ -178,6 +195,7 @@ dropthis publish ./dist --url
|
|
|
178
195
|
- Use `--url` to get only the published URL (cleanest for agents)
|
|
179
196
|
- Use `--json` for the full structured response
|
|
180
197
|
- Use `--yes` for destructive commands (`drops delete`, `api-keys delete`)
|
|
198
|
+
- Use `--no-interactive` to disable inline auth prompts
|
|
181
199
|
- All errors write to stderr as JSON with a `next_action` field
|
|
182
200
|
|
|
183
201
|
**Exit codes:**
|
|
@@ -211,18 +229,18 @@ Run diagnostics to verify CLI health:
|
|
|
211
229
|
dropthis doctor
|
|
212
230
|
```
|
|
213
231
|
|
|
214
|
-
Reports CLI version, auth source (`env`, `flag`, `
|
|
232
|
+
Reports CLI version, auth source (`env`, `flag`, `storage`, or `missing`), and credential storage backend (`secure`, `insecure`, or `none`).
|
|
215
233
|
|
|
216
234
|
```json
|
|
217
|
-
{"ok":true,"version":"0.
|
|
235
|
+
{"ok":true,"version":"0.4.1","auth":{"source":"env"},"storage":{"backend":"secure"}}
|
|
218
236
|
```
|
|
219
237
|
|
|
220
238
|
## Agent skills
|
|
221
239
|
|
|
222
|
-
|
|
240
|
+
For AI coding agents (Cursor, Claude Code, Windsurf, etc.), install the [dropthis-skills](https://github.com/dropthis-dev/dropthis-skills) package:
|
|
223
241
|
|
|
224
242
|
```bash
|
|
225
|
-
npx skills add dropthis-dev/dropthis-
|
|
243
|
+
npx skills add dropthis-dev/dropthis-skills
|
|
226
244
|
```
|
|
227
245
|
|
|
228
246
|
## Links
|