You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-2Lines changed: 29 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,18 @@ This repo sets `CGO_ENABLED=0` in `Makefile` because the local macOS Go 1.22 too
22
22
23
23
## Install
24
24
25
+
Install the released Go binary directly:
26
+
27
+
```bash
28
+
curl -fsSL https://raw.githubusercontent.com/manaflow-ai/subrouter/main/install.sh | sh
29
+
```
30
+
31
+
On a Linux server, install to `/usr/local/bin`:
32
+
33
+
```bash
34
+
curl -fsSL https://raw.githubusercontent.com/manaflow-ai/subrouter/main/install.sh | sudo sh
35
+
```
36
+
25
37
Install with npm:
26
38
27
39
```bash
@@ -34,7 +46,7 @@ Install with Python:
34
46
pipx install subrouter
35
47
```
36
48
37
-
Both packages install `subrouter`, `sr`, and `cx`. The wrappers download the matching Go release binary for macOS, Linux, Windows, FreeBSD, OpenBSD, or NetBSD on amd64, arm64, or supported 32-bit variants. Set `SUBROUTER_BIN` to use a local binary instead.
49
+
All install paths provide `subrouter`, `sr`, and `cx`. The npm and Python wrappers download the matching Go release binary for macOS, Linux, Windows, FreeBSD, OpenBSD, or NetBSD on amd64, arm64, or supported 32-bit variants. Set `SUBROUTER_BIN` to use a local binary instead.
38
50
39
51
## Local macOS daemon
40
52
@@ -51,7 +63,22 @@ This installs the binary to `~/bin/subrouter`, installs `~/bin/cx` as a symlink
The 10 minute `cx` auto-switch interval is the default. Override it with `subrouter install-daemon --cx-switch-interval 5m`, or disable it with `--cx-switch-interval 0`. This command is macOS-specific; use a systemd unit or another supervisor on Linux.
66
+
The 10 minute `cx` auto-switch interval is the default. Override it with `subrouter install-daemon --cx-switch-interval 5m`, or disable it with `--cx-switch-interval 0`.
67
+
68
+
## Linux systemd service
69
+
70
+
On a Linux server, install the binary and service:
71
+
72
+
```bash
73
+
curl -fsSL https://raw.githubusercontent.com/manaflow-ai/subrouter/main/install.sh | sudo sh
74
+
sudo sr install-systemd --addr 0.0.0.0:31415
75
+
```
76
+
77
+
This creates a `subrouter` system user, stores state under `/var/lib/subrouter`, writes `/etc/systemd/system/subrouter.service`, installs `subrouter`, `sr`, and `cx` in `/usr/local/bin`, and starts:
0 commit comments