@rungent/cli
v0.12.4
Published
The command line of any rungent host: log in, list the host's commands and run them. Branded CLIs import `run`.
Readme
@rungent/cli
The command line of any rungent host. Its commands come from the host's MCP tools at run time, so they always match what your account may do. It has no dependencies.
npx @rungent/cli login https://console.example.com # asks for the token; or --token-stdin < token.txt
npx @rungent/cli tools # every command the host offers you
npx @rungent/cli search "gpu box" # search everything you can see in the product
npx @rungent/cli vm stop vm-42 --forced # a host command; writes ask for confirmation (--yes)Installed with npm i -g @rungent/cli, the command is rungent-cli. The host is --host, else
$RUNGENT_CLI_HOST, else the last host logged in to; the token is $RUNGENT_CLI_TOKEN, else the one
login saved (~/.config/rungent/hosts.json, 0600). No command prints a token. A host command of
the same name as a built-in (login, logout, status, tools) wins; rungent:<name> always
runs the built-in. Output is JSON on stdout; exit codes: 0 ok, 1 tool error, 2 usage, 3 auth,
4 network. Every command takes --help.
A branded CLI
A product's own command (acme) is a few lines over run; npx rungent brand writes the package.
import { run } from '@rungent/cli';
process.exitCode = await run(process.argv.slice(2), {
program: 'acme',
host: 'https://console.example.com', // optional preset
env: { host: 'ACME_HOST', token: 'ACME_TOKEN' }, // default <PROGRAM>_HOST, <PROGRAM>_TOKEN
});License: Apache-2.0.
