@runneth/cli 0.0.0-sha.c2efcbb60abb.production → 0.0.0-sha.cace84c23d32.production
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 +160 -36
- package/dist/cli.js +2205 -251
- package/dist/index.d.ts +12694 -1575
- package/dist/index.js +2 -2
- package/dist/src.js +10103 -2385
- package/package.json +8 -2
- package/skills/runneth/SKILL.md +177 -36
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# runneth-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Runneth brings your AI brain for marketing to the terminal, by [Motion](http://motionapp.com/).
|
|
4
|
+
Use interactive chat, connect to a Runneth VM, or automate conversations and local shell sessions.
|
|
5
|
+
Looking for a web version? [Open Runneth](https://app.runneth.com/).
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
8
|
npx @runneth/cli open
|
|
@@ -28,36 +30,54 @@ Use the npm `beta` channel to try the production build before it is promoted to
|
|
|
28
30
|
npx @runneth/cli@beta ssh
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
`runneth open` starts a small local daemon for the current user. Later `send`
|
|
32
34
|
calls reuse the same shell process through a local socket, so `cd`, exported
|
|
33
35
|
environment variables, and other shell state persist between commands.
|
|
34
36
|
|
|
35
|
-
##
|
|
37
|
+
## Find a command
|
|
38
|
+
|
|
39
|
+
Run `runneth` or `runneth --help` to see commands grouped by purpose. Each
|
|
40
|
+
description explains what the command does and who it is for. Subcommands are
|
|
41
|
+
nested beneath their parent, with descriptions. Use `runneth help --all` for
|
|
42
|
+
a flat list with full command paths.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
runneth help --all
|
|
46
|
+
runneth help ssh
|
|
47
|
+
runneth conversation send --help
|
|
48
|
+
runneth --version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Every command supports `--help` and `-h`. Help runs before sign-in, daemon startup,
|
|
52
|
+
or command execution. `runneth help --json` returns the public command catalog with
|
|
53
|
+
its schema version, package version, command paths, options, required inputs,
|
|
54
|
+
output formats, and effects. Use `runneth help conversation --json` for one group.
|
|
55
|
+
|
|
56
|
+
| Commands | Purpose | Audience |
|
|
57
|
+
| ---------------------------------------- | ---------------------------------------------- | ------------- |
|
|
58
|
+
| `chat` | Interactive Runneth conversation | Human |
|
|
59
|
+
| `conversation create/send/state/session` | Remote conversation API through JSON or JSONL | Agent |
|
|
60
|
+
| `ssh` | Remote shell or command on a Runneth VM | Both |
|
|
61
|
+
| `ssh stdio` | Persistent remote JSONL control process | Agent |
|
|
62
|
+
| `ssh target add/import/list/use/remove` | Saved VM connections on your computer | Both |
|
|
63
|
+
| `oauth login/status/logout` | Sign-in and locally stored credentials | Both |
|
|
64
|
+
| `update` | Install the current CLI update channel | Both |
|
|
65
|
+
| `skills install` | Runneth instructions for Claude Code and Codex | Human |
|
|
66
|
+
| `open/send/status/list/close/shutdown` | Persistent shells on your computer | Agent or both |
|
|
67
|
+
|
|
68
|
+
Local shell commands return JSON. They execute on your computer; use `ssh` or
|
|
69
|
+
`ssh stdio` to execute on a Runneth VM. Put shell or remote arguments after `--`,
|
|
70
|
+
including a command's own `--help`:
|
|
36
71
|
|
|
37
72
|
```bash
|
|
38
|
-
runneth
|
|
39
|
-
runneth
|
|
40
|
-
runneth status [--name default]
|
|
41
|
-
runneth list
|
|
42
|
-
runneth close [--name default]
|
|
43
|
-
runneth oauth login [--resource <url>] [--client-id|--clientid <id>] [--client-secret|--secret <value>] [--client-name "Runneth MCP"] [--scope <scope>] [--no-open]
|
|
44
|
-
runneth oauth status [--resource <url>]
|
|
45
|
-
runneth oauth logout [--resource <url>]
|
|
46
|
-
runneth chat --workspace <workspace-id> [--api <builder-url>] [--resource <url>] [--auth mondrian|builder] [--conversation <id>]
|
|
47
|
-
runneth conversation create --workspace <workspace-id> --json [--title <title>]
|
|
48
|
-
runneth conversation send --workspace <workspace-id> --conversation <id> --json (--message <text> | --stdin)
|
|
49
|
-
runneth conversation state --workspace <workspace-id> --conversation <id> --json
|
|
50
|
-
runneth conversation session --workspace <workspace-id> --jsonl
|
|
51
|
-
runneth ssh target add <name> (--host <host> | --ssh-url <url>) [--resource <url>] [--default]
|
|
52
|
-
runneth ssh target import <file>
|
|
53
|
-
runneth ssh target list
|
|
54
|
-
runneth ssh target use <name>
|
|
55
|
-
runneth ssh [--target <name>] [--unique-key | --identity-file <path>] [-- remote-command]
|
|
56
|
-
runneth ssh stdio [--target <name>] [--unique-key | --identity-file <path>]
|
|
57
|
-
runneth skills install [--agent claude|codex|all]
|
|
58
|
-
runneth shutdown
|
|
73
|
+
runneth send -- pnpm --help
|
|
74
|
+
runneth ssh --target team -- node --help
|
|
59
75
|
```
|
|
60
76
|
|
|
77
|
+
Interactive help and chat share a terminal logo. Small windows use a compact
|
|
78
|
+
header, `NO_COLOR=1` disables color, and pipes and `TERM=dumb` use plain text.
|
|
79
|
+
Terminals with hyperlink support can open the Motion and Runneth web links.
|
|
80
|
+
|
|
61
81
|
Use `--stdin` for multi-line commands:
|
|
62
82
|
|
|
63
83
|
```bash
|
|
@@ -67,12 +87,109 @@ pnpm check
|
|
|
67
87
|
SCRIPT
|
|
68
88
|
```
|
|
69
89
|
|
|
70
|
-
|
|
71
|
-
use a different state directory.
|
|
90
|
+
CLI state files live under `~/.runneth-cli` by default. Set `RUNNETH_CLI_HOME`
|
|
91
|
+
to use a different state directory. Update installation locks use a separate
|
|
92
|
+
per-user location so two CLI homes cannot update the same installation at the
|
|
93
|
+
same time.
|
|
94
|
+
|
|
95
|
+
## CLI Updates
|
|
96
|
+
|
|
97
|
+
Each eligible CLI startup launches a small detached worker and immediately
|
|
98
|
+
continues the requested command. The worker verifies the active global npm or
|
|
99
|
+
pnpm installation, then claims at most one registry check every 20 hours for
|
|
100
|
+
that installation, package, and channel. Project-local installations cannot
|
|
101
|
+
claim or suppress that interval. The worker only caches the promoted `latest`
|
|
102
|
+
target; it never installs an update in the background. Installing another CLI
|
|
103
|
+
version does not reset the interval.
|
|
104
|
+
|
|
105
|
+
The cached result is scoped to the exact installation and installed version
|
|
106
|
+
that was checked. The worker compares registry publication times so a rolled
|
|
107
|
+
back channel or an older target is never presented as an update. A **Do not
|
|
108
|
+
remind me** choice is scoped to the installation, release channel, and target
|
|
109
|
+
version, so it remains effective after another version is installed and a
|
|
110
|
+
concurrent refresh cannot erase it. When a valid cached update is available, an
|
|
111
|
+
interactive `chat` command or interactive `ssh` shell shows three choices:
|
|
112
|
+
**Update now** (selected by default and showing the command that will run),
|
|
113
|
+
**Not now**, and **Do not remind me for this version**. Use the arrow keys or
|
|
114
|
+
`j`/`k` and press Enter. Help, one-shot SSH, other interactive terminal commands,
|
|
115
|
+
non-interactive commands, and machine-readable commands never resolve a cached
|
|
116
|
+
candidate or pause for update input. Eligible commands inspect only local
|
|
117
|
+
cached state in the foreground. They do not run a package manager or contact
|
|
118
|
+
the registry.
|
|
119
|
+
|
|
120
|
+
Background-check failures do not interrupt the requested command. The detached
|
|
121
|
+
worker writes the latest diagnostic to
|
|
122
|
+
`~/.runneth-cli/update-check-error.log` (or the configured
|
|
123
|
+
`RUNNETH_CLI_HOME`); the next attempt replaces it.
|
|
124
|
+
|
|
125
|
+
Choosing **Update now** installs the exact version shown in the selector.
|
|
126
|
+
`runneth update` instead follows `latest`, such as
|
|
127
|
+
`pnpm add --global @runneth/cli@latest`. Global npm and pnpm installations
|
|
128
|
+
update through their original package manager and the installation root
|
|
129
|
+
recorded by the background check. The pnpm executable directory is also recorded
|
|
130
|
+
and pinned during replacement, so changing `PNPM_HOME` cannot redirect the
|
|
131
|
+
installed commands. A package-manager failure exits with its
|
|
132
|
+
status. The CLI asks the user to rerun the original command afterward. Source
|
|
133
|
+
checkouts, project-local dependencies, and npm-exec or npx invocations are not
|
|
134
|
+
modified. For npx, rerun with `npx @runneth/cli@latest`.
|
|
135
|
+
|
|
136
|
+
Before the first manual package-manager upgrade that installs the updater, let
|
|
137
|
+
persistent sessions finish, close them, and run `runneth shutdown` with the
|
|
138
|
+
installed CLI in every CLI home or custom socket you use. Older daemons do not
|
|
139
|
+
publish registrations, so this one-time shutdown is required across all homes.
|
|
140
|
+
If you already upgraded with an old daemon running, `close` and `shutdown`
|
|
141
|
+
remain available. Other daemon-backed commands and updates refuse a reachable
|
|
142
|
+
unregistered daemon in the current home until you shut it down.
|
|
143
|
+
|
|
144
|
+
The updater does not interrupt a running local daemon or its persistent
|
|
145
|
+
sessions. It refuses to change the installation until the user closes those
|
|
146
|
+
sessions and runs `runneth shutdown`. A shared gate prevents normal CLI
|
|
147
|
+
commands from starting another daemon during installation. The next
|
|
148
|
+
daemon-backed command starts from the updated installation.
|
|
149
|
+
|
|
150
|
+
Daemon registrations and the transition lock live in
|
|
151
|
+
`.runneth-cli-daemon-gates` under the operating-system account home. Changing
|
|
152
|
+
`TMPDIR`, `TEMP`, `TMP`, or `RUNNETH_CLI_HOME` does not select a separate gate.
|
|
153
|
+
|
|
154
|
+
### Interrupted-update recovery
|
|
155
|
+
|
|
156
|
+
Before npm or pnpm starts replacing files, the updater reserves
|
|
157
|
+
`replacement.json` under `.runneth-cli-daemon-gates` in the operating-system
|
|
158
|
+
account home. This record blocks new daemon startup and further updates across
|
|
159
|
+
CLI homes and package directories, even after an updater crash or `SIGKILL`
|
|
160
|
+
allows its heartbeat locks to expire. Existing daemons for other installations
|
|
161
|
+
can still be used and shut down. The record has no expiry. An incomplete or
|
|
162
|
+
unreadable record also blocks admission.
|
|
163
|
+
|
|
164
|
+
The updater removes its own record only after the package-manager child exits.
|
|
165
|
+
If the updater dies first, use this recovery procedure:
|
|
166
|
+
|
|
167
|
+
1. Restart the computer. This stops orphaned npm/pnpm processes and their install
|
|
168
|
+
scripts. Keep the replacement record in place during recovery.
|
|
169
|
+
2. Inspect the record at the exact path printed by the CLI. Its `command`, `args`,
|
|
170
|
+
`installationRoot`, and `packageName` identify the attempted replacement.
|
|
171
|
+
Run that package-manager installation command directly to repair the same
|
|
172
|
+
global installation, preserving its prefix or pnpm global directories.
|
|
173
|
+
If the record is incomplete, identify the affected installation and repair
|
|
174
|
+
it before continuing; do not infer that no installer ran.
|
|
175
|
+
3. Require a successful install and verify the repaired CLI's `--version` and
|
|
176
|
+
`--help`. If either fails, keep the record and finish repairing the package.
|
|
177
|
+
4. Remove only the `replacement.json` file at the reported path, then rerun the
|
|
178
|
+
intended command. Do not remove registration directories or heartbeat locks.
|
|
179
|
+
|
|
180
|
+
Do not clear the record because it is old or its updater PID no longer exists.
|
|
181
|
+
Those facts cannot prove that package-manager descendants stopped or that the
|
|
182
|
+
installation is complete.
|
|
183
|
+
|
|
184
|
+
`runneth shutdown` succeeds when the selected daemon is already stopped. It
|
|
185
|
+
does not start a daemon. After the daemon acknowledges shutdown, health-check
|
|
186
|
+
timeouts are retried for up to five seconds while it stops. A shutdown request
|
|
187
|
+
timeout, an expired stop deadline, or a permission or protocol failure remains
|
|
188
|
+
an error.
|
|
72
189
|
|
|
73
190
|
## OAuth
|
|
74
191
|
|
|
75
|
-
`runneth
|
|
192
|
+
`runneth oauth login` performs OAuth protected-resource discovery, PKCE
|
|
76
193
|
authorization, and token exchange through a local loopback callback. By default
|
|
77
194
|
it uses dynamic client registration as a public MCP-style client. Provide
|
|
78
195
|
`--client-id`/`--clientid` and `--client-secret`/`--secret`, or set
|
|
@@ -91,7 +208,7 @@ internally when the server issued a refresh token.
|
|
|
91
208
|
|
|
92
209
|
## Chat
|
|
93
210
|
|
|
94
|
-
`runneth
|
|
211
|
+
`runneth chat` starts an interactive terminal conversation against Builder's
|
|
95
212
|
canonical Runneth conversation API. Official environment builds carry the
|
|
96
213
|
correct Builder URL in the package; use `--api` only for local or custom Builder
|
|
97
214
|
deployments.
|
|
@@ -110,7 +227,7 @@ Inside the terminal UI, use `/state` to redraw the current conversation and
|
|
|
110
227
|
|
|
111
228
|
## Conversation Commands
|
|
112
229
|
|
|
113
|
-
`runneth
|
|
230
|
+
`runneth conversation` is the machine-oriented conversation interface for
|
|
114
231
|
agents and scripts. It uses the same auth, workspace scoping, and conversation
|
|
115
232
|
API as `runneth chat`, but avoids terminal banners and ANSI UI output.
|
|
116
233
|
|
|
@@ -157,22 +274,29 @@ Typical responses:
|
|
|
157
274
|
|
|
158
275
|
## SSH
|
|
159
276
|
|
|
160
|
-
`runneth
|
|
161
|
-
credential exists yet, it starts the OAuth login flow first.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
277
|
+
`runneth ssh` uses the stored OAuth credential for the resource. If no
|
|
278
|
+
credential exists yet, it starts the OAuth login flow first. Pass a conversation
|
|
279
|
+
and workspace to resolve its public SSH app target from Builder, or pass a
|
|
280
|
+
named, host, or URL target directly. The first SSH connection for a resource/app
|
|
281
|
+
pair generates an ed25519 keypair, sends the public key to the Runneth SSH app,
|
|
282
|
+
writes an isolated OpenSSH config, and then starts `ssh` through the app tunnel.
|
|
165
283
|
|
|
166
284
|
```bash
|
|
167
285
|
runneth ssh \
|
|
286
|
+
--conversation 11111111-1111-4111-8111-111111111111 \
|
|
287
|
+
--workspace 22222222-2222-4222-8222-222222222222 \
|
|
168
288
|
--resource https://projects.motionapp.com/mcp \
|
|
169
|
-
--
|
|
289
|
+
--api https://projects.motionapp.com
|
|
170
290
|
```
|
|
171
291
|
|
|
172
292
|
SSH keys, known hosts, and generated config files are stored under
|
|
173
293
|
`~/.runneth-cli/ssh`. The generated OpenSSH config uses an internal
|
|
174
294
|
`ProxyCommand` transport that attaches the OAuth bearer token to the SSH app
|
|
175
|
-
|
|
295
|
+
tunnel. The CLI reads the target VM's authenticated `/runneth/ssh/api` metadata
|
|
296
|
+
before connecting, independently of app catalog health:
|
|
297
|
+
VMs that advertise `runneth-ssh-v1` use one full-duplex WebSocket, while older
|
|
298
|
+
VMs continue through the HTTPS tunnel. Transport selection is automatic. Capability
|
|
299
|
+
discovery allows 70 seconds for authorization and response delivery.
|
|
176
300
|
|
|
177
301
|
### SSH stdio
|
|
178
302
|
|