openmates 0.8.0-alpha.1
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 +51 -0
- package/dist/chunk-XNONURHY.js +9718 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.js +9 -0
- package/dist/index.d.ts +683 -0
- package/dist/index.js +18 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# openmates
|
|
2
|
+
|
|
3
|
+
OpenMates npm CLI + SDK (pair-auth login only).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g openmates
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Environment
|
|
12
|
+
|
|
13
|
+
The CLI auto-derives the web app URL from the API URL so the pair token always lands on the right backend.
|
|
14
|
+
|
|
15
|
+
| Target | Command prefix |
|
|
16
|
+
| -------------------- | --------------------------------------------------------------------------------- |
|
|
17
|
+
| Production (default) | _(none)_ |
|
|
18
|
+
| Dev server | `OPENMATES_API_URL=https://api.dev.openmates.org` |
|
|
19
|
+
| Self-hosted | `OPENMATES_API_URL=https://api.example.com OPENMATES_APP_URL=https://example.com` |
|
|
20
|
+
|
|
21
|
+
## CLI Commands
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
openmates login
|
|
25
|
+
openmates whoami --json
|
|
26
|
+
openmates chats list
|
|
27
|
+
openmates chats new "Hello"
|
|
28
|
+
openmates chats send --chat <chat-id> "continue"
|
|
29
|
+
openmates apps list --api-key <key>
|
|
30
|
+
openmates apps ai ask "What is Docker?" --api-key <key>
|
|
31
|
+
openmates settings get /v1/settings/export-account-data --json
|
|
32
|
+
openmates settings memories list --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Safety Limits
|
|
36
|
+
|
|
37
|
+
The CLI intentionally blocks endpoint writes for:
|
|
38
|
+
|
|
39
|
+
- API key creation
|
|
40
|
+
- Password setup/update
|
|
41
|
+
- 2FA setup/provider changes
|
|
42
|
+
|
|
43
|
+
See `src/client.ts` (`BLOCKED_SETTINGS_POST_PATHS`).
|
|
44
|
+
|
|
45
|
+
## SDK
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { OpenMatesClient } from "openmates";
|
|
49
|
+
|
|
50
|
+
const client = OpenMatesClient.load();
|
|
51
|
+
```
|