@rungent/cli 0.0.0 → 0.6.0

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/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 Rungent Contributors
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
package/README.md CHANGED
@@ -1,3 +1,35 @@
1
1
  # @rungent/cli
2
2
 
3
- Placeholder. The first release is 0.6.0, from https://github.com/rungent/rungent.
3
+ The command line of any [rungent](https://rungent.acahti.dev) host. Its commands come from the
4
+ host's MCP tools at run time, so they always match what your account may do. It has no
5
+ dependencies.
6
+
7
+ ```bash
8
+ npx @rungent/cli login https://console.example.com # asks for the token; or --token-stdin < token.txt
9
+ npx @rungent/cli tools # every command the host offers you
10
+ npx @rungent/cli search "gpu box" # search everything you can see in the product
11
+ npx @rungent/cli vm stop vm-42 --forced # a host command; writes ask for confirmation (--yes)
12
+ ```
13
+
14
+ Installed with `npm i -g @rungent/cli`, the command is `rungent-cli`. The host is `--host`, else
15
+ `$RUNGENT_CLI_HOST`, else the last host logged in to; the token is `$RUNGENT_CLI_TOKEN`, else the one
16
+ `login` saved (`~/.config/rungent/hosts.json`, 0600). No command prints a token. A host command of
17
+ the same name as a built-in (`login`, `logout`, `status`, `tools`) wins; `rungent:<name>` always
18
+ runs the built-in. Output is JSON on stdout; exit codes: 0 ok, 1 tool error, 2 usage, 3 auth,
19
+ 4 network. Every command takes `--help`.
20
+
21
+ ## A branded CLI
22
+
23
+ A product's own command (`acme`) is a few lines over `run`; `npx rungent brand` writes the package.
24
+
25
+ ```ts
26
+ import { run } from '@rungent/cli';
27
+
28
+ process.exitCode = await run(process.argv.slice(2), {
29
+ program: 'acme',
30
+ host: 'https://console.example.com', // optional preset
31
+ env: { host: 'ACME_HOST', token: 'ACME_TOKEN' }, // default <PROGRAM>_HOST, <PROGRAM>_TOKEN
32
+ });
33
+ ```
34
+
35
+ License: Apache-2.0.
@@ -0,0 +1,229 @@
1
+ # Third-party notices
2
+
3
+ `@rungent/cli` bundles the following packages into `dist/` so that it installs no dependencies.
4
+
5
+ ## @modelcontextprotocol/sdk 1.32.2 (MIT)
6
+
7
+ MIT License
8
+
9
+ Copyright (c) 2024 Anthropic, PBC
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ ## ajv 8.20.0 (MIT)
30
+
31
+ The MIT License (MIT)
32
+
33
+ Copyright (c) 2015-2021 Evgeny Poberezkin
34
+
35
+ Permission is hereby granted, free of charge, to any person obtaining a copy
36
+ of this software and associated documentation files (the "Software"), to deal
37
+ in the Software without restriction, including without limitation the rights
38
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
39
+ copies of the Software, and to permit persons to whom the Software is
40
+ furnished to do so, subject to the following conditions:
41
+
42
+ The above copyright notice and this permission notice shall be included in all
43
+ copies or substantial portions of the Software.
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
46
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
47
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
48
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
49
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
50
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
51
+ SOFTWARE.
52
+
53
+ ## ajv-formats 3.0.1 (MIT)
54
+
55
+ MIT License
56
+
57
+ Copyright (c) 2020 Evgeny Poberezkin
58
+
59
+ Permission is hereby granted, free of charge, to any person obtaining a copy
60
+ of this software and associated documentation files (the "Software"), to deal
61
+ in the Software without restriction, including without limitation the rights
62
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63
+ copies of the Software, and to permit persons to whom the Software is
64
+ furnished to do so, subject to the following conditions:
65
+
66
+ The above copyright notice and this permission notice shall be included in all
67
+ copies or substantial portions of the Software.
68
+
69
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
75
+ SOFTWARE.
76
+
77
+ ## eventsource-parser 3.1.1 (MIT)
78
+
79
+ MIT License
80
+
81
+ Copyright (c) 2026 Espen Hovlandsdal <espen@hovlandsdal.com>
82
+
83
+ Permission is hereby granted, free of charge, to any person obtaining a copy
84
+ of this software and associated documentation files (the "Software"), to deal
85
+ in the Software without restriction, including without limitation the rights
86
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87
+ copies of the Software, and to permit persons to whom the Software is
88
+ furnished to do so, subject to the following conditions:
89
+
90
+ The above copyright notice and this permission notice shall be included in all
91
+ copies or substantial portions of the Software.
92
+
93
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
96
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
99
+ SOFTWARE.
100
+
101
+ ## fast-deep-equal 3.1.3 (MIT)
102
+
103
+ MIT License
104
+
105
+ Copyright (c) 2017 Evgeny Poberezkin
106
+
107
+ Permission is hereby granted, free of charge, to any person obtaining a copy
108
+ of this software and associated documentation files (the "Software"), to deal
109
+ in the Software without restriction, including without limitation the rights
110
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
+ copies of the Software, and to permit persons to whom the Software is
112
+ furnished to do so, subject to the following conditions:
113
+
114
+ The above copyright notice and this permission notice shall be included in all
115
+ copies or substantial portions of the Software.
116
+
117
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
123
+ SOFTWARE.
124
+
125
+ ## fast-uri 3.1.9 (BSD-3-Clause)
126
+
127
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
128
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
129
+ All rights reserved.
130
+
131
+ Redistribution and use in source and binary forms, with or without
132
+ modification, are permitted provided that the following conditions are met:
133
+ * Redistributions of source code must retain the above copyright
134
+ notice, this list of conditions and the following disclaimer.
135
+ * Redistributions in binary form must reproduce the above copyright
136
+ notice, this list of conditions and the following disclaimer in the
137
+ documentation and/or other materials provided with the distribution.
138
+ * The names of any contributors may not be used to endorse or promote
139
+ products derived from this software without specific prior written
140
+ permission.
141
+
142
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
143
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
144
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
145
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
146
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
147
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
148
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
149
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
150
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
151
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
152
+
153
+ * * *
154
+
155
+ The complete list of contributors can be found at:
156
+ - https://github.com/garycourt/uri-js/graphs/contributors
157
+
158
+ ## json-schema-traverse 1.0.0 (MIT)
159
+
160
+ MIT License
161
+
162
+ Copyright (c) 2017 Evgeny Poberezkin
163
+
164
+ Permission is hereby granted, free of charge, to any person obtaining a copy
165
+ of this software and associated documentation files (the "Software"), to deal
166
+ in the Software without restriction, including without limitation the rights
167
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
168
+ copies of the Software, and to permit persons to whom the Software is
169
+ furnished to do so, subject to the following conditions:
170
+
171
+ The above copyright notice and this permission notice shall be included in all
172
+ copies or substantial portions of the Software.
173
+
174
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
175
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
177
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
178
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
179
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
180
+ SOFTWARE.
181
+
182
+ ## pkce-challenge 5.0.1 (MIT)
183
+
184
+ MIT License
185
+
186
+ Copyright (c) 2019
187
+
188
+ Permission is hereby granted, free of charge, to any person obtaining a copy
189
+ of this software and associated documentation files (the "Software"), to deal
190
+ in the Software without restriction, including without limitation the rights
191
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
192
+ copies of the Software, and to permit persons to whom the Software is
193
+ furnished to do so, subject to the following conditions:
194
+
195
+ The above copyright notice and this permission notice shall be included in all
196
+ copies or substantial portions of the Software.
197
+
198
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
199
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
200
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
201
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
202
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
203
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
204
+ SOFTWARE.
205
+
206
+ ## zod 4.6.7 (MIT)
207
+
208
+ MIT License
209
+
210
+ Copyright (c) 2025 Colin McDonnell
211
+
212
+ Permission is hereby granted, free of charge, to any person obtaining a copy
213
+ of this software and associated documentation files (the "Software"), to deal
214
+ in the Software without restriction, including without limitation the rights
215
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
216
+ copies of the Software, and to permit persons to whom the Software is
217
+ furnished to do so, subject to the following conditions:
218
+
219
+ The above copyright notice and this permission notice shall be included in all
220
+ copies or substantial portions of the Software.
221
+
222
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
223
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
224
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
225
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
226
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
227
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
228
+ SOFTWARE.
229
+
package/dist/bin.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/bin.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { t as run } from "./src-D_iY1WsL.js";
3
+ // src/bin.ts
4
+ process.exitCode = await run(process.argv.slice(2));
5
+ export {};
@@ -0,0 +1,34 @@
1
+ /** The environment variables a CLI reads its host and token from. */
2
+ interface EnvNames {
3
+ readonly host: string;
4
+ readonly token: string;
5
+ }
6
+ /** `<NAME>_HOST` and `<NAME>_TOKEN`: the program name uppercased, `-` → `_`. */
7
+ export declare function defaultEnvNames(program: string): EnvNames;
8
+ /** The process streams and environment the CLI runs with; tests pass their own. */
9
+ interface Io {
10
+ readonly stdin: NodeJS.ReadableStream & {
11
+ isTTY?: boolean;
12
+ };
13
+ readonly stdout: {
14
+ write(text: string): unknown;
15
+ isTTY?: boolean;
16
+ };
17
+ readonly stderr: {
18
+ write(text: string): unknown;
19
+ isTTY?: boolean;
20
+ };
21
+ readonly env: Readonly<Record<string, string | undefined>>;
22
+ }
23
+ export interface RunOptions {
24
+ /** The command name shown in help, e.g. a branded `tm`. Default `rungent-cli`. */
25
+ readonly program?: string;
26
+ /** The host used when no flag, environment variable or saved login names one. */
27
+ readonly host?: string;
28
+ /** Where the host and token come from in the environment. Default `<PROGRAM>_HOST`, `<PROGRAM>_TOKEN`. */
29
+ readonly env?: EnvNames;
30
+ readonly io?: Io;
31
+ }
32
+ /** Runs the CLI and answers its exit code. */
33
+ export declare function run(argv: readonly string[], options?: RunOptions): Promise<number>;
34
+ export type { EnvNames, Io };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export { n as defaultEnvNames, t as run } from "./src-D_iY1WsL.js";