Use the CLI
Install the Railgrid CLI and connect to Railgrid SaaS.
The CLI is optional for console-based application and AI-agent tutorials. Use it for terminal workflows and connecting edges. For Railgrid SaaS, the ordinary path is to install the CLI, then run railgrid login without a hub URL; the plugin form is equivalent as kubectl railgrid login, and both default to https://console.railgrid.ai.
Prerequisites
Start with the Railgrid SaaS hub and a compatible CLI version. If your organization uses a self-hosted hub , ask its administrator for the hub URL and supported CLI version.
Install kubectl to use the plugin form and Kubernetes examples below.
Install the CLI
On macOS, Linux, or WSL, run the install script:
curl -fsSL https://downloads.railgrid.ai/install.sh | shIt resolves the latest release, downloads the binary for your operating system and architecture (amd64, arm64, or ppc64le), and installs it as railgrid in ~/.local/bin with no sudo. If that directory is not on your PATH, the script prints the line to add. Environment variables adjust the defaults:
| Variable | Effect |
|---|---|
RAILGRID_VERSION | Install a specific release tag instead of the latest, for example the version selected by your hub administrator. |
INSTALL_DIR | Target directory. For a system-wide install: curl -fsSL https://downloads.railgrid.ai/install.sh | INSTALL_DIR=/usr/local/bin sudo -E sh. |
RAILGRID_BASE_URL | Override the binary download base for mirrored installs. The script falls back to GitHub release assets when the primary download fails. |
Krew
If you already use Krew to manage kubectl plugins, add the Railgrid index and install the plugin:
kubectl krew index add railgrid https://github.com/railgrid/krew-index.git
kubectl krew install railgrid/railgridThis installs the executable as kubectl-railgrid, so every command runs as kubectl railgrid .... Upgrade later with kubectl krew upgrade railgrid/railgrid.
Other methods
- Binary: download the executable for your operating system from the Railgrid releases page
and put it on your
PATH. Choose the release selected by your hub administrator for self-hosted installations. - Source: use the repository build below. The current module has local SDK replacements, so use a checkout rather than
go install ...@latest.
The plugin form uses an executable named kubectl-railgrid, so kubectl railgrid and railgrid are equivalent command surfaces. A release binary can be renamed to kubectl-railgrid if you want the plugin form; use the standalone railgrid command when keeping that filename.
Build from source
Use the Go version required by the repository’s go.mod. Replace RELEASE_TAG with the release selected for your hub. Build from the repository so the local provider SDK replacement can resolve:
git clone https://github.com/railgrid/railgrid.git
cd railgrid
git checkout RELEASE_TAG
go build -o ./bin/railgrid ./cmd/railgridAdd the checkout’s bin directory to your PATH.
Verify and log in
railgrid --help
railgrid loginThe first command should list available commands. The second starts the SaaS login flow and updates your kubeconfig. For a self-hosted hub, pass its URL explicitly: railgrid login --hub-url https://hub.example.com. If you installed the plugin form, use the equivalent kubectl railgrid prefix. See authentication
for static-token hubs and credential storage.
If the command is not found, check your executable name and PATH. If login fails, verify the hub URL and authentication method with your administrator.
Next step
Select your organization and workspace , then connect a cluster or server .