openmates 0.12.1 → 0.14.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 +34 -5
- package/dist/{chunk-PHFCP5AM.js → chunk-QJ53DGI6.js} +5682 -558
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +3441 -1
- package/dist/index.js +4596 -2
- package/package.json +10 -3
- package/templates/caddy/core/Caddyfile +23 -0
- package/templates/caddy/preview/Caddyfile +28 -0
- package/templates/caddy/upload/Caddyfile +32 -0
- package/templates/core/docker-compose.selfhost.yml +269 -0
- package/templates/preview/docker-compose.preview.yml +48 -0
- package/templates/upload/docker-compose.yml +83 -0
package/README.md
CHANGED
|
@@ -6,10 +6,12 @@ Terminal CLI and Node.js SDK for OpenMates. Use it to pair-login, create or cont
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g openmates
|
|
9
|
-
openmates
|
|
9
|
+
openmates
|
|
10
10
|
openmates login
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Run plain `openmates` in an interactive terminal to open the full-screen chat UI. Use `/examples` to browse public example chats, type into any example to continue it as a new real or anonymous chat, `/login` for pair-auth, `/signup` for guided account creation, and `/embed <id>` to jump to full embed details. If stdin or stdout is redirected, plain `openmates` prints a script-friendly quickstart instead of entering the TUI.
|
|
14
|
+
|
|
13
15
|
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
16
|
|
|
15
17
|
## First Commands
|
|
@@ -19,7 +21,9 @@ openmates whoami --json
|
|
|
19
21
|
openmates chats list
|
|
20
22
|
openmates chats show example-gigantic-airplanes
|
|
21
23
|
openmates chats new "Help me plan my day"
|
|
24
|
+
openmates chats new "Review @./src/app.ts"
|
|
22
25
|
openmates chats send --chat <chat-id> "continue"
|
|
26
|
+
openmates embeds show <embed-id>
|
|
23
27
|
openmates apps list
|
|
24
28
|
openmates apps ai ask "What is Docker?"
|
|
25
29
|
openmates apps code run --language python --code 'print("Hello")'
|
|
@@ -27,6 +31,7 @@ openmates settings account export data --json
|
|
|
27
31
|
openmates learning-mode status --json
|
|
28
32
|
openmates settings memories list --json
|
|
29
33
|
openmates docs list
|
|
34
|
+
openmates remote-access start --path ./my-repo --source-id repo-1 --local-only
|
|
30
35
|
openmates benchmark model google/gemini-3.5-flash --dry-run --json
|
|
31
36
|
openmates server install
|
|
32
37
|
```
|
|
@@ -50,13 +55,37 @@ After `openmates server install`, fresh CLI commands default to that self-hosted
|
|
|
50
55
|
|
|
51
56
|
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`.
|
|
52
57
|
|
|
58
|
+
`openmates remote-access` is a local Project source bridge. It stores source metadata under `~/.openmates/remote-sources.json`, searches with `rg` inside the approved source root, and does not upload repository files by default.
|
|
59
|
+
|
|
53
60
|
## SDK
|
|
54
61
|
|
|
62
|
+
The package also exports a lazy API-key SDK. Create an API key in OpenMates under Settings > Developers > API Keys, then set `OPENMATES_API_KEY` or pass `apiKey` explicitly. New SDK devices must be approved in Settings > Developers > Devices before API-key calls are allowed.
|
|
63
|
+
|
|
55
64
|
```ts
|
|
56
|
-
import {
|
|
65
|
+
import { OpenMates } from "openmates";
|
|
57
66
|
|
|
58
|
-
const
|
|
59
|
-
|
|
67
|
+
const om = new OpenMates({ apiKey: process.env.OPENMATES_API_KEY });
|
|
68
|
+
|
|
69
|
+
const search = await om.apps.web.search({
|
|
70
|
+
requests: [{ query: "OpenMates SDK examples" }],
|
|
71
|
+
});
|
|
60
72
|
```
|
|
61
73
|
|
|
62
|
-
|
|
74
|
+
SDK methods authenticate lazily; there is no `connect()` call.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const latestChats = await om.chats.list(); // defaults to 10
|
|
78
|
+
const allChats = await om.chats.list({ limit: 0 });
|
|
79
|
+
|
|
80
|
+
await om.chats.send("Summarize this release note draft.");
|
|
81
|
+
|
|
82
|
+
await om.chats.send("Create a project kickoff checklist.", { saveToAccount: true });
|
|
83
|
+
|
|
84
|
+
await om.billing.overview();
|
|
85
|
+
await om.billing.invoices();
|
|
86
|
+
await om.docs.search("api keys");
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
New SDK chats are non-persistent by default. Use `saveToAccount: true` only when you intentionally want the chat saved to the OpenMates account.
|
|
90
|
+
|
|
91
|
+
Source docs: `docs/user-guide/developers/sdk.md` in the OpenMates repository.
|