openmates 0.11.0-alpha.30 → 0.11.0-alpha.32

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 CHANGED
@@ -1,46 +1,52 @@
1
1
  # openmates
2
2
 
3
- OpenMates npm CLI + SDK (pair-auth login only).
3
+ Terminal CLI and Node.js SDK for OpenMates. Use it to pair-login, create or continue encrypted chats, run app skills, manage safe account settings, browse docs, and administer self-hosted installs.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
8
  npm install -g openmates
9
+ openmates chats list
10
+ openmates login
9
11
  ```
10
12
 
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.
13
+ Without a session, `openmates chats list`, `show`, and `open` display clearly labeled public example chats from the web app. Login uses pair-auth: the CLI shows a QR code or PIN, and you approve it in the web app. To create a new account from the terminal, run `openmates signup`; passwords and recovery secrets are collected through hidden prompts, never command-line flags.
14
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
15
+ ## First Commands
22
16
 
23
17
  ```bash
24
- openmates login
25
18
  openmates whoami --json
26
19
  openmates chats list
27
- openmates chats new "Hello"
20
+ openmates chats show example-gigantic-airplanes
21
+ openmates chats new "Help me plan my day"
28
22
  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
23
+ openmates apps list
24
+ openmates apps ai ask "What is Docker?"
25
+ openmates apps code run --language python --code 'print("Hello")'
26
+ openmates settings account export data --json
32
27
  openmates settings memories list --json
28
+ openmates docs list
29
+ openmates server install
33
30
  ```
34
31
 
35
- ## Safety Limits
32
+ Run `openmates --help` or `openmates <command> --help` for the full command surface.
36
33
 
37
- The CLI intentionally blocks endpoint writes for:
34
+ ## Environments
38
35
 
39
- - API key creation
40
- - Password setup/update
41
- - 2FA setup/provider changes
36
+ The CLI derives the web app URL from the API URL so pair-auth lands on the matching backend.
42
37
 
43
- See `src/client.ts` (`BLOCKED_SETTINGS_POST_PATHS`).
38
+ | Target | Command prefix |
39
+ | --- | --- |
40
+ | Production | _(none)_ |
41
+ | Dev server | `OPENMATES_API_URL=https://api.dev.openmates.org` |
42
+ | Installed self-hosted server | _(none after `openmates server install`)_ |
43
+ | Remote self-hosted server | `OPENMATES_API_URL=https://api.example.com` |
44
+
45
+ After `openmates server install`, fresh CLI commands default to that self-hosted server (`http://localhost:8000`) unless you already have a saved login session, set `OPENMATES_API_URL`, or pass `--api-url <url>`. App-skill execution can use your logged-in session, `--api-key <key>`, or `OPENMATES_API_KEY`.
46
+
47
+ ## Safety Limits
48
+
49
+ Predefined settings commands are supported; raw `settings get/post/patch/delete` passthrough is intentionally unavailable. High-risk or browser-only flows such as passkey management, password changes, API key creation, device approvals, and card checkout stay in the web app. The code-level guard is `BLOCKED_SETTINGS_MUTATE_PATHS` in `src/client.ts`.
44
50
 
45
51
  ## SDK
46
52
 
@@ -48,4 +54,7 @@ See `src/client.ts` (`BLOCKED_SETTINGS_POST_PATHS`).
48
54
  import { OpenMatesClient } from "openmates";
49
55
 
50
56
  const client = OpenMatesClient.load();
57
+ const chats = await client.listChats();
51
58
  ```
59
+
60
+ Source docs: `docs/user-guide/cli/` in the OpenMates repository.