overmux 0.0.4 → 0.0.6
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/CHANGELOG.md +43 -0
- package/README.md +16 -2
- package/dist/bin.js +140 -127
- package/dist/bin.js.map +1 -1
- package/dist/docs/000-index.md +2 -4
- package/dist/docs/100-introduction/200-how-overmux-works.md +126 -2
- package/dist/docs/100-introduction/{300-why-overmux.md → 300-why-i-built-overmux.md} +1 -1
- package/dist/docs/200-getting-started/100-install-and-run-overmux.md +2 -2
- package/dist/docs/200-getting-started/400-secure-with-https/200-tailscale-serve.md +3 -3
- package/dist/docs/200-getting-started/400-secure-with-https/300-cloudflare-tunnel.md +2 -2
- package/dist/docs/200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md +2 -2
- package/dist/docs/200-getting-started/500-set-up-overmux-with-packages.md +42 -0
- package/dist/docs/400-reference/100-project-structure.md +83 -0
- package/dist/docs/400-reference/200-configuration.md +257 -0
- package/dist/docs/400-reference/300-storage-locations.md +46 -0
- package/dist/docs/400-reference/400-authentication-and-security.md +37 -0
- package/dist/docs/400-reference/500-server/000-index.md +13 -0
- package/dist/docs/400-reference/500-server/100-resources.md +191 -0
- package/dist/docs/400-reference/500-server/200-operations.md +111 -0
- package/dist/docs/400-reference/500-server/300-streams.md +140 -0
- package/dist/docs/400-reference/500-server/400-notifications.md +32 -0
- package/dist/docs/400-reference/500-server/500-api.md +118 -0
- package/dist/docs/400-reference/600-client/000-index.md +9 -0
- package/dist/docs/400-reference/600-client/005-setting-up-your-ui.md +137 -0
- package/dist/docs/400-reference/600-client/007-deep-links.md +87 -0
- package/dist/docs/400-reference/600-client/010-commands.md +189 -0
- package/dist/docs/400-reference/600-client/020-shortcuts.md +171 -0
- package/dist/docs/400-reference/600-client/100-api.md +370 -0
- package/dist/docs/400-reference/600-client/200-theming.md +209 -0
- package/dist/docs/400-reference/600-client/300-tech-stack-recommendations.md +12 -0
- package/dist/docs/400-reference/{400-cli → 700-cli}/050-init.md +2 -4
- package/{docs/400-reference/400-cli → dist/docs/400-reference/700-cli}/100-serve.md +9 -4
- package/{docs/400-reference/400-cli → dist/docs/400-reference/700-cli}/200-auth.md +1 -4
- package/dist/docs/400-reference/{400-cli → 700-cli}/300-call.md +1 -4
- package/dist/docs/400-reference/{400-cli → 700-cli}/350-instance.md +1 -4
- package/dist/docs/400-reference/700-cli/600-docs.md +128 -0
- package/dist/docs/400-reference/{400-cli → 700-cli}/700-desktop.md +1 -3
- package/dist/docs/500-hosted-pages.md +0 -1
- package/dist/exports/client.d.ts +5 -14
- package/dist/exports/client.d.ts.map +1 -1
- package/dist/exports/client.js +141 -46
- package/dist/exports/client.js.map +1 -1
- package/dist/exports/{index-DS70rKzo.d.ts → index-Cz3xkCa4.d.ts} +50 -36
- package/dist/exports/index-Cz3xkCa4.d.ts.map +1 -0
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.js +19 -5
- package/dist/exports/index.js.map +1 -1
- package/dist/exports/{notifications-av0FK0yZ.js → notifications-BFAD3QQl.js} +29 -4
- package/dist/exports/notifications-BFAD3QQl.js.map +1 -0
- package/dist/exports/server.d.ts +1 -44
- package/dist/exports/server.d.ts.map +1 -1
- package/dist/exports/server.js +9 -1061
- package/dist/exports/server.js.map +1 -1
- package/dist/internal/server/coordinator/server-child.js +47 -43
- package/dist/internal/server/coordinator/server-child.js.map +1 -1
- package/docs/000-index.md +2 -4
- package/docs/100-introduction/200-how-overmux-works.md +126 -2
- package/docs/100-introduction/{300-why-overmux.md → 300-why-i-built-overmux.md} +1 -1
- package/docs/200-getting-started/100-install-and-run-overmux.md +2 -2
- package/docs/200-getting-started/400-secure-with-https/200-tailscale-serve.md +3 -3
- package/docs/200-getting-started/400-secure-with-https/300-cloudflare-tunnel.md +2 -2
- package/docs/200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md +2 -2
- package/docs/200-getting-started/500-set-up-overmux-with-packages.md +42 -0
- package/docs/400-reference/100-project-structure.md +83 -0
- package/docs/400-reference/200-configuration.md +257 -0
- package/docs/400-reference/300-storage-locations.md +46 -0
- package/docs/400-reference/400-authentication-and-security.md +37 -0
- package/docs/400-reference/500-server/000-index.md +13 -0
- package/docs/400-reference/500-server/100-resources.md +191 -0
- package/docs/400-reference/500-server/200-operations.md +111 -0
- package/docs/400-reference/500-server/300-streams.md +140 -0
- package/docs/400-reference/500-server/400-notifications.md +32 -0
- package/docs/400-reference/500-server/500-api.md +118 -0
- package/docs/400-reference/600-client/000-index.md +9 -0
- package/docs/400-reference/600-client/005-setting-up-your-ui.md +137 -0
- package/docs/400-reference/600-client/007-deep-links.md +87 -0
- package/docs/400-reference/600-client/010-commands.md +189 -0
- package/docs/400-reference/600-client/020-shortcuts.md +171 -0
- package/docs/400-reference/600-client/100-api.md +370 -0
- package/docs/400-reference/600-client/200-theming.md +209 -0
- package/docs/400-reference/600-client/300-tech-stack-recommendations.md +12 -0
- package/docs/400-reference/{400-cli → 700-cli}/050-init.md +2 -4
- package/{dist/docs/400-reference/400-cli → docs/400-reference/700-cli}/100-serve.md +9 -4
- package/{dist/docs/400-reference/400-cli → docs/400-reference/700-cli}/200-auth.md +1 -4
- package/docs/400-reference/{400-cli → 700-cli}/300-call.md +1 -4
- package/docs/400-reference/{400-cli → 700-cli}/350-instance.md +1 -4
- package/docs/400-reference/700-cli/600-docs.md +128 -0
- package/docs/400-reference/{400-cli → 700-cli}/700-desktop.md +1 -3
- package/docs/500-hosted-pages.md +0 -1
- package/package.json +4 -3
- package/src/internal/cli/app.ts +3 -5
- package/src/internal/cli/commands/docs-ai-context.ts +33 -0
- package/src/internal/cli/commands/docs.ts +19 -2
- package/src/internal/cli/commands/init-template.ts +1 -1
- package/src/internal/cli/commands/serve.ts +3 -0
- package/src/internal/cli/login.ts +9 -9
- package/src/internal/client/client-definition.ts +6 -8
- package/src/internal/client/host/deep-link-navigation.ts +75 -0
- package/src/internal/client/host/overmux-host.tsx +9 -0
- package/src/internal/client/index.ts +0 -6
- package/src/internal/client/overmux-react.ts +71 -40
- package/src/internal/server/auth/auth-service.ts +2 -2
- package/src/internal/server/auth/instance-control.ts +65 -14
- package/src/internal/server/coordinator/ipc-protocol.ts +0 -1
- package/src/internal/server/runtime/create-runtime.ts +5 -3
- package/src/internal/server/runtime/runtime-instance.ts +5 -4
- package/src/internal/server/runtime/runtime-operations.ts +9 -3
- package/src/internal/server/runtime/runtime-resources.ts +12 -32
- package/src/internal/server/runtime/runtime-streams.ts +5 -6
- package/src/internal/server/server-logger.ts +5 -10
- package/src/internal/server/server-startup-options.ts +5 -10
- package/src/internal/server/start-application-server.ts +4 -7
- package/src/public/ai-context.ts +7 -29
- package/src/public/client.ts +0 -6
- package/src/public/config.ts +156 -31
- package/src/public/server.ts +1 -16
- package/dist/docs/100-introduction/100-what-is-overmux.md +0 -7
- package/dist/docs/300-fundamentals/100-project-structure.md +0 -23
- package/dist/docs/300-fundamentals/200-configuration.md +0 -3
- package/dist/docs/300-fundamentals/300-theming.md +0 -54
- package/dist/docs/300-fundamentals/400-server.md +0 -3
- package/dist/docs/300-fundamentals/500-client.md +0 -3
- package/dist/docs/300-fundamentals/600-operations.md +0 -3
- package/dist/docs/300-fundamentals/700-resources.md +0 -3
- package/dist/docs/300-fundamentals/800-streams.md +0 -3
- package/dist/docs/300-fundamentals/900-authentication-and-security.md +0 -3
- package/dist/docs/400-reference/100-configuration.md +0 -23
- package/dist/docs/400-reference/200-server-api.md +0 -21
- package/dist/docs/400-reference/300-client-api.md +0 -39
- package/dist/docs/400-reference/400-cli/400-check.md +0 -20
- package/dist/docs/400-reference/400-cli/500-ai-context.md +0 -102
- package/dist/docs/400-reference/400-cli/600-docs.md +0 -23
- package/dist/exports/index-DS70rKzo.d.ts.map +0 -1
- package/dist/exports/notifications-av0FK0yZ.js.map +0 -1
- package/docs/100-introduction/100-what-is-overmux.md +0 -7
- package/docs/300-fundamentals/100-project-structure.md +0 -23
- package/docs/300-fundamentals/200-configuration.md +0 -3
- package/docs/300-fundamentals/300-theming.md +0 -54
- package/docs/300-fundamentals/400-server.md +0 -3
- package/docs/300-fundamentals/500-client.md +0 -3
- package/docs/300-fundamentals/600-operations.md +0 -3
- package/docs/300-fundamentals/700-resources.md +0 -3
- package/docs/300-fundamentals/800-streams.md +0 -3
- package/docs/300-fundamentals/900-authentication-and-security.md +0 -3
- package/docs/400-reference/100-configuration.md +0 -23
- package/docs/400-reference/200-server-api.md +0 -21
- package/docs/400-reference/300-client-api.md +0 -39
- package/docs/400-reference/400-cli/400-check.md +0 -20
- package/docs/400-reference/400-cli/500-ai-context.md +0 -102
- package/docs/400-reference/400-cli/600-docs.md +0 -23
- package/src/internal/cli/commands/ai.ts +0 -44
package/dist/docs/000-index.md
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Overmux documentation
|
|
3
|
-
description: Build and understand an Overmux application.
|
|
4
3
|
---
|
|
5
4
|
|
|
6
5
|
# Overmux documentation
|
|
7
6
|
|
|
8
7
|
Overmux is a local or self-hosted web UI for tmux sessions, Pi agents, and Git workspaces.
|
|
9
8
|
|
|
10
|
-
- [What is Overmux?](./100-introduction/100-what-is-overmux.md)
|
|
11
9
|
- [How Overmux Works](./100-introduction/200-how-overmux-works.md)
|
|
12
|
-
- [Why Overmux
|
|
10
|
+
- [Why I Built Overmux](./100-introduction/300-why-i-built-overmux.md)
|
|
13
11
|
- [Install and Run Overmux](./200-getting-started/100-install-and-run-overmux.md)
|
|
14
12
|
- [Install Overmux Desktop](./200-getting-started/200-install-overmux-desktop.md)
|
|
15
13
|
- [Install Overmux PWA](./200-getting-started/300-install-overmux-pwa.mdx)
|
|
@@ -18,4 +16,4 @@ Overmux is a local or self-hosted web UI for tmux sessions, Pi agents, and Git w
|
|
|
18
16
|
- [Cloudflare Tunnel](./200-getting-started/400-secure-with-https/300-cloudflare-tunnel.md)
|
|
19
17
|
- [Self-hosted Reverse Proxy](./200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md)
|
|
20
18
|
|
|
21
|
-
Run `overmux docs` to print the absolute path to this installed documentation directory.
|
|
19
|
+
Run `overmux docs path` to print the absolute path to this installed documentation directory.
|
|
@@ -2,6 +2,130 @@
|
|
|
2
2
|
title: How Overmux Works
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Overmux
|
|
5
|
+
Overmux lets you build your own customized dev environment by writing TypeScript server code for Node.js and React components for your browser UI.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Run `overmux serve` on your dev machine to expose your dev environment in the browser on localhost:4242.
|
|
8
|
+
|
|
9
|
+
## The Overmux server
|
|
10
|
+
|
|
11
|
+
`overmux serve` runs your server-side Node.js code and serves your React UI, bundled using [Vite](https://vite.dev/).
|
|
12
|
+
|
|
13
|
+
Overmux server code is organized around three concepts:
|
|
14
|
+
|
|
15
|
+
### Resources
|
|
16
|
+
|
|
17
|
+
Resources expose server-side data from your dev machine, making them available in your UI.
|
|
18
|
+
|
|
19
|
+
For example, to run `ls /` on your server and expose the result:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// server.ts
|
|
23
|
+
defineOvermuxServer({
|
|
24
|
+
resources: {
|
|
25
|
+
ls: {
|
|
26
|
+
kind: "query",
|
|
27
|
+
contract: defineResourceContract({
|
|
28
|
+
input: noInputSchema,
|
|
29
|
+
output: z.array(z.string()),
|
|
30
|
+
}),
|
|
31
|
+
read: async () => {
|
|
32
|
+
const { stdout } = await execFileAsync("ls", ["/"]);
|
|
33
|
+
return stdout.split("\n").filter(Boolean);
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Later in React:
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
const ls = useResource({ id: "ls" });
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div>
|
|
47
|
+
{ls.data?.map((name) => (
|
|
48
|
+
<div key={name}>{name}</div>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Resources have three modes: **query** reads data on request, **subscription** adds change notifications, and **derived** computes a value from other resources. See [resources docs](../400-reference/500-server/100-resources.md) for more details.
|
|
55
|
+
|
|
56
|
+
### Operations
|
|
57
|
+
|
|
58
|
+
Operations are "calls" you can make to your server code.
|
|
59
|
+
|
|
60
|
+
For example:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
defineOvermuxServer({
|
|
64
|
+
operations: {
|
|
65
|
+
helloWorld: defineOperation({
|
|
66
|
+
input: noInputSchema,
|
|
67
|
+
handle: () => console.log("Hello world"),
|
|
68
|
+
}),
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Trigger it from React:
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
const helloWorld = useOperation({ id: "helloWorld" });
|
|
77
|
+
|
|
78
|
+
return <button onClick={() => helloWorld.mutate()}>Say hello</button>;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or run `overmux call helloWorld` on your server. This also allows your agents to call Overmux operations.
|
|
82
|
+
|
|
83
|
+
Operations can run your server-side code, invalidate resources, or send notifications using `notifications.send()`.
|
|
84
|
+
|
|
85
|
+
See [Operations](../400-reference/500-server/200-operations.md) for defining and calling operations.
|
|
86
|
+
|
|
87
|
+
### Streams
|
|
88
|
+
|
|
89
|
+
Streams are high throughput bidirectional streams. They're used when latency and throughput are important.
|
|
90
|
+
|
|
91
|
+
Examples:
|
|
92
|
+
- Connecting to tmux
|
|
93
|
+
- Streaming AI Agent output
|
|
94
|
+
|
|
95
|
+
See [Streams](../400-reference/500-server/300-streams.md) for defining and consuming streams.
|
|
96
|
+
|
|
97
|
+
### Ecosystem packages
|
|
98
|
+
|
|
99
|
+
Overmux's resource, operation, and stream APIs let the community publish npm packages for common development tasks.
|
|
100
|
+
|
|
101
|
+
## The Overmux client
|
|
102
|
+
|
|
103
|
+
The Overmux client is a website built with React and TypeScript (TSX), bundled using [Vite](https://vite.dev/).
|
|
104
|
+
|
|
105
|
+
See [Client](../400-reference/600-client/000-index.md) for defining your browser application.
|
|
106
|
+
|
|
107
|
+
## Authentication
|
|
108
|
+
|
|
109
|
+
Overmux handles authentication for you. This is important because most overmux setups give sensitive access to your dev machine.
|
|
110
|
+
|
|
111
|
+
Run `overmux serve` and then `overmux auth login` to get a login code or a link to instantly login.
|
|
112
|
+
|
|
113
|
+
See [Authentication and Security](../400-reference/400-authentication-and-security.md) for more details.
|
|
114
|
+
|
|
115
|
+
## Technology choices
|
|
116
|
+
|
|
117
|
+
### Mandatory
|
|
118
|
+
|
|
119
|
+
- **[Node.js](https://nodejs.org/)** runs your server code and the Overmux CLI.
|
|
120
|
+
- **[TypeScript](https://www.typescriptlang.org/)** provides type checking across your server and UI. This is the expected development workflow; Overmux does not require you to run `tsc` before serving.
|
|
121
|
+
- **[React and React DOM](https://react.dev/)** render your UI.
|
|
122
|
+
- **[Vite](https://vite.dev/)** serves your UI during development and builds it for production.
|
|
123
|
+
- **[Zod](https://zod.dev/)** defines and validates your API's input and output schemas.
|
|
124
|
+
|
|
125
|
+
### Recommended
|
|
126
|
+
|
|
127
|
+
- **[Mise](https://mise.jdx.dev/)** manages developer tools and their versions; `overmux init` uses it when installed and activated.
|
|
128
|
+
- **[pnpm](https://pnpm.io/)** manages application dependencies; required by `overmux init`.
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
You can use any other npm packages you like. You can make your own choices for routing, styling, and component libraries. See [tech stack recommendations](../400-reference/600-client/300-tech-stack-recommendations.md) for some recommendations if you're new to building for the web.
|
|
@@ -37,7 +37,7 @@ Once the CLI is installed, create your Overmux setup:
|
|
|
37
37
|
overmux init
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
This validates your toolchain, creates a minimal application in `$XDG_CONFIG_HOME/overmux
|
|
40
|
+
This validates your toolchain, creates a minimal application in `$XDG_CONFIG_HOME/overmux` (default `~/.config/overmux`; see [storage locations](../400-reference/300-storage-locations.md)), installs its dependencies, and checks the result. Existing scaffold files are left unchanged. Read more in the [`overmux init` reference](../400-reference/700-cli/050-init.md) and [project structure](../400-reference/100-project-structure.md).
|
|
41
41
|
|
|
42
42
|
## Start the server
|
|
43
43
|
|
|
@@ -47,4 +47,4 @@ overmux serve
|
|
|
47
47
|
|
|
48
48
|
Open Overmux in your browser to confirm it works.
|
|
49
49
|
|
|
50
|
-
To configure hosts and ports, see [Configuration](../
|
|
50
|
+
To configure hosts and ports, see [Configuration](../400-reference/200-configuration.md).
|
|
@@ -16,7 +16,7 @@ export default defineOvermuxConfig({
|
|
|
16
16
|
trustedProxyPeer: "127.0.0.1",
|
|
17
17
|
},
|
|
18
18
|
host: "127.0.0.1",
|
|
19
|
-
port:
|
|
19
|
+
port: 4242,
|
|
20
20
|
// ...
|
|
21
21
|
});
|
|
22
22
|
```
|
|
@@ -34,11 +34,11 @@ overmux serve
|
|
|
34
34
|
In another terminal, publish its loopback listener through Tailscale Serve:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
tailscale serve --bg http://127.0.0.1:
|
|
37
|
+
tailscale serve --bg http://127.0.0.1:4242
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Open the HTTPS URL printed by Tailscale on another device in your tailnet. Run `overmux auth login` to create a login link if authentication is enabled.
|
|
41
41
|
|
|
42
|
-
Do not expose port
|
|
42
|
+
Do not expose port 4242 directly or change `trustedProxyPeer` to a non-loopback address. Overmux trusts forwarded HTTPS and host information only from this immediate proxy peer.
|
|
43
43
|
|
|
44
44
|
See Tailscale's [Serve documentation](https://tailscale.com/docs/features/tailscale-serve) for installation, tailnet access controls, and command reference.
|
|
@@ -22,7 +22,7 @@ credentials-file: /home/you/.cloudflared/<tunnel-id>.json
|
|
|
22
22
|
|
|
23
23
|
ingress:
|
|
24
24
|
- hostname: overmux.example.com
|
|
25
|
-
service: http://127.0.0.1:
|
|
25
|
+
service: http://127.0.0.1:4242
|
|
26
26
|
- service: http_status:404
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -38,7 +38,7 @@ export default defineOvermuxConfig({
|
|
|
38
38
|
trustedProxyPeer: "127.0.0.1",
|
|
39
39
|
},
|
|
40
40
|
host: "127.0.0.1",
|
|
41
|
-
port:
|
|
41
|
+
port: 4242,
|
|
42
42
|
// ...
|
|
43
43
|
});
|
|
44
44
|
```
|
package/dist/docs/200-getting-started/400-secure-with-https/400-self-hosted-reverse-proxy.md
CHANGED
|
@@ -20,13 +20,13 @@ export default defineOvermuxConfig({
|
|
|
20
20
|
trustedProxyPeer: "127.0.0.1",
|
|
21
21
|
},
|
|
22
22
|
host: "127.0.0.1",
|
|
23
|
-
port:
|
|
23
|
+
port: 4242,
|
|
24
24
|
// ...
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Do not expose the loopback backend directly or configure a non-loopback address as `trustedProxyPeer`.
|
|
29
29
|
|
|
30
|
-
For complete proxy-specific walkthroughs and example configurations, see Open WebUI's [HTTPS and reverse proxy guide](https://docs.openwebui.com/reference/https/). Adapt the upstream address and port to `http://127.0.0.1:
|
|
30
|
+
For complete proxy-specific walkthroughs and example configurations, see Open WebUI's [HTTPS and reverse proxy guide](https://docs.openwebui.com/reference/https/). Adapt the upstream address and port to `http://127.0.0.1:4242`, and retain Overmux's origin and trusted-proxy configuration above.
|
|
31
31
|
|
|
32
32
|
You can also consult the official documentation for [Caddy](https://caddyserver.com/docs/quick-starts/reverse-proxy), [Nginx](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/), or [HAProxy](https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Set Up with Packages
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
To understand how Overmux works and how to configure your Overmux, start with the [reference docs](/docs/reference/project-structure). They cover your project structure, configuration, server, and browser UI.
|
|
6
|
+
|
|
7
|
+
To get the most out of Overmux you'll want to use some packages.
|
|
8
|
+
|
|
9
|
+
## What are packages?
|
|
10
|
+
|
|
11
|
+
Packages are building blocks for your Overmux. They can provide server functionality, UI components, or both.
|
|
12
|
+
|
|
13
|
+
Overmux packages are just standard npm packages you install and use in your Overmux project.
|
|
14
|
+
|
|
15
|
+
## Packages to start with
|
|
16
|
+
|
|
17
|
+
### Terminals with xterm and tmux
|
|
18
|
+
|
|
19
|
+
Use these two packages together to add interactive terminals backed by persistent tmux sessions.
|
|
20
|
+
|
|
21
|
+
- **[tmux](/docs/packages/tmux)** connects your Overmux to your machine's tmux sessions, windows, and panes. It provides live state, terminal streaming, and operations for controlling tmux, along with React components and hooks for your UI.
|
|
22
|
+
- **[xterm](/docs/packages/xterm)** renders an [xterm.js](https://xtermjs.org/) terminal in your browser. It handles terminal display and input, but doesn't start a shell or manage sessions.
|
|
23
|
+
|
|
24
|
+
Together, they let you interact with your terminals through Overmux UI while tmux keeps your sessions running when you disconnect.
|
|
25
|
+
|
|
26
|
+
Follow the package docs for installation and wiring examples.
|
|
27
|
+
|
|
28
|
+
### Source control with git
|
|
29
|
+
|
|
30
|
+
The **[git package](/docs/packages/git)** adds repository changes and diffs to your Overmux, with ready-made UI components for browsing them.
|
|
31
|
+
|
|
32
|
+
You choose which repository paths your server can access. You can also enable actions such as staging, unstaging, and discarding changes; write permissions are off by default.
|
|
33
|
+
|
|
34
|
+
## Explore more packages
|
|
35
|
+
|
|
36
|
+
Depending on your setup, you might also want:
|
|
37
|
+
|
|
38
|
+
- **[Zellij](/docs/packages/zellij)** for a Zellij-backed terminal setup instead of tmux. Experimental; compatibility is not guaranteed.
|
|
39
|
+
- **[Pi](/docs/packages/pi)** for viewing AI agent conversations and interacting with running agents. Experimental; compatibility is not guaranteed.
|
|
40
|
+
- **[JSONL store](/docs/packages/jsonl-store)** for storing schema-validated records in a local file.
|
|
41
|
+
|
|
42
|
+
Start with the pieces you need. Each package's documentation explains what it provides and how to connect it to your Overmux.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Project Structure
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Your Overmux application lives in `~/.config/overmux/`. Here is the project structure after running `overmux init`:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
~/.config/overmux/
|
|
9
|
+
├── overmux.config.ts # Connects your server and browser UI
|
|
10
|
+
├── vite.config.ts # UI build configuration
|
|
11
|
+
├── package.json # Dependencies and scripts
|
|
12
|
+
├── pnpm-lock.yaml # Locked dependency versions (via pnpm)
|
|
13
|
+
├── mise.toml # Tool versions, when using Mise. Manages pnpm version.
|
|
14
|
+
├── AGENTS.md # Instructions for coding agents
|
|
15
|
+
├── CLAUDE.md
|
|
16
|
+
├── .gitignore
|
|
17
|
+
└── src/
|
|
18
|
+
├── server/
|
|
19
|
+
│ └── index.ts # Your Overmux serve side code, runs in Node.js
|
|
20
|
+
└── ui/
|
|
21
|
+
├── app.tsx # Your React UI, Shortcuts etc.
|
|
22
|
+
├── main.tsx # UI entrypoint
|
|
23
|
+
├── index.html # HTML entry point
|
|
24
|
+
└── styles.css
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
See [Storage Locations](./300-storage-locations.md) for directory defaults and overrides.
|
|
28
|
+
|
|
29
|
+
# Server
|
|
30
|
+
|
|
31
|
+
Your server definition lives in `src/server/index.ts` and runs in Node.js. Import it into `overmux.config.ts` and pass it as `server`:
|
|
32
|
+
|
|
33
|
+
```ts title="overmux.config.ts"
|
|
34
|
+
import { defineOvermuxConfig } from "overmux";
|
|
35
|
+
|
|
36
|
+
import server from "./src/server/index"; // import it
|
|
37
|
+
|
|
38
|
+
export default defineOvermuxConfig({
|
|
39
|
+
server, // pass it to overmux
|
|
40
|
+
|
|
41
|
+
auth: { mode: "cli-login" },
|
|
42
|
+
productionWebAssetsDir: "./dist",
|
|
43
|
+
vite: "./vite.config.ts",
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Define your server's capabilities with [Resources](./500-server/100-resources.md), [Operations](./500-server/200-operations.md), and [Streams](./500-server/300-streams.md).
|
|
48
|
+
|
|
49
|
+
# Client
|
|
50
|
+
|
|
51
|
+
By default your Overmux client code lives in `src/ui/` and is built using [Vite](https://vite.dev/). Point `vite` in `overmux.config.ts` to your Vite configuration:
|
|
52
|
+
|
|
53
|
+
```ts title="overmux.config.ts"
|
|
54
|
+
import { defineOvermuxConfig } from "overmux";
|
|
55
|
+
import server from "./src/server/index";
|
|
56
|
+
|
|
57
|
+
export default defineOvermuxConfig({
|
|
58
|
+
server,
|
|
59
|
+
auth: { mode: "cli-login" },
|
|
60
|
+
productionWebAssetsDir: "./dist",
|
|
61
|
+
|
|
62
|
+
vite: "./vite.config.ts", // vite configuration
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The default `vite.config.ts` sets `src/ui/` as the UI root and builds production assets into `dist/`:
|
|
67
|
+
|
|
68
|
+
```ts title="vite.config.ts"
|
|
69
|
+
import viteReact from "@vitejs/plugin-react";
|
|
70
|
+
import { defineConfig } from "vite";
|
|
71
|
+
|
|
72
|
+
export default defineConfig({
|
|
73
|
+
build: { emptyOutDir: true, outDir: "../../dist" },
|
|
74
|
+
plugins: [viteReact()],
|
|
75
|
+
root: "src/ui",
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This is a pretty vanilla Vite React application which is yours to configure how you see fit.
|
|
80
|
+
|
|
81
|
+
See [Client](./600-client/000-index.md) for building your UI, [Client API](./600-client/100-api.md) for available APIs, and [Theming](./600-client/200-theming.md) for styling.
|
|
82
|
+
|
|
83
|
+
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## `overmux.config.ts`
|
|
6
|
+
|
|
7
|
+
Loaded from `$XDG_CONFIG_HOME/overmux/overmux.config.ts`, fallback: `~/.config/overmux/overmux.config.ts`. Override with `--config /another/overmux.config.ts`. See [storage locations](/docs/reference/storage-locations).
|
|
8
|
+
|
|
9
|
+
### `server`
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { defineOvermuxConfig, defineOvermuxServer } from "overmux";
|
|
13
|
+
|
|
14
|
+
export default defineOvermuxConfig({
|
|
15
|
+
// ...other config
|
|
16
|
+
|
|
17
|
+
// Required.
|
|
18
|
+
// Your server's resources, operations, and streams.
|
|
19
|
+
// Shown inline; prefer defining and exporting this from ./server.ts.
|
|
20
|
+
server: defineOvermuxServer({
|
|
21
|
+
resources: {},
|
|
22
|
+
operations: {},
|
|
23
|
+
streams: {},
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
See [Server](/docs/reference/server).
|
|
29
|
+
|
|
30
|
+
### `auth`
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { defineOvermuxConfig } from "overmux";
|
|
34
|
+
|
|
35
|
+
export default defineOvermuxConfig({
|
|
36
|
+
// ...other config
|
|
37
|
+
|
|
38
|
+
// Required.
|
|
39
|
+
// Configure client authentication.
|
|
40
|
+
auth: {
|
|
41
|
+
// Required. Only supported mode: "cli-login".
|
|
42
|
+
// Authenticate clients using credentials created by the CLI.
|
|
43
|
+
mode: "cli-login",
|
|
44
|
+
|
|
45
|
+
// Default: the server's local origin.
|
|
46
|
+
// Allowed browser origins. Non-loopback origins require HTTPS.
|
|
47
|
+
origins: ["http://localhost:4242"],
|
|
48
|
+
|
|
49
|
+
// Default: "forever".
|
|
50
|
+
// Session lifetime: "forever" or a positive whole number with m, h, or d.
|
|
51
|
+
// For example: "30m", "24h", or "30d".
|
|
52
|
+
sessionLifetime: "forever",
|
|
53
|
+
|
|
54
|
+
// Default: unset; proxy headers are not trusted.
|
|
55
|
+
// Loopback IP of the reverse proxy allowed to supply forwarded headers.
|
|
56
|
+
trustedProxyPeer: "127.0.0.1",
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
See [`overmux auth`](/docs/reference/cli/auth) for creating and managing credentials.
|
|
62
|
+
|
|
63
|
+
### `host`
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import { defineOvermuxConfig } from "overmux";
|
|
67
|
+
|
|
68
|
+
export default defineOvermuxConfig({
|
|
69
|
+
// ...other config
|
|
70
|
+
|
|
71
|
+
// Default: "localhost".
|
|
72
|
+
// Network address to listen on.
|
|
73
|
+
host: "localhost",
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
See [`overmux serve`](/docs/reference/cli/serve) for command-line overrides.
|
|
78
|
+
|
|
79
|
+
### `port`
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { defineOvermuxConfig } from "overmux";
|
|
83
|
+
|
|
84
|
+
export default defineOvermuxConfig({
|
|
85
|
+
// ...other config
|
|
86
|
+
|
|
87
|
+
// Default: 4242.
|
|
88
|
+
// Listening port; an integer from 1-65535.
|
|
89
|
+
port: 4242,
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
See [`overmux serve`](/docs/reference/cli/serve) for command-line overrides.
|
|
94
|
+
|
|
95
|
+
### `instanceId`
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { hostname } from "node:os";
|
|
99
|
+
import { defineOvermuxConfig } from "overmux";
|
|
100
|
+
|
|
101
|
+
export default defineOvermuxConfig({
|
|
102
|
+
// ...other config
|
|
103
|
+
|
|
104
|
+
// Optional custom identity: a fixed ID or a function of the listening port.
|
|
105
|
+
// Default instance ID:
|
|
106
|
+
instanceId: ({ port }) => `${hostname()}-${port}`,
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
IDs must be 1-253 lowercase ASCII characters, start and end with a letter or digit, and contain only letters, digits, dots, or hyphens. Explicit IDs are validated, not normalized. Set an explicit ID if the machine hostname does not meet these rules.
|
|
111
|
+
|
|
112
|
+
An ID function runs once at startup using the actual listening port. Every address serving the same running instance reports the same ID. Distinct instances need distinct IDs; IDs are not credentials.
|
|
113
|
+
|
|
114
|
+
See [Deep links](./600-client/007-deep-links.md) and [`overmux instance`](/docs/reference/cli/instance).
|
|
115
|
+
|
|
116
|
+
### `vite`
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import { defineOvermuxConfig } from "overmux";
|
|
120
|
+
|
|
121
|
+
export default defineOvermuxConfig({
|
|
122
|
+
// ...other config
|
|
123
|
+
|
|
124
|
+
// No default; required by `overmux serve`.
|
|
125
|
+
// Path to your application's Vite configuration.
|
|
126
|
+
vite: "./vite.config.ts",
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
See [`overmux serve`](/docs/reference/cli/serve).
|
|
131
|
+
|
|
132
|
+
### `productionWebAssetsDir`
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
import { defineOvermuxConfig } from "overmux";
|
|
136
|
+
|
|
137
|
+
export default defineOvermuxConfig({
|
|
138
|
+
// ...other config
|
|
139
|
+
|
|
140
|
+
// No default; required by `overmux serve --production`.
|
|
141
|
+
// Directory containing the built browser assets.
|
|
142
|
+
productionWebAssetsDir: "./dist",
|
|
143
|
+
});
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
See [`overmux serve`](/docs/reference/cli/serve) for production serving.
|
|
147
|
+
|
|
148
|
+
### `watch`
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { defineOvermuxConfig } from "overmux";
|
|
152
|
+
|
|
153
|
+
export default defineOvermuxConfig({
|
|
154
|
+
// ...other config
|
|
155
|
+
|
|
156
|
+
// Default: true.
|
|
157
|
+
// Watch application files and restart the development server on changes.
|
|
158
|
+
watch: true,
|
|
159
|
+
});
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
See [`overmux serve`](/docs/reference/cli/serve) for development mode.
|
|
163
|
+
|
|
164
|
+
### `debug`
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
import { defineOvermuxConfig } from "overmux";
|
|
168
|
+
|
|
169
|
+
export default defineOvermuxConfig({
|
|
170
|
+
// ...other config
|
|
171
|
+
|
|
172
|
+
// Default: true.
|
|
173
|
+
// Enable debug logging.
|
|
174
|
+
debug: true,
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
See [Storage locations](/docs/reference/storage-locations) for the server log location.
|
|
179
|
+
|
|
180
|
+
### `aiContextSnippets`
|
|
181
|
+
|
|
182
|
+
```ts
|
|
183
|
+
import { defineOvermuxConfig } from "overmux";
|
|
184
|
+
|
|
185
|
+
export default defineOvermuxConfig({
|
|
186
|
+
// ...other config
|
|
187
|
+
|
|
188
|
+
// Default: ["package-source", "tech-stack-recommendations"].
|
|
189
|
+
// Select guidance emitted by `overmux docs ai-context`; [] emits no context.
|
|
190
|
+
aiContextSnippets: ["package-source", "tech-stack-recommendations"],
|
|
191
|
+
});
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
See [`overmux docs ai-context`](/docs/reference/cli/docs#overmux-docs-ai-context) for setup instructions and snippet descriptions.
|
|
195
|
+
|
|
196
|
+
## `overmux.desktop.ts`
|
|
197
|
+
|
|
198
|
+
Loaded from `$XDG_CONFIG_HOME/overmux/overmux.desktop.ts`, fallback: `~/.config/overmux/overmux.desktop.ts`. A missing file uses the defaults.
|
|
199
|
+
|
|
200
|
+
Desktop configuration is trusted TypeScript, loaded once at startup. Restart the desktop app after changes. Use `--desktop-config <path>` to load another file.
|
|
201
|
+
|
|
202
|
+
### `titleBar`
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
import { defineOvermuxDesktopConfig } from "@overmux/desktop";
|
|
206
|
+
|
|
207
|
+
export default defineOvermuxDesktopConfig({
|
|
208
|
+
// ...other config
|
|
209
|
+
|
|
210
|
+
// Default: "hidden". Options: "hidden", "native".
|
|
211
|
+
// Show or hide the native window title bar.
|
|
212
|
+
titleBar: "hidden",
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### `menuBar`
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import { defineOvermuxDesktopConfig } from "@overmux/desktop";
|
|
220
|
+
|
|
221
|
+
export default defineOvermuxDesktopConfig({
|
|
222
|
+
// ...other config
|
|
223
|
+
|
|
224
|
+
// Default: "auto-hide". Options: "auto-hide", "hidden", "visible".
|
|
225
|
+
// Control the Linux/Windows window menu; auto-hide reveals it with Alt.
|
|
226
|
+
// Does not affect the macOS global menu.
|
|
227
|
+
menuBar: "auto-hide",
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### `macosTitleBarStyle`
|
|
232
|
+
|
|
233
|
+
```ts
|
|
234
|
+
import { defineOvermuxDesktopConfig } from "@overmux/desktop";
|
|
235
|
+
|
|
236
|
+
export default defineOvermuxDesktopConfig({
|
|
237
|
+
// ...other config
|
|
238
|
+
|
|
239
|
+
// Default: unset; follows titleBar. Options: "native", "transparent".
|
|
240
|
+
// Override titleBar on macOS; transparent extends content into its area.
|
|
241
|
+
macosTitleBarStyle: "transparent",
|
|
242
|
+
});
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### `macosTrafficLights`
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import { defineOvermuxDesktopConfig } from "@overmux/desktop";
|
|
249
|
+
|
|
250
|
+
export default defineOvermuxDesktopConfig({
|
|
251
|
+
// ...other config
|
|
252
|
+
|
|
253
|
+
// Default: "hidden". Options: "hidden", "visible".
|
|
254
|
+
// Show or hide the macOS close, minimize, and zoom buttons.
|
|
255
|
+
macosTrafficLights: "hidden",
|
|
256
|
+
});
|
|
257
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Storage Locations
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Overmux follows [XDG base directory conventions](https://specifications.freedesktop.org/basedir-spec/latest/).
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
`$XDG_CONFIG_HOME/overmux`, default `~/.config/overmux`.
|
|
10
|
+
|
|
11
|
+
- `overmux.config.ts`: application configuration. Override with `--config /another/overmux.config.ts`.
|
|
12
|
+
- `overmux.desktop.ts`: optional Overmux Desktop settings. Override with `--desktop-config /another/overmux.desktop.ts`.
|
|
13
|
+
- Your Overmux project, created by `overmux init`. See [project structure](./100-project-structure.md).
|
|
14
|
+
|
|
15
|
+
## Data
|
|
16
|
+
|
|
17
|
+
`$XDG_DATA_HOME/overmux`, default `~/.local/share/overmux`.
|
|
18
|
+
|
|
19
|
+
- `auth/auth.json`: persisted authentication state.
|
|
20
|
+
- `auth/auth.lock`: authentication store lock.
|
|
21
|
+
- `background-notifications/vapid.json`: push notification keys, including the private key.
|
|
22
|
+
- `background-notifications/subscriptions.json`: push notification subscriptions.
|
|
23
|
+
|
|
24
|
+
## State
|
|
25
|
+
|
|
26
|
+
`$XDG_STATE_HOME/overmux`, default `~/.local/state/overmux`.
|
|
27
|
+
|
|
28
|
+
- `overmux.log`: server logs.
|
|
29
|
+
- `desktop/`: desktop profile, including saved server addresses, browser sessions, and Chromium caches. Can contain credentials; not disposable cache.
|
|
30
|
+
|
|
31
|
+
## Cache
|
|
32
|
+
|
|
33
|
+
`$XDG_CACHE_HOME/overmux`, default `~/.cache/overmux`.
|
|
34
|
+
|
|
35
|
+
Cache files; currently unused.
|
|
36
|
+
|
|
37
|
+
## Runtime
|
|
38
|
+
|
|
39
|
+
`$XDG_RUNTIME_DIR/overmux`, default `/tmp/overmux-<uid>`.
|
|
40
|
+
|
|
41
|
+
- `<id>.sock`: per-instance control socket for local CLI requests.
|
|
42
|
+
- `<id>.json`: instance registration, including its process ID, URLs, port, and control socket path.
|
|
43
|
+
|
|
44
|
+
Overmux uses `/tmp/overmux-<uid>` when `XDG_RUNTIME_DIR` is unset. If the runtime directory path exceeds 80 bytes, Overmux uses `/tmp/overmux-<uid>-<hash>` to stay within socket path limits.
|
|
45
|
+
|
|
46
|
+
`<uid>` is your numeric user ID. `<hash>` is derived from the original runtime directory path.
|