@evident-ai/cli 3.0.1-dev.fffc02d → 3.1.1-dev.019c4e9
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 +36 -24
- package/dist/index.js +2626 -309
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Run OpenCode locally and connect it to the [Evident](https://evident.run) platfo
|
|
|
5
5
|
The `evident` CLI starts (or attaches to) `opencode serve` on your machine and
|
|
6
6
|
exposes it to Evident over a secure tunnel. Your code, secrets, and tools stay
|
|
7
7
|
local — only the messages you send travel through Evident. Once connected, you
|
|
8
|
-
can reach your
|
|
8
|
+
can reach your runner from the web and from Slack.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -65,28 +65,32 @@ evident whoami
|
|
|
65
65
|
|
|
66
66
|
### `evident run`
|
|
67
67
|
|
|
68
|
-
Connect to Evident and serve your
|
|
69
|
-
which
|
|
70
|
-
streaming tunnel (which transparently proxies the
|
|
68
|
+
Connect to Evident and serve your runner. `evident run` authenticates, resolves
|
|
69
|
+
which runner to run, ensures `opencode serve` is running on loopback, opens the
|
|
70
|
+
streaming tunnel (which transparently proxies the runner's web surface), and
|
|
71
71
|
delivers any channel messages (e.g. Slack) to your local OpenCode.
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
# Interactive: connect a specific
|
|
75
|
-
evident run --
|
|
74
|
+
# Interactive: connect a specific runner
|
|
75
|
+
evident run --runner <runner-id>
|
|
76
76
|
|
|
77
77
|
# Drive a single conversation
|
|
78
|
-
evident run --
|
|
78
|
+
evident run --runner <runner-id> --conversation <conversation-id>
|
|
79
79
|
|
|
80
80
|
# CI: exit after 30s with no work
|
|
81
|
-
evident run --
|
|
81
|
+
evident run --runner <runner-id> --idle-timeout 30
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Options:
|
|
85
85
|
|
|
86
|
-
-
|
|
87
|
-
is set (the
|
|
86
|
+
- `--runner [id]` — Runner ID to connect to. Optional when `EVIDENT_RUNNER_KEY`
|
|
87
|
+
is set (the runner is then resolved automatically from the key).
|
|
88
|
+
- `-a, --agent [id]` — Deprecated alias for `--runner`. Still supported, but it
|
|
89
|
+
prints a deprecation warning; `--runner` wins if both are given.
|
|
88
90
|
- `-p, --port <port>` — OpenCode port (default: `4096`).
|
|
89
|
-
-
|
|
91
|
+
- `--log-level <level>` — Log verbosity: `debug | info | warn | error` (default:
|
|
92
|
+
`info`). Env: `EVIDENT_LOG_LEVEL`.
|
|
93
|
+
- `-v, --verbose` — Alias for `--log-level debug` (an explicit `--log-level` wins).
|
|
90
94
|
- `-c, --conversation <id>` — Process only this specific conversation.
|
|
91
95
|
- `--idle-timeout <seconds>` — Exit after N seconds with no pending work (useful
|
|
92
96
|
in CI to avoid polling indefinitely).
|
|
@@ -103,15 +107,20 @@ targets the **production** Evident platform by default.
|
|
|
103
107
|
|
|
104
108
|
## Environment variables
|
|
105
109
|
|
|
106
|
-
- `
|
|
107
|
-
that
|
|
108
|
-
required. Ideal for CI/CD.
|
|
110
|
+
- `EVIDENT_RUNNER_KEY` — A runner key. When set, `evident run` authenticates as
|
|
111
|
+
that runner and resolves the runner ID automatically, so `--runner`/`--agent`
|
|
112
|
+
is not required. Ideal for CI/CD. Preferred name; wins over `EVIDENT_AGENT_KEY`
|
|
113
|
+
if both are set.
|
|
114
|
+
- `EVIDENT_AGENT_KEY` — Deprecated alias for `EVIDENT_RUNNER_KEY`. Still fully
|
|
115
|
+
supported, but `evident run` prints a deprecation warning when it is used
|
|
116
|
+
without `EVIDENT_RUNNER_KEY`.
|
|
109
117
|
- `EVIDENT_TOKEN` — A user token used for authentication (alternative to a
|
|
110
118
|
keychain login from `evident login`).
|
|
111
119
|
- `EVIDENT_API_URL` — Override the API base URL (equivalent to `--endpoint`).
|
|
112
120
|
- `EVIDENT_TUNNEL_URL` — Override the tunnel relay URL (equivalent to `--tunnel`).
|
|
113
121
|
|
|
114
|
-
Authentication precedence for `run`: `EVIDENT_AGENT_KEY`
|
|
122
|
+
Authentication precedence for `run`: `EVIDENT_RUNNER_KEY`/`EVIDENT_AGENT_KEY`
|
|
123
|
+
(tied; `EVIDENT_RUNNER_KEY` wins if both are set) → `EVIDENT_TOKEN` →
|
|
115
124
|
credentials stored by `evident login`. For the URL flags, an explicit
|
|
116
125
|
`--endpoint` / `--tunnel` flag wins over the matching environment variable, which
|
|
117
126
|
in turn overrides the production default.
|
|
@@ -125,29 +134,32 @@ npm install -g @evident-ai/cli
|
|
|
125
134
|
evident login
|
|
126
135
|
```
|
|
127
136
|
|
|
128
|
-
### 2. Create
|
|
137
|
+
### 2. Create a runner
|
|
129
138
|
|
|
130
|
-
In the Evident web app, create
|
|
139
|
+
In the Evident web app, create a runner (it runs in local mode). Note its runner
|
|
131
140
|
ID.
|
|
132
141
|
|
|
133
142
|
### 3. Run it on your machine
|
|
134
143
|
|
|
135
|
-
From your project directory, start the
|
|
144
|
+
From your project directory, start the runner:
|
|
136
145
|
|
|
137
146
|
```bash
|
|
138
|
-
evident run --
|
|
147
|
+
evident run --runner <runner-id>
|
|
139
148
|
```
|
|
140
149
|
|
|
141
150
|
`evident run` ensures `opencode serve` is running on `127.0.0.1:4096` (starting
|
|
142
|
-
it if needed) and connects the tunnel. Once connected, the web shows the
|
|
151
|
+
it if needed) and connects the tunnel. Once connected, the web shows the runner as
|
|
143
152
|
online and you can open its chat.
|
|
144
153
|
|
|
145
|
-
For CI or unattended use, set `
|
|
154
|
+
For CI or unattended use, set `EVIDENT_RUNNER_KEY` and omit `--runner`:
|
|
146
155
|
|
|
147
156
|
```bash
|
|
148
|
-
|
|
157
|
+
EVIDENT_RUNNER_KEY=<runner-key> evident run --idle-timeout 30
|
|
149
158
|
```
|
|
150
159
|
|
|
160
|
+
(`EVIDENT_AGENT_KEY` is a still-supported deprecated alias for
|
|
161
|
+
`EVIDENT_RUNNER_KEY`.)
|
|
162
|
+
|
|
151
163
|
## How it works
|
|
152
164
|
|
|
153
165
|
```
|
|
@@ -166,7 +178,7 @@ EVIDENT_AGENT_KEY=<agent-key> evident run --idle-timeout 30
|
|
|
166
178
|
2. It opens an outbound WebSocket to the Evident tunnel relay.
|
|
167
179
|
3. Evident routes web traffic and channel (e.g. Slack) messages through the
|
|
168
180
|
tunnel to your local OpenCode; responses flow back the same way.
|
|
169
|
-
4. Only one running copy of
|
|
181
|
+
4. Only one running copy of a runner is active at a time — starting a second copy
|
|
170
182
|
takes over.
|
|
171
183
|
|
|
172
184
|
See [ADR-0039](../../docs/decisions/0039-reuse-opencode-web-ui.md) and
|
|
@@ -183,7 +195,7 @@ evident logout
|
|
|
183
195
|
evident login
|
|
184
196
|
```
|
|
185
197
|
|
|
186
|
-
In CI, make sure `
|
|
198
|
+
In CI, make sure `EVIDENT_RUNNER_KEY` (or `EVIDENT_TOKEN`) is set.
|
|
187
199
|
|
|
188
200
|
### OpenCode isn't reachable
|
|
189
201
|
|