@getoatmilk/cli 0.3.5 → 0.3.7

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.
Files changed (3) hide show
  1. package/README.md +43 -8
  2. package/dist/oatmilk.js +227 -213
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -22,17 +22,32 @@ GitHub release also has standalone binaries for macOS, Linux and Windows that do
22
22
  checksums.
23
23
 
24
24
  `oatmilk update` installs the newest version the way oatmilk was installed. When one is out, the app shows `↑ 0.3.0 ⌃U`
25
- at the top right; `⌃U` installs it. `oatmilk update auto|notify|off` chooses whether it updates by itself.
25
+ at the top right; `⌃U` installs it. `oatmilk update auto|notify|off` chooses whether it updates by itself. The app
26
+ doesn't look by itself when everything runs on this computer, and never with `--offline`.
26
27
 
27
28
  ## First run
28
29
 
29
30
  The first time you run `oatmilk`, it asks one question: how you want to use Oatmilk.
30
31
 
32
+ After sign-in, review **Models and data** for your workspace, one step at a time. People upgrading an already
33
+ signed-in CLI also see this review. You can choose an existing company, create one, or open a personal workspace.
34
+ Administrators choose shared AI defaults and the data-placement plan. Each computer keeps its own local model
35
+ connection. The screen shows **Books** and **AI** separately, so local AI with online books is clear.
36
+
37
+ Press **Ctrl+K** and search for `local`, `models`, `offline` or `setup` to find these settings. Use `oatmilk settings`
38
+ for a text readout or `oatmilk settings setup` to review them again. A local-only model choice stops when that model
39
+ is unavailable; it never falls back to an online model. Chat titles come from the first message without an AI call.
40
+
41
+ To move existing data, sign in to both installations and run `oatmilk migrate plan --to <host> --to-org <id>`.
42
+ The job copies and verifies records and files before cutover, and can resume after an interruption. Changing a
43
+ setting alone keeps the books where they are. The source copy is retained until you separately close it.
44
+
31
45
  | Choice | What it does |
32
46
  | --- | --- |
33
- | **Sign in to Oatmilk** | Your account at getoatmilk.com, nothing to install. When Ollama or LM Studio runs a model that calls tools, it offers to run Ask AI on it, so your questions stay on this computer while your books stay in Oatmilk. |
34
- | **Keep everything on this computer** | Your account, books, files and every model here, with no sign-up. Needs Docker; the first start takes about 10 minutes. |
35
- | **More options** | Choose for each part (sign-in, books, files, Ask AI and agents, classifiers, reading documents, email, web research: here, in the cloud, or off), your own cloud services with AI here, or an Oatmilk your team runs. |
47
+ | **Sign in to Oatmilk** | Use your Oatmilk account. Nothing to install. When Ollama or LM Studio runs a model that calls tools, it offers to run Ask AI on it, so your questions stay on this computer while your books stay in Oatmilk Cloud. |
48
+ | **Make an Oatmilk account** | New here? Make one in your browser, then come back and sign in. You may wait on a short waitlist; the app says so, and `r` checks again. |
49
+ | **Keep everything on this computer** | No account needed. Needs Docker, Bun and Ollama or LM Studio; the first start takes about 10 minutes. Setup checks for them before it asks anything, and `⌃C` stops it. |
50
+ | **More options** | Choose for each part (sign-in, books, files, Ask AI and agents, classifiers, reading documents, email, web research: here, with your own cloud services, or off), your own cloud services with AI here, or an Oatmilk your team runs. |
36
51
 
37
52
  Every step shows where you are (`2/5`), and the setup says how local it is in words (`85% local`). For the local
38
53
  choices, setup finds Ollama or LM Studio, picks models that fit (a chat model that calls tools and reads images, and a
@@ -52,16 +67,32 @@ oatmilk models # Ollama and LM Studio here, and
52
67
  oatmilk models test | pull tev1 | use --models lmstudio --restart
53
68
  ```
54
69
 
55
- Running it locally needs Docker and [Bun](https://bun.sh), and Oatmilk's source: setup uses the checkout you're in, or
56
- downloads one with git. Cloud keys for a mix (Clerk, PostgreSQL, S3, AI Gateway, Resend, Tavily) are asked for in the
70
+ Running it locally needs Docker and [Bun](https://bun.sh), and Oatmilk's source: setup uses the checkout you're in (or
71
+ `--source <folder>`), or downloads one with git. Cloud keys for a mix (Clerk, PostgreSQL, S3, AI Gateway, Resend, Tavily) are asked for in the
57
72
  setup screens, or read from the environment with `--yes`. They're kept only in the local Oatmilk's own settings file.
58
73
 
74
+ ## Send email
75
+
76
+ Oatmilk Cloud sends its own email. An Oatmilk you run sends it with [Resend](https://resend.com): make an API key at
77
+ resend.com/api-keys and verify the domain you send from at resend.com/domains, then:
78
+
79
+ ```sh
80
+ oatmilk email use resend --from mail.example.com # paste the key when asked; it never shows on screen
81
+ oatmilk email test you@example.com # send a test and wait to see it leave
82
+ oatmilk email # who sends it, from where, and the last email
83
+ oatmilk email off # stop sending (the saved key goes too)
84
+ ```
85
+
86
+ The key is kept only in that Oatmilk's settings file. On a server set up with `bun run self-host setup`, run it in the
87
+ Oatmilk folder there, or pass `--source <folder>`.
88
+
59
89
  ## Sign in
60
90
 
61
91
  ```sh
92
+ oatmilk signup # no account yet: make one in your browser, then sign in here (or: login --new)
62
93
  oatmilk login # opens your browser; approve, then come back to the terminal
63
94
  oatmilk login --device # SSH or no browser: sign in on any device, paste back the code
64
- oatmilk login --api-key # paste an API key from Settings › Developer (or pipe it in)
95
+ oatmilk login --api-key # paste an API key from Developers › API keys (or pipe it in)
65
96
  oatmilk whoami # who, which company, which permissions
66
97
  oatmilk orgs use "Contoso" # switch company
67
98
  oatmilk login --password # an account on your own Oatmilk, with its email and password
@@ -71,6 +102,10 @@ oatmilk logout # sign out and revoke the token
71
102
  On an Oatmilk that setup made on this computer, the terminal signs itself in with the account's saved password.
72
103
  `oatmilk logout` forgets that password too, so you stay signed out until `oatmilk login --password`.
73
104
 
105
+ Oatmilk Cloud may put a new account on a short waitlist. Until you're in, `oatmilk login` keeps you signed in and says
106
+ you're on the waitlist (or gives you the form at `https://app.getoatmilk.com/join` to ask for access), and the app
107
+ shows the same with `r` to check again.
108
+
74
109
  Browser sign-in is the same OAuth flow AI apps use for Oatmilk's MCP server: the CLI registers itself once, signs in
75
110
  with PKCE through a one-time redirect to `localhost`. Your role in each company still decides what you can do. Tokens
76
111
  refresh on their own. They are saved in `~/.config/oatmilk/credentials.json` (`%APPDATA%\oatmilk` on Windows), readable only by
@@ -206,7 +241,7 @@ claude mcp add oatmilk -- npx -y @getoatmilk/cli mcp
206
241
  | --- | --- |
207
242
  | `--local` | Use the Oatmilk on this computer, starting it if it's stopped. |
208
243
  | `--cloud` | Use Oatmilk Cloud. |
209
- | `--offline`, `OATMILK_OFFLINE=1` | Refuse any Oatmilk on the internet: only this computer and its network. |
244
+ | `--offline`, `OATMILK_OFFLINE=1` | Refuse any Oatmilk on the internet: only this computer and its network. No update checks either. |
210
245
  | `--setup`, `--no-setup` | Show the first-run setup again, or never. |
211
246
  | `--no-start` | Don't start a stopped local Oatmilk. |
212
247
  | `--no-ai` | The app without Ask AI; `exec` refuses to run. |