@evident-ai/cli 3.1.1-dev.dcb2f6d → 3.1.1-dev.dd048b6
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 +68 -13
- package/dist/index.js +2082 -219
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,19 +72,21 @@ delivers any channel messages (e.g. Slack) to your local OpenCode.
|
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
# Interactive: connect a specific runner
|
|
75
|
-
evident run --
|
|
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
|
-
-
|
|
86
|
+
- `--runner [id]` — Runner ID to connect to. Optional when `EVIDENT_RUNNER_KEY`
|
|
87
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:
|
|
90
92
|
`info`). Env: `EVIDENT_LOG_LEVEL`.
|
|
@@ -92,7 +94,40 @@ Options:
|
|
|
92
94
|
- `-c, --conversation <id>` — Process only this specific conversation.
|
|
93
95
|
- `--idle-timeout <seconds>` — Exit after N seconds with no pending work (useful
|
|
94
96
|
in CI to avoid polling indefinitely).
|
|
97
|
+
- `--opencode-start-timeout <seconds>` — How long to wait for OpenCode to become
|
|
98
|
+
healthy when the runner starts it itself (default: `180`). On expiry the runner
|
|
99
|
+
warns and comes online anyway rather than failing. Env:
|
|
100
|
+
`EVIDENT_OPENCODE_START_TIMEOUT` (seconds).
|
|
101
|
+
- `--claude-usage-reporting <mode>` — Whether to report the local Claude Code
|
|
102
|
+
subscription's rate-limit usage to Evident, so it shows on the runner page:
|
|
103
|
+
`auto` (default) reports it when a usable Claude Code login is found on this
|
|
104
|
+
machine and stays silent otherwise; `on` forces reporting and warns loudly (and
|
|
105
|
+
keeps retrying) if no usable login is found; `off` disables it entirely — no
|
|
106
|
+
Claude credential is ever read. An unrecognized value falls back to `auto` with
|
|
107
|
+
a warning. Env: `EVIDENT_CLAUDE_USAGE_REPORTING`.
|
|
95
108
|
- `--json` — Output in JSON format (forces non-interactive mode).
|
|
109
|
+
- `--session-cleanup-max-age <duration>` — Delete OpenCode sessions idle longer
|
|
110
|
+
than this window (format `<number><unit>`, unit one of `s, m, h, d` — e.g.
|
|
111
|
+
`7d`, `24h`). Setting this (or `--session-cleanup-max-count`) is what enables
|
|
112
|
+
cleanup — there is no separate on/off flag. An invalid value is warned about
|
|
113
|
+
and ignored, which can leave cleanup off if it was the only rule set. Env:
|
|
114
|
+
`EVIDENT_SESSION_CLEANUP_MAX_AGE`.
|
|
115
|
+
- `--session-cleanup-max-count <n>` — Keep only the newest N OpenCode sessions
|
|
116
|
+
by last activity, deleting the rest. Also enables cleanup; combines with
|
|
117
|
+
`--session-cleanup-max-age` as OR. A session with a turn actively in progress
|
|
118
|
+
is never deleted, regardless of either rule. Env:
|
|
119
|
+
`EVIDENT_SESSION_CLEANUP_MAX_COUNT`.
|
|
120
|
+
- `--session-cleanup-interval <duration>` — How often the cleanup sweep runs
|
|
121
|
+
(default: `1h`). An invalid value falls back to the default rather than
|
|
122
|
+
disabling cleanup. Env: `EVIDENT_SESSION_CLEANUP_INTERVAL`.
|
|
123
|
+
- `--enable-file-sync-to <dir>` — Let the runner write files Evident has queued
|
|
124
|
+
for it into this directory — it collects them as part of the polling it
|
|
125
|
+
already does, so they land a couple of seconds after you hand them over.
|
|
126
|
+
Repeatable (up to 16); each value must be absolute once a leading `~` is
|
|
127
|
+
expanded, and the filesystem root is rejected. Omit it entirely and the
|
|
128
|
+
runner collects nothing and refuses any queued file, telling you why. Use
|
|
129
|
+
`--enable-file-sync-to ~/.claude` to connect a Claude subscription from the
|
|
130
|
+
web — see the website's Model providers doc.
|
|
96
131
|
|
|
97
132
|
## Global flags
|
|
98
133
|
|
|
@@ -105,15 +140,32 @@ targets the **production** Evident platform by default.
|
|
|
105
140
|
|
|
106
141
|
## Environment variables
|
|
107
142
|
|
|
108
|
-
- `
|
|
109
|
-
that runner and resolves the runner ID automatically, so `--agent`
|
|
110
|
-
required. Ideal for CI/CD.
|
|
143
|
+
- `EVIDENT_RUNNER_KEY` — A runner key. When set, `evident run` authenticates as
|
|
144
|
+
that runner and resolves the runner ID automatically, so `--runner`/`--agent`
|
|
145
|
+
is not required. Ideal for CI/CD. Preferred name; wins over `EVIDENT_AGENT_KEY`
|
|
146
|
+
if both are set.
|
|
147
|
+
- `EVIDENT_AGENT_KEY` — Deprecated alias for `EVIDENT_RUNNER_KEY`. Still fully
|
|
148
|
+
supported, but `evident run` prints a deprecation warning when it is used
|
|
149
|
+
without `EVIDENT_RUNNER_KEY`.
|
|
111
150
|
- `EVIDENT_TOKEN` — A user token used for authentication (alternative to a
|
|
112
151
|
keychain login from `evident login`).
|
|
113
152
|
- `EVIDENT_API_URL` — Override the API base URL (equivalent to `--endpoint`).
|
|
114
153
|
- `EVIDENT_TUNNEL_URL` — Override the tunnel relay URL (equivalent to `--tunnel`).
|
|
115
|
-
|
|
116
|
-
|
|
154
|
+
- `EVIDENT_CLAUDE_USAGE_REPORTING` — Equivalent to `--claude-usage-reporting`; the
|
|
155
|
+
flag wins if both are set.
|
|
156
|
+
- `EVIDENT_LOG_LEVEL` — Equivalent to `--log-level`; the flag wins if both are
|
|
157
|
+
set, and `-v`/`--verbose` also outranks this env var.
|
|
158
|
+
- `EVIDENT_OPENCODE_START_TIMEOUT` — Equivalent to `--opencode-start-timeout`
|
|
159
|
+
(seconds); the flag wins if both are set.
|
|
160
|
+
- `EVIDENT_SESSION_CLEANUP_MAX_AGE` — Equivalent to `--session-cleanup-max-age`;
|
|
161
|
+
the flag wins if both are set.
|
|
162
|
+
- `EVIDENT_SESSION_CLEANUP_MAX_COUNT` — Equivalent to
|
|
163
|
+
`--session-cleanup-max-count`; the flag wins if both are set.
|
|
164
|
+
- `EVIDENT_SESSION_CLEANUP_INTERVAL` — Equivalent to
|
|
165
|
+
`--session-cleanup-interval`; the flag wins if both are set.
|
|
166
|
+
|
|
167
|
+
Authentication precedence for `run`: `EVIDENT_RUNNER_KEY`/`EVIDENT_AGENT_KEY`
|
|
168
|
+
(tied; `EVIDENT_RUNNER_KEY` wins if both are set) → `EVIDENT_TOKEN` →
|
|
117
169
|
credentials stored by `evident login`. For the URL flags, an explicit
|
|
118
170
|
`--endpoint` / `--tunnel` flag wins over the matching environment variable, which
|
|
119
171
|
in turn overrides the production default.
|
|
@@ -137,19 +189,22 @@ ID.
|
|
|
137
189
|
From your project directory, start the runner:
|
|
138
190
|
|
|
139
191
|
```bash
|
|
140
|
-
evident run --
|
|
192
|
+
evident run --runner <runner-id>
|
|
141
193
|
```
|
|
142
194
|
|
|
143
195
|
`evident run` ensures `opencode serve` is running on `127.0.0.1:4096` (starting
|
|
144
196
|
it if needed) and connects the tunnel. Once connected, the web shows the runner as
|
|
145
197
|
online and you can open its chat.
|
|
146
198
|
|
|
147
|
-
For CI or unattended use, set `
|
|
199
|
+
For CI or unattended use, set `EVIDENT_RUNNER_KEY` and omit `--runner`:
|
|
148
200
|
|
|
149
201
|
```bash
|
|
150
|
-
|
|
202
|
+
EVIDENT_RUNNER_KEY=<runner-key> evident run --idle-timeout 30
|
|
151
203
|
```
|
|
152
204
|
|
|
205
|
+
(`EVIDENT_AGENT_KEY` is a still-supported deprecated alias for
|
|
206
|
+
`EVIDENT_RUNNER_KEY`.)
|
|
207
|
+
|
|
153
208
|
## How it works
|
|
154
209
|
|
|
155
210
|
```
|
|
@@ -185,7 +240,7 @@ evident logout
|
|
|
185
240
|
evident login
|
|
186
241
|
```
|
|
187
242
|
|
|
188
|
-
In CI, make sure `
|
|
243
|
+
In CI, make sure `EVIDENT_RUNNER_KEY` (or `EVIDENT_TOKEN`) is set.
|
|
189
244
|
|
|
190
245
|
### OpenCode isn't reachable
|
|
191
246
|
|