Contact
Skip to the page text

Documentation / Guides / Automation

The command line (onprem-ai-ctl)

onprem-ai-ctl is the control plane's command line. It is installed and updated with the control plane, at /usr/local/bin/onprem-ai-ctl. It has three groups of commands, by where they run.

onprem-ai-ctl --help shows the commands, and onprem-ai-ctl COMMAND --help explains one.

On the control plane's machine, as root

These commands work on the control plane installed on this machine. They work also when the control plane does not run and its pages cannot be reached.

CommandWhat it does
sudo onprem-ai-ctl statusThe installed release, whether it is kept running or stopped, every service's state, and the automatic repairs of the last 24 hours. --json for scripts
sudo onprem-ai-ctl startStarts the installed release and keeps it running, also after a reboot. Downloads nothing
sudo onprem-ai-ctl stopStops it and keeps it stopped, also after a reboot, until start. Removes nothing
sudo onprem-ai-ctl restartstop, then start
sudo onprem-ai-ctl doctorChecks the control plane here and names the next step for each finding: the release, the container engine, the secrets, whether it is kept running, and every service
sudo onprem-ai-ctl installInstalls or repairs the control plane, keeping the data
sudo onprem-ai-ctl updateUpdates it, as the Updates page does, when the page cannot be reached
sudo onprem-ai-ctl update --dry-runSays which release the next update would take and changes nothing (--json for a program)
sudo onprem-ai-ctl uninstallRemoves it, keeping the data (below)
sudo onprem-ai-ctl uninstall --remove-dataRemoves it with all of its data. It cannot be undone (see Installing and updating the control plane, Removing the control plane)
sudo onprem-ai-ctl applyApplies the config file /etc/onprem-ai/control-plane/config.env after you changed it. --dry-run shows what would change and changes nothing
sudo onprem-ai-ctl join-tokenA join token for an inference node on this same machine
sudo onprem-ai-ctl recovery sign-in-link --username NAMEA recovery link for a lost password or when nobody can sign in: it sets a new password, or signs in once (see Single sign-on, Getting back in)
sudo onprem-ai-ctl recovery show-sign-inShows the sign-in settings in effect, where each one comes from, and the administrators (see Single sign-on)
sudo onprem-ai-ctl api-key create --bypass-sign-in (--username NAME | --create-administrator NAME) --name KEY_NAMEMakes a control plane API key without signing in, for a deployment that is provisioned with nobody at the browser (see Secrets)

The pages of the control plane update it too (the Updates page). Use the commands when the pages cannot be reached, or to install.

From any machine, as you

These commands act on a control plane through the address you open its pages at, with a control plane API key. Copy the program from the control plane's machine to the machine you want to run it on.

CommandWhat it does
onprem-ai-ctl login ADDRESSAsks for a control plane API key one time, checks it, and stores the address and the key in ~/.config/onprem-ai/control-plane.json, readable only by you. --control-plane-ca-file PATH names the control plane's root CA
onprem-ai-ctl logoutRemoves the stored sign-in. The key keeps working until you revoke it under Settings → MCP access
onprem-ai-ctl api METHOD PATHSends any route of the control plane's HTTP API with the stored sign-in and prints the answer. --data JSON, --data @FILE or --data - gives the request body
onprem-ai-ctl login 10.0.4.10:3443
onprem-ai-ctl api GET /api/v1/inference-nodes/list
onprem-ai-ctl api POST /api/v1/inference-services/undeploy --data '{"inference_service_id": "..."}'

api is one command for every operation: everything the pages do is possible from a shell, within the key's scopes. API Reference lists the operations and their paths. How to create a key, and the other two ways in (the HTTP API and the MCP endpoint): Automation via APIs and CLI.

On an inference node, ADDRESS defaults to the control plane that the node is connected to. That machine's network may allow only the inference port; then run these commands from the machine you open the pages on.

About the program itself

CommandWhat it does
onprem-ai-ctl versionThe release version. --build also shows the exact build
onprem-ai-ctl error-reports listThe error reports this program wrote about its own failures. They are not the control plane's error reports
onprem-ai-ctl error-reports export ERROR_REPORT_ID [DESTINATION]Writes one of them into a file for support

When onprem-ai-ctl fails because of a defect in it, it writes an error report: the error and its stack trace, with keys, passwords and signed addresses removed. The error line names the report's id. When you are signed in, the report is also sent to that control plane and listed there under Error reports.

Exit codes

0: done. 1: the command failed, and the output says why. 2: the command line was not understood.

Found a mistake, or is something missing? Suggest an improvement to this page on GitHub.

Platform release 5.10.4, . Source of this page at v5.10.4. This page as Markdown.