@jonaskahn/relo 0.1.0-beta.17.d00e9a2a → 0.1.0-beta.19.453b59ee
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/README.md +28 -66
- package/lib/daemon.mjs +8 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,97 +1,59 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="assets/logo.
|
|
2
|
+
<img src="https://raw.githubusercontent.com/jonaskahn/relo/main/assets/logo.svg" alt="Relo" width="96">
|
|
3
3
|
|
|
4
4
|
<h2>Relo</h2>
|
|
5
5
|
|
|
6
6
|
<code>▚▚▚▚▚▚▚ Light • Fast • Reliable ▚▚▚▚▚▚▚</code>
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> One local proxy that lets Codex, Claude Code, Cursor and Grok, etc. Talk to any model, any provider with no config changes.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```console
|
|
15
|
-
$ npm install -g @jonaskahn/relo
|
|
16
|
-
$ relo daemon start
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## What you get
|
|
20
|
-
|
|
21
|
-
This package installs the `relo` binary and puts a `relo` command on your
|
|
22
|
-
PATH. It is the daemon with its tray icon, downloaded from the GitHub release
|
|
23
|
-
and verified against the release checksums.
|
|
24
|
-
|
|
25
|
-
`relo` runs headless where there is no desktop session — a container or a
|
|
26
|
-
server — and shows its tray icon where there is one. The installers
|
|
27
|
-
(`Relo-Setup-*.exe` on Windows, the `Relo-Setup-*.deb` / `Relo-Setup-*.rpm`
|
|
28
|
-
packages on Linux, and `Relo.app` on macOS) install the same binary.
|
|
29
|
-
|
|
30
|
-
Every install provides the `relo` command, so they are never installed
|
|
31
|
-
together: if another relo is already on your PATH, this install refuses and
|
|
32
|
-
tells you where it found it. Removing that install first lets this package
|
|
33
|
-
take over.
|
|
34
|
-
|
|
35
|
-
Supported hosts: macOS, Linux, and Windows on both Intel and Apple Silicon (or
|
|
36
|
-
their ARM equivalents). State lives in `$RELO_HOME`, `~/.relo` by default, so
|
|
37
|
-
an npm install and a `.deb` install share the same configuration.
|
|
8
|
+
<a href="https://www.npmjs.com/package/@jonaskahn/relo"><img src="https://img.shields.io/npm/v/@jonaskahn/relo?label=npm%40latest" alt="npm latest"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@jonaskahn/relo?activeTab=versions"><img src="https://img.shields.io/npm/v/@jonaskahn/relo/beta" alt="npm beta"></a>
|
|
38
10
|
|
|
39
|
-
|
|
11
|
+
<p><i>Let your harness agents talk to any model, any provider with no config changes.</i></p>
|
|
40
12
|
|
|
41
|
-
|
|
42
|
-
old build to drain, ends the processes of this home that still hold a
|
|
43
|
-
configured port, and checks the ports are free before it writes the new one. A
|
|
44
|
-
port another program holds fails the install rather than killing that program:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
relo: install failed -- something else is listening on port 10101
|
|
48
|
-
```
|
|
13
|
+
</div>
|
|
49
14
|
|
|
50
|
-
|
|
51
|
-
again. The data is never touched by an update.
|
|
15
|
+
---
|
|
52
16
|
|
|
53
|
-
##
|
|
17
|
+
## Install
|
|
54
18
|
|
|
55
19
|
```console
|
|
56
|
-
$ npm
|
|
20
|
+
$ npm i -g @jonaskahn/relo # latest stable (Node 22+)
|
|
21
|
+
$ npm i -g @jonaskahn/relo@beta # fresh from main
|
|
57
22
|
```
|
|
58
23
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
24
|
+
Installs the `relo` binary, verified against the release checksums. State
|
|
25
|
+
lives in `~/.relo` (`$RELO_HOME`), shared with every other installer. Never
|
|
26
|
+
installed twice: if another Relo is on your PATH, this one refuses and tells
|
|
27
|
+
you where it found it.
|
|
28
|
+
|
|
29
|
+
## Start
|
|
62
30
|
|
|
63
31
|
```console
|
|
64
|
-
$ relo
|
|
32
|
+
$ relo daemon start # console at http://127.0.0.1:10101
|
|
65
33
|
```
|
|
66
34
|
|
|
67
|
-
|
|
35
|
+
One port serves everything: the console, the management API, and the data
|
|
36
|
+
plane (`/inference` speaks OpenAI, `/inference-claude` speaks Anthropic).
|
|
68
37
|
|
|
69
|
-
##
|
|
38
|
+
## Update
|
|
70
39
|
|
|
71
|
-
The installer
|
|
72
|
-
|
|
73
|
-
|
|
40
|
+
The installer stops the running daemon, swaps the binary, and checks the port
|
|
41
|
+
is free. Your data is never touched. If another program holds the port, the
|
|
42
|
+
install fails instead of killing it:
|
|
74
43
|
|
|
75
|
-
```
|
|
76
|
-
|
|
44
|
+
```
|
|
45
|
+
relo: install failed -- something else is listening on port 10101
|
|
77
46
|
```
|
|
78
47
|
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
An install that printed a platform or checksum error left nothing behind, so
|
|
82
|
-
fix the cause and run the installer again:
|
|
48
|
+
## Uninstall
|
|
83
49
|
|
|
84
50
|
```console
|
|
85
|
-
$
|
|
51
|
+
$ npm uninstall -g @jonaskahn/relo # keeps your data
|
|
52
|
+
$ relo uninstall --wipe # removes data too
|
|
86
53
|
```
|
|
87
54
|
|
|
88
|
-
Downloads are verified against `checksums.txt` from the release. A mismatch
|
|
89
|
-
fails the install rather than writing an executable.
|
|
90
|
-
|
|
91
55
|
## Links
|
|
92
56
|
|
|
93
|
-
|
|
94
|
-
- [Releases](https://github.com/jonaskahn/relo/releases)
|
|
95
|
-
- [Documentation](https://github.com/jonaskahn/relo#readme)
|
|
57
|
+
[Source](https://github.com/jonaskahn/relo) · [Releases](https://github.com/jonaskahn/relo/releases) · [Docs](https://github.com/jonaskahn/relo#readme)
|
|
96
58
|
|
|
97
59
|
AGPL-3.0-only
|
package/lib/daemon.mjs
CHANGED
|
@@ -16,19 +16,18 @@ export function reloHome(env = process.env) {
|
|
|
16
16
|
return env.RELO_HOME?.trim() || join(homedir(), '.relo');
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const DEFAULTS = { port: 10101
|
|
19
|
+
const DEFAULTS = { port: 10101 };
|
|
20
20
|
|
|
21
|
-
// servicePorts lists the
|
|
22
|
-
//
|
|
21
|
+
// servicePorts lists the port a home opens: the single listener's port. A
|
|
22
|
+
// zero port asks for an ephemeral one, which no scan can name.
|
|
23
23
|
export function servicePorts(configText = '') {
|
|
24
|
-
|
|
24
|
+
let found;
|
|
25
25
|
for (const line of configText.split('\n')) {
|
|
26
|
-
const match = line.match(/^\s*
|
|
27
|
-
if (match) found
|
|
26
|
+
const match = line.match(/^\s*port\s*=\s*(\d+)/);
|
|
27
|
+
if (match) found ??= Number(match[1]);
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.filter((port) => port !== 0);
|
|
29
|
+
const port = found ?? DEFAULTS.port;
|
|
30
|
+
return port === 0 ? [] : [port];
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
// runtimePid reads the pid a daemon published, or null when no usable file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonaskahn/relo",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.19.453b59ee",
|
|
4
4
|
"description": "One local proxy that lets Codex, Claude Code, Cursor and Grok, etc. Talk to any model, any provider with no config changes",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|