@primitivedotdev/cli 0.24.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 +47 -0
- package/bin/run.js +5 -0
- package/dist/oclif/api-command.js +755 -0
- package/dist/oclif/auth.js +223 -0
- package/dist/oclif/commands/emails-latest.js +184 -0
- package/dist/oclif/commands/emails-poll.js +121 -0
- package/dist/oclif/commands/emails-wait.js +171 -0
- package/dist/oclif/commands/emails-watch.js +165 -0
- package/dist/oclif/commands/functions-deploy.js +123 -0
- package/dist/oclif/commands/functions-init.js +262 -0
- package/dist/oclif/commands/functions-redeploy.js +112 -0
- package/dist/oclif/commands/functions-set-secret.js +212 -0
- package/dist/oclif/commands/login.js +236 -0
- package/dist/oclif/commands/logout.js +87 -0
- package/dist/oclif/commands/send.js +221 -0
- package/dist/oclif/commands/whoami.js +94 -0
- package/dist/oclif/fish-completion.js +87 -0
- package/dist/oclif/index.js +167 -0
- package/dist/oclif/lint/raw-send-mail-fetch.js +98 -0
- package/oclif.manifest.json +4287 -0
- package/package.json +108 -0
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @primitivedotdev/cli
|
|
2
|
+
|
|
3
|
+
Official Primitive CLI. Deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g @primitivedotdev/cli
|
|
7
|
+
primitive whoami
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Or with no install:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @primitivedotdev/cli@latest <command>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This package wraps the [@primitivedotdev/sdk](https://www.npmjs.com/package/@primitivedotdev/sdk) runtime client with one-shot commands. For in-handler use (calling Primitive from inside a Function), import `createPrimitiveClient` from `@primitivedotdev/sdk/api` directly; the CLI is for operator and deploy workflows.
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
export PRIMITIVE_API_KEY=prim_...
|
|
22
|
+
|
|
23
|
+
primitive whoami
|
|
24
|
+
primitive functions:init my-fn
|
|
25
|
+
cd my-fn && npm install && npm run build
|
|
26
|
+
primitive functions:deploy --name my-fn --file ./dist/handler.js
|
|
27
|
+
|
|
28
|
+
primitive send --to alice@example.com --body "Hello!" --wait
|
|
29
|
+
primitive emails:latest --limit 5
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run `primitive --help` for the full command list. Per-command help (`primitive functions:deploy --help`) carries enough detail that an agent can compose any operation without leaving the terminal.
|
|
33
|
+
|
|
34
|
+
## Migrating from `@primitivedotdev/sdk` CLI
|
|
35
|
+
|
|
36
|
+
The CLI previously shipped inside `@primitivedotdev/sdk`. The shipped surface area is identical; only the package name changes.
|
|
37
|
+
|
|
38
|
+
| Before | After |
|
|
39
|
+
|--------|-------|
|
|
40
|
+
| `npm install -g @primitivedotdev/sdk` | `npm install -g @primitivedotdev/cli` |
|
|
41
|
+
| `npx @primitivedotdev/sdk@latest <cmd>` | `npx @primitivedotdev/cli@latest <cmd>` |
|
|
42
|
+
|
|
43
|
+
`@primitivedotdev/sdk` continues to ship the runtime SDK (webhook, API client, contract, parser, openapi). Use it in your application code; use `@primitivedotdev/cli` in your shell and CI.
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|