Skip to content
Railgrid Docs
Sections
Open console

Enter a topic to search documentation.

    CLI Reference

    Every Railgrid CLI command — authentication, organizations, edges, agents, SSH, MCP, skills.

    The railgrid CLI is a kubectl plugin (when installed via krew, it’s kubectl railgrid; the standalone binary just drops the kubectl prefix). All commands below use the kubectl railgrid form.

    Global flags

    FlagDescription
    --kubeconfig <path>Path to the kubeconfig to read and write. Defaults to $KUBECONFIG or ~/.kube/config.

    That’s the only global flag. Everything else (--hub-url, --token, --insecure-skip-tls-verify, …) lives on the individual commands that need it. Login always writes to a kubeconfig context named railgrid.

    Command summary

    CommandWhat it does
    loginAuthenticate with the hub (OIDC browser flow or static token).
    useSwitch the active organization and workspace (interactive picker or flags).
    connect <edge>Point your kubeconfig at an edge cluster; connect : returns to the hub root.
    edge create <name>Register a new edge and print the agent join guide.
    edge listList all edges with type, phase, and connection status (list/ls also work top-level).
    edge get <name>Show details for a specific edge.
    edge join-command <name>Re-print the agent install guide with the join token.
    edge upgrade <name>Show upgrade instructions when the agent version is behind the CLI.
    edge delete <name>Remove an edge.
    kubeconfig edge <name>Generate a kubeconfig that proxies kubectl through the hub.
    agent ...Run, install, and upgrade the edge agent (run, join, install, uninstall, upgrade).
    installOne-shot agent install (systemd unit or Kubernetes manifests) from a join token.
    ssh <name>Open an SSH session (or run a single command) on a server-type edge.
    mcp urlPrint an MCP endpoint for AI agents (--mcpserver-name aggregate or --edge per-edge).
    skills installInstall the Railgrid skill for Claude Code and Codex from the Railgrid repository (skills list shows what is available).
    apply -f <file>Apply a Railgrid resource from a YAML file.
    get <resource>List edges, workloads, or placements in the current workspace.
    versionPrint CLI version, commit, build date, and platform.
    dev init / dev update / dev deleteCreate, upgrade, or tear down a local kind-based dev hub (init has alias create).
    initRun an in-process Railgrid hub (server bootstrap — for development, not the CLI workflow).

    Pick a command from the sidebar for the guides above, or open the generated command reference for every command with its exact flags and examples.