@moreai/code 0.0.0-stage → 0.1.0-beta.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.
Files changed (41) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +336 -2
  3. package/dist/THIRD_PARTY_LICENSES.txt +7412 -0
  4. package/dist/daemon.mjs +3791 -0
  5. package/dist/locales/am.json +1185 -0
  6. package/dist/locales/bho.json +1185 -0
  7. package/dist/locales/bn.json +1185 -0
  8. package/dist/locales/da.json +1185 -0
  9. package/dist/locales/de.json +1185 -0
  10. package/dist/locales/es-419.json +1187 -0
  11. package/dist/locales/es.json +1187 -0
  12. package/dist/locales/fi.json +1185 -0
  13. package/dist/locales/fil.json +1185 -0
  14. package/dist/locales/fr.json +1187 -0
  15. package/dist/locales/gu.json +1185 -0
  16. package/dist/locales/ha.json +1185 -0
  17. package/dist/locales/hi.json +1185 -0
  18. package/dist/locales/id.json +1149 -0
  19. package/dist/locales/it.json +1187 -0
  20. package/dist/locales/ja.json +1149 -0
  21. package/dist/locales/kn.json +1185 -0
  22. package/dist/locales/ko.json +1149 -0
  23. package/dist/locales/ml.json +1185 -0
  24. package/dist/locales/mr.json +1185 -0
  25. package/dist/locales/nb.json +1185 -0
  26. package/dist/locales/nl.json +1185 -0
  27. package/dist/locales/pt-BR.json +1187 -0
  28. package/dist/locales/ru.json +1261 -0
  29. package/dist/locales/sv.json +1185 -0
  30. package/dist/locales/sw.json +1185 -0
  31. package/dist/locales/ta.json +1185 -0
  32. package/dist/locales/te.json +1185 -0
  33. package/dist/locales/th.json +1149 -0
  34. package/dist/locales/tr.json +1185 -0
  35. package/dist/locales/uk.json +1261 -0
  36. package/dist/locales/vi.json +1149 -0
  37. package/dist/locales/zh-TW.json +1148 -0
  38. package/dist/locales/zh.json +1148 -0
  39. package/dist/moreai.mjs +504 -0
  40. package/dist/resources/file-acl/macos/moreai-file-acl +0 -0
  41. package/package.json +63 -4
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ More AI Code
2
+ Copyright (c) 2026 More AI. All rights reserved.
3
+
4
+ This software is proprietary. It is licensed, not sold.
5
+
6
+ You may install the published package and use it to run More AI Code for your
7
+ own work, subject to the More AI Terms of Service (https://more-ai.net/terms).
8
+
9
+ You may not, except to the extent applicable law expressly permits it despite
10
+ this restriction:
11
+ - copy, modify, merge, publish, distribute, sublicense or sell the software
12
+ or any part of it;
13
+ - reverse engineer, decompile, disassemble or otherwise attempt to derive
14
+ its source code, or extract its prompts, policies or other components for
15
+ use outside More AI Code;
16
+ - remove or alter this notice.
17
+
18
+ Third-party components bundled with the software are distributed under their
19
+ own licenses, reproduced in THIRD_PARTY_LICENSES.txt; those licenses govern
20
+ those components only.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,337 @@
1
- # Temporary Holding Version
1
+ # More AI Code (`moreai`)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A terminal coding agent that runs on its own. The desktop app is optional: the CLI
4
+ starts a bundled local engine when no More AI app is running.
5
+
6
+ ## Install the preview
7
+
8
+ Requires Node.js 22 or newer on macOS, Linux or Windows.
9
+
10
+ ```sh
11
+ npm install -g @moreai/code@beta
12
+ moreai setup
13
+ cd your-project
14
+ moreai
15
+ ```
16
+
17
+ The `beta` tag follows preview releases. To check for a new version and update
18
+ the global installation:
19
+
20
+ ```sh
21
+ moreai update
22
+ moreai update --install
23
+ moreai --version
24
+ ```
25
+
26
+ `moreai update` checks the npm release tag and shows the available version;
27
+ `--install` runs the global npm update. You can also update manually with
28
+ `npm install -g @moreai/code@beta`. The CLI checks for updates in the
29
+ interactive session and shows a quiet notice when a new version is available.
30
+
31
+ If you received a packaged `.tgz` archive instead of installing from npm,
32
+ install it with `npm install -g ./moreai-code-<version>.tgz`, then run the same
33
+ `moreai setup` step. The archive includes the headless engine. Tarball installs
34
+ do not receive updates until you install a newer archive or switch to the npm
35
+ `beta` tag.
36
+
37
+ `moreai setup` walks through a More AI account and an AI provider:
38
+
39
+ - **AI provider** gives the agent a model on this computer. Connect an API key,
40
+ a local model (Ollama, LM Studio) or a supported provider subscription
41
+ through `moreai auth`. If a key is already in your environment
42
+ (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, …) the first run offers it at the top
43
+ of the list, and `moreai auth env` connects every one it finds. A More AI
44
+ account is not required to use your own provider.
45
+ - **More AI account** is optional and adds what needs a server: cloud
46
+ sessions that keep working with this computer off (`moreai cloud`), session
47
+ and settings sync, More AI dictation, and Google services (Gmail, Calendar,
48
+ Drive) for the agent. Sign in with your email; approve the request on
49
+ another signed-in device or enter the emailed six-digit code. The account
50
+ session stays in the local engine, never in your shell history.
51
+ - **External services** give the agent tools from a connector, such as an MCP
52
+ server. `moreai connectors` lists the catalog whenever you want one.
53
+
54
+ You can run these steps separately at any time:
55
+
56
+ ```sh
57
+ moreai login # sign in to More AI
58
+ moreai account # show the signed-in account and plan
59
+ moreai logout # sign out; keeps your own provider connections
60
+ moreai auth # connect or change an AI provider
61
+ moreai auth env # connect the provider keys found in the environment
62
+ moreai auth status # list connected providers
63
+ moreai connectors # choose an external service
64
+ moreai connectors list # list connected services
65
+ moreai doctor # check the local engine and setup
66
+ ```
67
+
68
+ When a provider signs in through the browser and you are on a remote machine
69
+ over SSH, the sign-in page cannot reach back to the terminal on its own. The
70
+ wizard prints the `ssh -L` command that forwards the sign-in port, or you can
71
+ paste an API key instead.
72
+
73
+ ### External services from the terminal
74
+
75
+ `moreai connectors` (or `/connectors` in a session) is one searchable list:
76
+ what is connected — Google services from your More AI account (Gmail,
77
+ Calendar, Meet, Tasks, Drive) and MCP servers alike, each with its state —
78
+ then the whole catalog by category. Type to search, **Enter** connects (or
79
+ fixes a connection that needs a new sign-in), **Space** turns a connected
80
+ service on or off, **Ctrl+D** disconnects it (press twice). Google services
81
+ belong to your More AI account, so a service connected on the desktop, the web
82
+ or the phone is already on here. Choosing one while signed out explains why
83
+ the account is needed and opens the sign-in right there; once you are in, the
84
+ connection continues on its own. A service whose sign-in is kept with the
85
+ account can also be connected on this computer only, without one. For a script or SSH
86
+ session, use the commands directly:
87
+
88
+ ```sh
89
+ moreai connectors catalog # show service names and IDs
90
+ moreai connectors add github # connect a listed service
91
+ moreai connectors add https://mcp.example.com/mcp # connect a custom MCP URL
92
+ moreai connectors list # inspect connection IDs and status
93
+ moreai connectors off ID # keep a service but take its tools away
94
+ moreai connectors on ID # turn it back on
95
+ moreai connectors remove ID # disconnect by the ID shown in the list
96
+ ```
97
+
98
+ For a service that needs a token, pipe it to `--token-stdin` so the secret does
99
+ not appear in the command arguments or shell history:
100
+
101
+ ```sh
102
+ printf '%s\n' "$MCP_TOKEN" | moreai connectors add github --token-stdin
103
+ ```
104
+
105
+ Some services open a browser to finish sign-in. `moreai connectors list` shows
106
+ whether each connection is ready. `moreai auth` remains the command for the
107
+ AI model that answers your questions.
108
+
109
+ ### Sign in without an interactive terminal
110
+
111
+ Starting sign-in from a script or SSH session requires an email argument:
112
+
113
+ ```sh
114
+ moreai login you@example.com
115
+ ```
116
+
117
+ If it sends an email code, pipe the **latest** six-digit code to the verification
118
+ command. Piping keeps the code out of process arguments and shell history:
119
+
120
+ ```sh
121
+ printf '%s\n' "$MOREAI_EMAIL_CODE" | moreai login you@example.com --code-stdin
122
+ ```
123
+
124
+ If it returns a push approval challenge, the command prints its ID. Approve the
125
+ matching confirmation code on another device, then run:
126
+
127
+ ```sh
128
+ moreai login --challenge <id> --wait
129
+ ```
130
+
131
+ To use an email code instead, run `moreai login --challenge <id> --fallback`,
132
+ then pipe the code as above. No account token is printed by these commands.
133
+
134
+ ## Work in a project
135
+
136
+ ```sh
137
+ moreai # interactive session in the current folder
138
+ moreai "fix the failing test" # open a session and run a task
139
+ moreai -c # continue the latest session for this folder
140
+ moreai sessions # list this folder's sessions
141
+ moreai -p "add types" # run once, print the result, exit
142
+ git diff | moreai -p "review this diff"
143
+ moreai -p --json "…" # one JSON event per line
144
+ ```
145
+
146
+ | Option | Meaning |
147
+ | --- | --- |
148
+ | `-p, --print` | Run once without the interactive UI |
149
+ | `--json` | With `-p`, output machine-readable event lines |
150
+ | `-c, --continue` | Continue this folder's newest session |
151
+ | `--session <id>` | Resume a specific session |
152
+ | `-m, --model <id>` | Choose a model for this run |
153
+ | `--provider <id>` | Disambiguate the provider for a model |
154
+ | `--mode <mode>` | `plan`, `read-only`, `accept-edits`, `auto`, or `full` |
155
+ | `-C, --cwd <dir>` | Set the working folder |
156
+ | `--cloud` | Run the task in a cloud session instead (see below) |
157
+ | `--finish <how>` | With `--cloud`: `pr`, `push`, `branch` or `folder` |
158
+ | `--detach` | With `--cloud`: start it and return without following |
159
+
160
+ In the session, press **Enter** to send, **Ctrl+J** (or a trailing `\`) for a
161
+ newline, **Esc** to interrupt, and **Shift+Tab** to change access mode. Use
162
+ `/help` to see the available commands. You can type while the agent is working
163
+ to steer its run. The status line shows the model, how much of its context
164
+ window is left (yellow under 25 %, red under 10 %), the branch and the access
165
+ mode.
166
+
167
+ While the agent works, what it reads and searches folds into one
168
+ **Explored** line, edits show as diffs, and its checklist stays above the input.
169
+
170
+ ### Helper agents
171
+
172
+ The agent can split broad research across parallel **helper agents**. Each one
173
+ gets its own line under the step that started it — what it was asked, what it
174
+ is doing now, and when it finishes, its tool count, tokens and time with the
175
+ first line of its report. The run's token total says how much of it the helpers
176
+ spent. Helpers only read; the main agent makes the changes.
177
+
178
+ Start a task with `@explore`, `@scout` or `@general` to hand it to that helper
179
+ directly, even when automatic delegation is off:
180
+
181
+ ```sh
182
+ moreai "@explore how does the billing webhook verify signatures?"
183
+ ```
184
+
185
+ ### Voice input
186
+
187
+ **Ctrl+T** (or `/voice`) records from the microphone: a red dot, a timer and a
188
+ level meter show it is listening. **Enter** or **Ctrl+T** stops and puts the
189
+ text at the cursor — it is not sent, so you can read it first — and **Esc**
190
+ throws the recording away. A recording stops by itself after two minutes.
191
+
192
+ Transcription uses whatever the More AI app's dictation is set to: More AI
193
+ dictation once you `/login`, your own transcription service, or an on-device
194
+ model (Settings → Dictation in the app). The audio is recorded by this terminal,
195
+ so the first time the system asks whether your terminal app may use the
196
+ microphone. If a transcription fails, the recording is kept: **Ctrl+T** tries
197
+ again.
198
+
199
+ To record, `moreai` uses the ffmpeg that comes with the More AI app, or one of
200
+ `ffmpeg`, `sox`, `parecord`, `arecord` on your PATH. `MOREAI_VOICE_RECORDER`
201
+ names any other command that prints raw 16-bit 16 kHz mono audio on stdout
202
+ (arguments separated by spaces).
203
+
204
+ ### Leaving a session
205
+
206
+ **Ctrl+D** on an empty draft, **Ctrl+C** twice or `/quit` ends the session and
207
+ hands the terminal back: the screen is cleared and one line remains with the
208
+ command that resumes the session. Only the visible screen is cleared — what you
209
+ ran before `moreai` stays in the scrollback — and the terminal gets its own
210
+ title back. `MOREAI_KEEP_SCREEN=1` leaves the session on screen instead. A
211
+ crash never clears the screen, so the error stays readable.
212
+
213
+ ### Choosing a model
214
+
215
+ `/model` (or `/models`) opens the model picker: the current model, the models
216
+ you pinned (shared with the desktop app's picker), your recent picks, then every
217
+ connected provider — a large catalog such as OpenRouter grouped by vendor, with
218
+ the context window and price where the provider reports them.
219
+
220
+ - **Type** to search model names, providers and vendors (`sonnet`,
221
+ `or claude` for OpenRouter's Claude models, `anthropic`).
222
+ - **↑ ↓** move, **PgUp PgDn** page, **← →** switch the provider tab.
223
+ - **Enter** uses the model for this session and remembers it as your latest
224
+ pick, so a new session — here or in the desktop app — starts on it.
225
+ - **Ctrl+F** pins or unpins a model; **Ctrl+A** connects another provider;
226
+ **Esc** clears the search, then closes.
227
+
228
+ `/model <text>` switches immediately when the text names exactly one model
229
+ (`/model glm-4.5`, `/model openrouter/anthropic/claude-sonnet-4.6`); anything
230
+ else opens the picker with that search.
231
+
232
+ ### Editing and pasting
233
+
234
+ The input box is a multi-line editor: **↑ ↓** move between lines (and reach your
235
+ history from the first or last line of an empty or recalled draft),
236
+ **Alt+← →** move by word, **Ctrl+A / Ctrl+E** jump to the line start or end,
237
+ **Ctrl+U / Ctrl+K / Ctrl+W** delete. A long draft scrolls inside the box.
238
+
239
+ A large paste (more than 8 lines or 800 characters) becomes a single
240
+ `[Pasted text #1 · 200 lines]` item: **Backspace** removes it whole,
241
+ **Ctrl+O** turns it back into editable text, and the agent receives the full
242
+ text when you send. **Ctrl+C** clears the draft and keeps it in history; **Esc**
243
+ twice clears it too.
244
+
245
+ ### Language
246
+
247
+ The terminal agent speaks the same 35 languages as the desktop app and picks
248
+ one without asking: `--lang` or `MOREAI_LANG` first, then your `/language`
249
+ choice, then the desktop app's language, then the terminal's locale
250
+ (`LC_ALL` / `LANG`) and finally the system language. `/language` lists them all
251
+ (type to search; **Automatic** follows the app and the system), and
252
+ `/language de` switches straight away. Slash commands, flags and key names stay
253
+ in English everywhere, and `--json` output is always English.
254
+
255
+ ```sh
256
+ moreai --lang ja # this run only
257
+ MOREAI_LANG=ru moreai # the same, from the environment
258
+ ```
259
+
260
+ ## Cloud sessions
261
+
262
+ With a More AI account, a task can run in the cloud instead of on this
263
+ computer — it keeps going when you close the laptop, and you can follow it or
264
+ answer it from the web app or your phone.
265
+
266
+ ```sh
267
+ moreai cloud run "add tests for the parser" # move this folder into a cloud session
268
+ moreai --cloud "add tests for the parser" # the same
269
+ moreai cloud # your cloud sessions and their state
270
+ moreai cloud open <id> # the conversation and its link
271
+ moreai cloud finish <id> # bring the work back again
272
+ moreai cloud cancel <id> # stop the running task
273
+ moreai cloud models # models a cloud run can use
274
+ ```
275
+
276
+ `moreai cloud run` packages the folder as it is — your branch, commits and
277
+ uncommitted changes, never files that look like secrets or are larger than
278
+ 25 MB — uploads it and starts the task, then follows it in the terminal: the
279
+ current step, the answer when it is done. **Ctrl+C** stops following; the task
280
+ keeps running (`--detach` returns straight away).
281
+
282
+ When the task finishes, the work comes back on its own as a **new branch**
283
+ `more-ai/<topic>-<id>`; your own branch and uncommitted edits are never
284
+ touched. In a repository on GitHub or GitLab it is then pushed and a pull
285
+ request is opened with your own `gh` / `glab` login; `--finish` chooses
286
+ otherwise: `push`, `branch` (local only) or `folder` (copy the changed files
287
+ into this folder, keeping your edits). The cloud runs on your plan's models,
288
+ or on your own provider key if you uploaded it in the More AI app
289
+ (Settings → Privacy); `-m` picks one of `moreai cloud models`.
290
+
291
+ Inside a session, `/cloud` lists the cloud sessions (Enter shows one) and
292
+ `/cloud <task>` moves the task there.
293
+
294
+ ## Engine and data
295
+
296
+ `moreai doctor` and `/status` name the backend this build talks to. Installed
297
+ packages use production (`api.more-ai.net`); only `MOREAI_ENV=dev`, at build or
298
+ run time, points the CLI and its engine at the test tier, and the session's
299
+ welcome screen then shows a `DEV` badge.
300
+
301
+
302
+ Without the desktop app, `moreai` launches a bundled headless engine on this
303
+ machine. Provider credentials are encrypted with a key kept in the operating
304
+ system's keyring (macOS Keychain, Windows Credential Manager, or the Secret
305
+ Service on Linux — GNOME Keyring or KWallet). A Linux server with no keyring
306
+ service stores them unencrypted in a file only your user can read
307
+ (`~/.config/More AI/secrets.json`), the way most command-line tools keep
308
+ tokens. The CLI and VS Code can connect to the same running engine; sessions
309
+ and settings persist across CLI restarts.
310
+
311
+ If the desktop app is running with **External clients** enabled, the CLI attaches
312
+ to its engine, so sessions appear on both surfaces. If the app is running with
313
+ External clients disabled, enable it in **Settings → Agent tools**, or close the
314
+ app so the CLI can start its own engine. `moreai doctor` reports this condition.
315
+
316
+ ## Usage analytics
317
+
318
+ More AI collects usage analytics to find bugs and see which features work:
319
+ commands you use, errors, and how agent runs go. With AI traces on (the
320
+ default), the content of runs is included too, so failed runs can be debugged.
321
+ API keys are never sent. The first interactive session asks once; you can
322
+ change it at any time:
323
+
324
+ ```sh
325
+ moreai analytics # show the current setting
326
+ moreai analytics usage # analytics without conversation content
327
+ moreai analytics off # turn analytics off
328
+ moreai analytics on # analytics and AI traces
329
+ ```
330
+
331
+ Inside a session, `/analytics` opens the same choice. `DO_NOT_TRACK=1` or
332
+ `MOREAI_TELEMETRY=0` turns analytics off for any process that sees it. The
333
+ setting belongs to this machine's engine, so it is shared with the More AI
334
+ desktop app (Settings → Privacy) when both are installed.
335
+
336
+ © 2026 More AI. All rights reserved. Proprietary software — see `LICENSE`;
337
+ the open-source components it bundles are listed in `THIRD_PARTY_LICENSES.txt`.