opencode-remote-login 0.1.3 → 0.1.5

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 CHANGED
@@ -5,16 +5,14 @@ Dispatch opencode sessions to remote hosts via SSH. Migrate context, execute tas
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- opencode plug opencode-remote-login
8
+ opencode plug -g opencode-remote-login
9
9
  ```
10
10
 
11
- This adds the plugin to your `opencode.jsonc`. The `remote_login` tool becomes available immediately.
11
+ Use `-g` to install globally into `~/.config/opencode/opencode.jsonc`. Without `-g`, the plugin is installed into the current project's `.opencode/` directory instead.
12
12
 
13
13
  ## Configure hosts
14
14
 
15
- Hosts are defined via a `hosts` entry in one of these locations (checked in order):
16
-
17
- **Option 1 — `~/.config/opencode/hosts.json`**
15
+ Create `~/.config/opencode/hosts.json`:
18
16
 
19
17
  ```json
20
18
  {
@@ -28,7 +26,7 @@ Hosts are defined via a `hosts` entry in one of these locations (checked in orde
28
26
  }
29
27
  ```
30
28
 
31
- **Option 2 Inline in `opencode.jsonc`**
29
+ Alternatively, configure inline in `opencode.jsonc`:
32
30
 
33
31
  ```jsonc
34
32
  {
@@ -42,6 +40,8 @@ Hosts are defined via a `hosts` entry in one of these locations (checked in orde
42
40
  }
43
41
  ```
44
42
 
43
+ Hosts are searched in order: `~/.config/opencode/hosts.json` first, then the platform config directory.
44
+
45
45
  ### Host fields
46
46
 
47
47
  | Field | Required | Description |
@@ -50,7 +50,7 @@ Hosts are defined via a `hosts` entry in one of these locations (checked in orde
50
50
  | `agent` | No | Override agent on the remote |
51
51
  | `model` | No | Override model in `provider/id` format |
52
52
 
53
- Only host **names** are shown to the LLM; SSH addresses stay on disk.
53
+ Only host **names** are shown to the LLM. SSH addresses stay on disk.
54
54
 
55
55
  ### SSH setup
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-remote-login",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./server": "./src/index.ts"
package/src/index.ts CHANGED
@@ -20,9 +20,8 @@ function opencodeConfigDir(): string {
20
20
  function loadHosts(inlineHosts: any): Record<string, HostConfig> {
21
21
  const home = homedir()
22
22
  const paths = [
23
- join(opencodeConfigDir(), "hosts.json"),
24
23
  join(home, ".config", "opencode", "hosts.json"),
25
- join(pluginDir, "..", "hosts.json"),
24
+ join(opencodeConfigDir(), "hosts.json"),
26
25
  ]
27
26
 
28
27
  const inline = parseHostsEntry(inlineHosts)