moi-computer 0.9.1-next.5 → 0.10.1-next.0

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 (35) hide show
  1. package/README.md +124 -58
  2. package/client/app/shell/SidebarLayout.tsx +111 -79
  3. package/client/features/chat/ChatEmptyState.tsx +70 -34
  4. package/client/features/chat/ChatPanel.tsx +8 -1
  5. package/client/features/chat/chat-store.ts +4 -0
  6. package/client/features/home/workspace-setup/WorkspaceAgentStep.tsx +22 -5
  7. package/client/features/update/Update.tsx +78 -0
  8. package/client/features/update/api.ts +35 -0
  9. package/client/features/workspace/WorkspaceScreen.tsx +15 -0
  10. package/dist/{chunk-yt2qjn3m.js → chunk-0set7tmf.js} +2 -2
  11. package/dist/chunk-4057kxht.css +1 -0
  12. package/dist/{chunk-te5sfhvx.js → chunk-5t06zksf.js} +2 -2
  13. package/dist/{chunk-9y2zbzqz.js → chunk-97eg9mjn.js} +1 -1
  14. package/dist/chunk-b5c62p8h.js +1 -0
  15. package/dist/chunk-dfe7qnrp.js +1 -0
  16. package/dist/{chunk-0pcdwjkp.js → chunk-efdyz6xp.js} +1 -1
  17. package/dist/chunk-f6xmz3tn.js +83 -0
  18. package/dist/chunk-h2kj1ysj.js +1 -0
  19. package/dist/{chunk-yhj9bg1s.js → chunk-ht1f95h9.js} +2 -2
  20. package/dist/chunk-qtc5a8qa.js +10 -0
  21. package/dist/index.html +1 -1
  22. package/lib/types.ts +9 -0
  23. package/lib/update.ts +2 -0
  24. package/package.json +1 -1
  25. package/server/api.ts +46 -0
  26. package/server/cli.ts +7 -6
  27. package/server/constants.ts +4 -2
  28. package/server/update.ts +293 -5
  29. package/server/web.ts +1 -1
  30. package/dist/chunk-4xmcsjjv.js +0 -1
  31. package/dist/chunk-9m59hf8p.js +0 -10
  32. package/dist/chunk-dfs36zgc.js +0 -1
  33. package/dist/chunk-hffvjnmj.js +0 -85
  34. package/dist/chunk-pq93pv5z.js +0 -1
  35. package/dist/chunk-xtr8kvqx.css +0 -1
package/README.md CHANGED
@@ -9,18 +9,22 @@
9
9
  An extendable visual workspace where your AI agents build their own UI.
10
10
  See [moi.computer](https://moi.computer) for what it is and how it works.
11
11
 
12
- Moi gives your agent of choice a UI it can reshape on the fly and grow into your
12
+ moi gives your agent of choice a UI it can reshape on the fly and grow into your
13
13
  personal software. Under the hood, the agent writes and embeds live components
14
14
  wired to real data: APIs, local files and commands, MCP servers.
15
15
 
16
16
  Works with the harness you already use:
17
17
 
18
- | <img src="assets/harnesses/claude.svg" width="16" /> [Claude Code](https://github.com/anthropics/claude-code) | <img src="assets/harnesses/codex.png" width="16" /> [Codex](https://github.com/openai/codex) |
19
- | :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------- |
20
- | <img src="assets/harnesses/openclaw.svg" width="16" /> [OpenClaw](https://github.com/openclaw/openclaw) | <img src="assets/harnesses/hermes.png" width="16" /> Hermes _(coming soon)_ |
18
+ <p align="center">
19
+ <a href="#claude-code-and-codex"><img src="assets/harnesses/claude.svg" width="16" alt="" /> <strong>Claude Code</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;
20
+ <a href="#claude-code-and-codex"><img src="assets/harnesses/codex.png" width="16" alt="" /> <strong>Codex</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;
21
+ <a href="#openclaw"><img src="assets/harnesses/openclaw.svg" width="16" alt="" /> <strong>OpenClaw</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;
22
+ <a href="#hermes"><img src="assets/harnesses/hermes.png" width="16" alt="" /> <strong>Hermes</strong></a>
23
+ </p>
21
24
 
22
25
  # Features
23
26
 
27
+ - **Bring your own agent**. Connect the agent you already use.
24
28
  - **Workspace**. The folder where your agent (e.g. Claude Code) runs and keeps
25
29
  its data. It gets a special skill that teaches it how to communicate with moi.
26
30
  - **Theme**. The agent can modify the appearance of the workspace for you:
@@ -53,39 +57,130 @@ Works with the harness you already use:
53
57
 
54
58
  # Quick start
55
59
 
56
- Using Claude Code or Codex? Paste this prompt into an existing session and the
57
- agent will set everything up for you:
60
+ Make sure [Bun](https://bun.sh) 1.3 or newer is installed. moi uses it to run the web server and bundle the dynamic UI.
61
+
62
+ Install the `moi-computer` package from npm and start the web UI:
63
+
64
+ ```sh
65
+ bun i -g moi-computer
66
+ moi start # http://localhost:13337
67
+ ```
68
+
69
+ Then connect your agent: [Claude Code and Codex](#claude-code-and-codex),
70
+ [OpenClaw](#openclaw), or [Hermes](#hermes).
71
+
72
+ Learn how to:
73
+
74
+ - [Run moi as a service](#run-moi-as-a-service)
75
+ - [Update moi](#update-moi)
76
+
77
+ # How it works
78
+
79
+ moi runs locally as a CLI and web UI connected to your agent. The workspace
80
+ skill teaches the agent how to call the CLI, which updates the UI using your
81
+ files, commands, APIs, and MCP servers.
82
+
83
+ The core is `moi` command that both agent and you can use to modify the workspace.
84
+ Everything gets propagated to the UI instantly.
85
+
86
+ ```mermaid
87
+ %%{init: {"theme": "base", "themeVariables": {"primaryColor": "#ffffff", "primaryTextColor": "#111111", "primaryBorderColor": "#111111", "lineColor": "#737373", "edgeLabelBackground": "#ffffff"}}}%%
88
+ flowchart LR
89
+ Agent["Your agent, e.g. Claude Code"] -->|"uses moi skill"| CLI["moi CLI"]
90
+ CLI -->|"updates"| UI["UI"]
91
+ ```
92
+
93
+ Moi also stores the all widgets and views as code to keep the workspace filesystem
94
+ as a source of truth.
95
+
96
+ Updates installed from the UI restart moi and reload the browser automatically.
97
+ The app checks npm at most once an hour while it is open, retrying in five
98
+ minutes if the registry could not be reached; a closed app makes no network
99
+ calls of its own.
100
+
101
+ # Connect an agent
102
+
103
+ A workspace is the folder where your agent runs and stores its data. moi adds
104
+ a `.moi/` folder and the skills the agent needs to work with the UI.
105
+
106
+ You can connect a workspace in either of these ways:
107
+
108
+ - Open [http://localhost:13337](http://localhost:13337) and create a workspace
109
+ or import one that moi found on your computer.
110
+ - Run `moi init` in a folder. moi detects the harness from the folder's Hermes
111
+ profile, OpenClaw agent, or Claude Code or Codex history. If detection is
112
+ ambiguous, it asks you to choose a harness.
113
+
114
+ ## Claude Code and Codex
115
+
116
+ Open Claude Code or Codex in your project folder and paste this prompt:
58
117
 
59
118
  ```
60
119
  Set up the moi workspace for this project. Fetch https://moi.computer/INSTALL.md, and follow the steps.
61
120
  ```
62
121
 
63
- For OpenClaw or a manual setup, read on.
122
+ To set it up manually, run:
64
123
 
65
- ## Manual install
124
+ ```sh
125
+ moi init --harness=claude-code # or --harness=codex
126
+ moi start # or run moi as a service
127
+ ```
66
128
 
67
- Make sure [Bun](https://bun.sh) 1.3 or newer is installed. moi uses it to run the web server and bundle the dynamic UI.
129
+ The project folder becomes the workspace. You can create as many workspaces as
130
+ you need.
68
131
 
69
- Install the `moi-computer` package from npm and start the web UI:
132
+ ## OpenClaw
133
+
134
+ [OpenClaw](https://openclaw.ai/) is a self-hosted harness for running one or
135
+ more always-on agents. Its channels connect agents to Slack and other
136
+ messaging services.
137
+
138
+ moi connects each OpenClaw agent to one workspace. See the
139
+ [OpenClaw documentation](https://docs.openclaw.ai/cli/agents) to add or manage
140
+ agents.
141
+
142
+ Run `moi openclaw init` to connect your agent. If moi finds more than one, it
143
+ lists them so you can rerun the command with the agent you want:
70
144
 
71
145
  ```sh
72
- bun i -g moi-computer
73
- moi start # http://localhost:13337
146
+ moi openclaw init
147
+ moi openclaw init <agent> # only needed when you have multiple agents
148
+ moi start # or run moi as a service
74
149
  ```
75
150
 
76
- Then bring in your project, either way works:
151
+ Your agent's workspace will show up at `http://localhost:13337`.
152
+
153
+ ## Hermes
154
+
155
+ [Hermes](https://hermes-agent.nousresearch.com/) is a self-hosted personal
156
+ agent from Nous Research.
157
+
158
+ moi connects each Hermes profile to one workspace. A profile is a separate
159
+ agent identity with its own model, keys, persona, skills, and memories.
160
+
161
+ Run `moi hermes init` to connect your profile. If moi finds more than one, it
162
+ lists them so you can rerun the command with the profile you want:
163
+
164
+ ```sh
165
+ moi hermes init
166
+ moi hermes init <profile> # only needed when you have multiple profiles
167
+ moi start # or run moi as a service
168
+ ```
169
+
170
+ The profile's workspace appears at `http://localhost:13337`. To add another,
171
+ create it with `hermes profile create <name>`, then run `moi hermes init` again.
172
+
173
+ moi connects to Hermes through its built-in
174
+ [Agent Client Protocol](https://agentclientprotocol.com/) server. It starts a
175
+ `hermes -p <profile> acp` process and communicates over stdio, so there is no
176
+ gateway, port, or additional API key to configure.
77
177
 
78
- - open [http://localhost:13337](http://localhost:13337) and create a workspace
79
- (or import one moi found on this computer) right from the web UI;
80
- - or run `moi init` inside a folder to turn it into a workspace. It picks the
81
- agent backend up from the folder itself — a Hermes profile, an OpenClaw
82
- agent, or Codex/Claude Code history — and asks for
83
- `--harness=claude-code|codex|hermes|openclaw` when it can't tell.
178
+ # Manage moi
84
179
 
85
- ## Run as a service
180
+ ## Run moi as a service
86
181
 
87
182
  Instead of keeping `moi start` in a terminal, install moi as a user-level
88
- service — it starts on login, restarts on crash, and survives reboots
183
+ service. It starts on login, restarts on crash, and survives reboots
89
184
  (launchd on macOS, a systemd user unit on Linux; no root needed):
90
185
 
91
186
  ```sh
@@ -96,17 +191,15 @@ moi service restart
96
191
  moi service uninstall
97
192
  ```
98
193
 
99
- The service captures a small, fixed slice of your shell environment at
100
- install time: `PATH`, system basics (home, locale, proxies), and moi/agent
101
- vars (`MOI_*`, `ANTHROPIC_*`, `OPENCLAW_*`, `OPENAI_*`, `PUBLIC_*`).
102
- Anything else your agents need belongs in the workspace env (`moi env set`,
103
- `.env`) — or capture it by name: `moi service install --env MY_TOKEN,OTHER`.
194
+ Anything your agents need belongs in the workspace env (`moi env set` or
195
+ `.env`). To capture shell variables instead, run
196
+ `moi service install --env MY_TOKEN,OTHER`.
104
197
  Rerun `moi service install` after changing captured vars (or moving bun). On
105
198
  macOS the first install may show a "background item added" notification for
106
199
  "moi"; that is the moi service. On headless Linux, lingering is enabled
107
200
  automatically when possible so the service outlives your SSH session.
108
201
 
109
- ## Updating
202
+ ## Update moi
110
203
 
111
204
  ```sh
112
205
  moi update # update to the latest release
@@ -116,42 +209,15 @@ moi update --check # only check; exit 0 up to date, 1 update available, 2 che
116
209
  `moi update` checks npm for the latest release and updates through whichever
117
210
  package manager owns the install (bun, npm, pnpm, or yarn). A service-managed
118
211
  server is restarted onto the new version; a foreground `moi start` only gets
119
- a warning — restart it yourself. Prerelease installs (`…-next.N`) are left
212
+ a warning, so restart it yourself. Prerelease installs (`…-next.N`) are left
120
213
  alone. `--check` changes nothing and is made for scripts and agents.
121
214
  `moi status` shows when the running server and CLI versions differ, however
122
215
  the update happened.
123
216
 
124
- ## OpenClaw
125
-
126
- In OpenClaw, moi is installed per _agent workspace_. First, list the agents
127
- you have:
128
-
129
- ```
130
- > openclaw agents
131
-
132
- 🦞 OpenClaw 2026.7.1
133
-
134
- Agents:
135
- - main (default) <-- the agent name you'll pass to moi
136
- Identity: Assistant (IDENTITY.md)
137
- Workspace: ~/.openclaw/workspace
138
- Agent dir: ~/.openclaw/agents/main/agent
139
- Model: openai/gpt-5.6-sol
140
- ```
141
-
142
- Then install the moi skill into an agent's workspace and start the web UI:
143
-
144
- ```sh
145
- moi openclaw init <agent-name>
146
- moi start
147
- ```
148
-
149
- Your agent's workspace will show up at `http://localhost:13337`.
150
-
151
- ## No crypto token
217
+ # No crypto token
152
218
 
153
- moi has **no** cryptocurrency, token, coin, or NFT — official or otherwise —
154
- on any chain, and never will. Any token using the moi name, logo, or the
219
+ moi has **no** cryptocurrency, token, coin, or NFT, official or otherwise, on
220
+ any chain, and never will. Any token using the moi name, logo, or the
155
221
  maintainer's name (on pump.fun, Solana, or anywhere else) is an unauthorized
156
222
  scam with no affiliation to, endorsement from, or benefit to this project.
157
223
  The maintainer will never announce, endorse, or accept proceeds from a token.
@@ -4,8 +4,9 @@ import { IconAlertSquareRoundedFilled, IconPlus, IconSmartHome } from '@tabler/i
4
4
  import { useQueryClient } from '@tanstack/react-query'
5
5
  import { Link, useLocation } from 'wouter'
6
6
 
7
- import { useReorderWorkspaces, useWorkspaces } from '@/client/features/home/api'
8
7
  import { useAppConfig } from '@/client/api/app-config'
8
+ import { useReorderWorkspaces, useWorkspaces } from '@/client/features/home/api'
9
+ import { Update } from '@/client/features/update/Update'
9
10
  import { workspaceKeys } from '@/client/api/workspace-keys'
10
11
  import { useWorkspaceEvent } from '@/client/runtime/useWorkspaceEvents'
11
12
  import { CreateWorkspaceDialog } from '@/client/features/home/workspace-setup/CreateWorkspaceDialog'
@@ -13,6 +14,12 @@ import { DemoDialog } from '@/client/features/home/workspace-setup/DemoDialog'
13
14
  import { ReorderableList } from '@/client/components/shared/ReorderableList'
14
15
  import type { ReorderableRenderState } from '@/client/components/shared/ReorderableList'
15
16
  import { Button, buttonVariants } from '@/client/components/ui/button'
17
+ import {
18
+ Tooltip,
19
+ TooltipContent,
20
+ TooltipProvider,
21
+ TooltipTrigger
22
+ } from '@/client/components/ui/tooltip'
16
23
  import {
17
24
  workspaceDisplayName,
18
25
  workspaceProviderIcon
@@ -68,59 +75,76 @@ function Sidebar({ workspaces }: SidebarProps) {
68
75
  const { cloudDemo } = useAppConfig()
69
76
 
70
77
  return (
71
- <aside className="flex h-full shrink-0 flex-col items-center gap-4 px-2 py-5 [font-family:var(--default-sans)]">
72
- <Link href="/" aria-label="Home" title="Home" className={sidebarNavButtonClass}>
73
- <IconSmartHome stroke={1.5} />
74
- </Link>
75
-
76
- <nav className="flex max-h-full min-h-0 w-14 flex-1 flex-col items-center justify-center gap-4">
77
- {workspaces.length > 0 && (
78
- <>
79
- <div className="no-scrollbar min-h-0 scroll-fade overflow-y-auto [--scroll-fade-reveal:16px]">
80
- <ReorderableList
81
- items={workspaces}
82
- getId={ws => ws.id}
83
- className="flex flex-col gap-4"
84
- onReorder={ids => reorder.mutate(ids)}
85
- renderPlaceholder={() => (
86
- <div className="pointer-events-none absolute top-0 left-1 size-10 rounded-xl bg-accent" />
87
- )}
88
- renderOverlay={ws => <WorkspaceButton workspace={ws} dragOverlay />}
89
- renderItem={(ws, state) => <WorkspaceButton workspace={ws} dragState={state} />}
90
- />
91
- </div>
92
- <div className="shrink-0">
93
- <CreateWorkspaceDialog
94
- trigger={
95
- <Button
96
- type="button"
97
- variant="ghost"
98
- size="icon-lg"
99
- aria-label="Create new workspace"
100
- title="Create new workspace"
101
- className="text-muted-foreground hover:text-foreground"
102
- >
103
- <IconPlus data-icon="inline-start" stroke={1.5} />
104
- </Button>
105
- }
106
- />
107
- </div>
108
- </>
109
- )}
110
- </nav>
111
-
112
- {cloudDemo ? (
113
- <DemoDialog
114
- trigger={
115
- <Button size="icon" aria-label="Unlock all features" title="Unlock all features">
116
- <IconAlertSquareRoundedFilled stroke={1.5} />
117
- </Button>
118
- }
119
- />
120
- ) : (
121
- <div aria-hidden="true" className="size-8 shrink-0" />
122
- )}
123
- </aside>
78
+ <TooltipProvider delay={500}>
79
+ <aside className="flex h-full shrink-0 flex-col items-center gap-4 px-2 py-5 [font-family:var(--default-sans)]">
80
+ <Tooltip>
81
+ <TooltipTrigger
82
+ render={
83
+ <Link href="/" aria-label="Home" className={sidebarNavButtonClass}>
84
+ <IconSmartHome stroke={1.5} />
85
+ </Link>
86
+ }
87
+ />
88
+ <TooltipContent side="right">Home</TooltipContent>
89
+ </Tooltip>
90
+
91
+ <nav className="flex max-h-full min-h-0 w-14 flex-1 flex-col items-center justify-center gap-4">
92
+ {workspaces.length > 0 && (
93
+ <>
94
+ <div className="no-scrollbar min-h-0 scroll-fade overflow-y-auto [--scroll-fade-reveal:16px]">
95
+ <ReorderableList
96
+ items={workspaces}
97
+ getId={ws => ws.id}
98
+ className="flex flex-col gap-4"
99
+ onReorder={ids => reorder.mutate(ids)}
100
+ renderPlaceholder={() => (
101
+ <div className="pointer-events-none absolute top-0 left-1 size-10 rounded-xl bg-accent" />
102
+ )}
103
+ renderOverlay={ws => <WorkspaceButton workspace={ws} dragOverlay />}
104
+ renderItem={(ws, state) => <WorkspaceButton workspace={ws} dragState={state} />}
105
+ />
106
+ </div>
107
+ <div className="shrink-0">
108
+ <Tooltip>
109
+ <CreateWorkspaceDialog
110
+ trigger={
111
+ <TooltipTrigger
112
+ render={
113
+ <Button
114
+ type="button"
115
+ variant="ghost"
116
+ size="icon-lg"
117
+ aria-label="Create new workspace"
118
+ className="text-muted-foreground hover:text-foreground"
119
+ >
120
+ <IconPlus data-icon="inline-start" stroke={1.5} />
121
+ </Button>
122
+ }
123
+ />
124
+ }
125
+ />
126
+ <TooltipContent side="right">Create new workspace</TooltipContent>
127
+ </Tooltip>
128
+ </div>
129
+ </>
130
+ )}
131
+ </nav>
132
+
133
+ <div className="size-8 shrink-0">
134
+ {cloudDemo ? (
135
+ <DemoDialog
136
+ trigger={
137
+ <Button size="icon" aria-label="Unlock all features" title="Unlock all features">
138
+ <IconAlertSquareRoundedFilled stroke={1.5} />
139
+ </Button>
140
+ }
141
+ />
142
+ ) : (
143
+ <Update />
144
+ )}
145
+ </div>
146
+ </aside>
147
+ </TooltipProvider>
124
148
  )
125
149
  }
126
150
 
@@ -138,39 +162,43 @@ function WorkspaceButton({ workspace, dragOverlay = false, dragState }: Workspac
138
162
  // rail matches the workspace segment, not the whole path. The trailing slash
139
163
  // keeps `/workspace/ws1` from lighting up a sibling `/workspace/ws1-other`.
140
164
  const active = location === href || location.startsWith(`${href}/`)
141
- const content = (
142
- <>
143
- <div
144
- className={cn(
145
- buttonVariants({ variant: 'ghost', size: 'icon-lg' }),
146
- 'pointer-events-none size-12',
147
- dragOverlay
148
- ? 'bg-background shadow-lg'
149
- : 'group-hover:bg-accent group-hover:text-accent-foreground group-focus-visible:ring-3 group-focus-visible:ring-ring/50',
150
- active && !dragOverlay && 'bg-accent text-accent-foreground'
151
- )}
152
- >
153
- <img
154
- src={workspace.icon ?? workspaceProviderIcon[workspace.type ?? 'claude-code']}
155
- alt=""
156
- className="size-7 shrink-0 rounded-xs"
157
- />
158
- </div>
159
- <span className="mt-0.5 line-clamp-2 w-full text-center text-[11px] leading-snug font-medium text-ellipsis text-foreground">
160
- {label}
161
- </span>
162
- </>
165
+ const icon = (
166
+ <div
167
+ className={cn(
168
+ buttonVariants({ variant: 'ghost', size: 'icon-lg' }),
169
+ 'pointer-events-none size-12',
170
+ dragOverlay
171
+ ? 'bg-background shadow-lg'
172
+ : 'group-hover:bg-accent group-hover:text-accent-foreground group-focus-visible:ring-3 group-focus-visible:ring-ring/50',
173
+ active && !dragOverlay && 'bg-accent text-accent-foreground'
174
+ )}
175
+ >
176
+ <img
177
+ src={workspace.icon ?? workspaceProviderIcon[workspace.type ?? 'claude-code']}
178
+ alt=""
179
+ className="size-7 shrink-0 rounded-xs"
180
+ />
181
+ </div>
182
+ )
183
+ const labelElement = (
184
+ <span className="mt-0.5 line-clamp-2 w-full text-center text-[11px] leading-snug font-medium text-ellipsis text-foreground">
185
+ {label}
186
+ </span>
163
187
  )
164
188
 
165
189
  if (dragOverlay) {
166
- return <span className="flex w-14 flex-col items-center">{content}</span>
190
+ return (
191
+ <span className="flex w-14 flex-col items-center">
192
+ {icon}
193
+ {labelElement}
194
+ </span>
195
+ )
167
196
  }
168
197
 
169
198
  return (
170
199
  <Link
171
200
  href={href}
172
201
  aria-label={label}
173
- title={label}
174
202
  onClick={event => {
175
203
  if (dragState?.isDragging) event.preventDefault()
176
204
  }}
@@ -180,7 +208,11 @@ function WorkspaceButton({ workspace, dragOverlay = false, dragState }: Workspac
180
208
  )}
181
209
  {...dragState?.dragHandleProps}
182
210
  >
183
- {content}
211
+ {icon}
212
+ <Tooltip>
213
+ <TooltipTrigger render={labelElement} />
214
+ <TooltipContent side="right">{label}</TooltipContent>
215
+ </Tooltip>
184
216
  </Link>
185
217
  )
186
218
  }