# Command reference

Every railgrid command with its flags and examples, generated from the CLI.

Source: https://railgrid.ai/docs/reference/cli/commands/

<!-- Generated by scripts/sync-cli-docs.py from railgrid/railgrid docs/cli. Do not edit by hand; run `make sync-cli-docs`. -->

## Synopsis

railgrid connects Kubernetes clusters and Linux servers behind NAT to one
hub, and gives every team an isolated workspace with its own APIs, RBAC and
providers on top.

Typical session:

```bash
railgrid login --hub-url https://hub.example.com   # OIDC in the browser
railgrid use                                        # pick an org and workspace
railgrid edge list                                  # what is connected
railgrid connect my-cluster                         # point kubectl at an edge
railgrid ssh my-server                              # shell on a Linux edge
railgrid whoami                                     # where am I, what can I do
```

Every command talks to the hub as you, with your workspace RBAC. Run
'railgrid \<command> --help' for details and 'railgrid completion --help' for shell
completion.

## Options

```text
  -h, --help                       help for railgrid
      --insecure-skip-tls-verify   Skip TLS certificate verification when talking to the hub
      --kubeconfig string          Path to the kubeconfig file (default: $KUBECONFIG, then ~/.kube/config)
```

## See also

- [railgrid agent](https://railgrid.ai/docs/reference/cli/commands/agent/) — Run, install or upgrade the edge agent on a cluster or server
- [railgrid app](https://railgrid.ai/docs/reference/cli/commands/app/) — Manage App Studio projects: list, create, status, sync, promote, publish
- [railgrid commit](https://railgrid.ai/docs/reference/cli/commands/commit/) — Record local git commits through railgrid (code__commit_files)
- [railgrid completion](https://railgrid.ai/docs/reference/cli/commands/completion/) — Generate the autocompletion script for the specified shell
- [railgrid connect](https://railgrid.ai/docs/reference/cli/commands/connect/) — Point kubectl at a Kubernetes edge
- [railgrid dev](https://railgrid.ai/docs/reference/cli/commands/dev/) — Manage development environment for railgrid
- [railgrid disconnect](https://railgrid.ai/docs/reference/cli/commands/disconnect/) — Point kubectl back at the hub workspace
- [railgrid edge](https://railgrid.ai/docs/reference/cli/commands/edge/) — Create, list, inspect and remove edges (clusters and servers)
- [railgrid env](https://railgrid.ai/docs/reference/cli/commands/env/) — Print shell exports for calling the hub as you
- [railgrid init](https://railgrid.ai/docs/reference/cli/commands/init/) — Run a railgrid hub in-process (server side, not a client command)
- [railgrid install](https://railgrid.ai/docs/reference/cli/commands/install/) — Install the railgrid agent
- [railgrid login](https://railgrid.ai/docs/reference/cli/commands/login/) — Log in to a railgrid hub (browser OIDC flow, or a static token)
- [railgrid logout](https://railgrid.ai/docs/reference/cli/commands/logout/) — Forget the hub credentials on this machine
- [railgrid mcp](https://railgrid.ai/docs/reference/cli/commands/mcp/) — MCP endpoints for AI clients (Claude Code, Cursor, Codex)
- [railgrid org](https://railgrid.ai/docs/reference/cli/commands/org/) — Organizations you belong to, and who is in them
- [railgrid sandbox](https://railgrid.ai/docs/reference/cli/commands/sandbox/) — Drive a development-mode instance: sync, exec, logs, restart, status
- [railgrid skills](https://railgrid.ai/docs/reference/cli/commands/skills/) — Install agent skills from the railgrid repository into Claude Code and Codex
- [railgrid ssh](https://railgrid.ai/docs/reference/cli/commands/ssh/) — Open an SSH session to a Linux server edge via the hub
- [railgrid token](https://railgrid.ai/docs/reference/cli/commands/token/) — Print a bearer token for the hub (refreshing it when needed)
- [railgrid use](https://railgrid.ai/docs/reference/cli/commands/use/) — Switch the active organization and workspace
- [railgrid version](https://railgrid.ai/docs/reference/cli/commands/version/) — Print version information
- [railgrid whoami](https://railgrid.ai/docs/reference/cli/commands/whoami/) — Show who you are logged in as, and where kubectl points
- [railgrid workspace](https://railgrid.ai/docs/reference/cli/commands/workspace/) — Workspaces of an organization, and who is in them


## In this section

- [railgrid agent](https://railgrid.ai/docs/reference/cli/commands/agent/): Run, install or upgrade the edge agent on a cluster or server
- [railgrid agent install](https://railgrid.ai/docs/reference/cli/commands/agent-install/): Install railgrid agent as a systemd or launchd service
- [railgrid agent join](https://railgrid.ai/docs/reference/cli/commands/agent-join/): Persistently join an edge to the hub (installs systemd, launchd, or Kubernetes deployment)
- [railgrid agent run](https://railgrid.ai/docs/reference/cli/commands/agent-run/): Run the agent as a foreground process (for containers/dev; use 'join' for persistent install)
- [railgrid agent token](https://railgrid.ai/docs/reference/cli/commands/agent-token/): Manage agent tokens
- [railgrid agent token create](https://railgrid.ai/docs/reference/cli/commands/agent-token-create/): Create a bootstrap token for an edge
- [railgrid agent uninstall](https://railgrid.ai/docs/reference/cli/commands/agent-uninstall/): Uninstall railgrid agent systemd or launchd service
- [railgrid agent upgrade](https://railgrid.ai/docs/reference/cli/commands/agent-upgrade/): Upgrade the agent for an edge deployed via 'railgrid agent join'
- [railgrid app](https://railgrid.ai/docs/reference/cli/commands/app/): Manage App Studio projects: list, create, status, sync, promote, publish
- [railgrid app create](https://railgrid.ai/docs/reference/cli/commands/app-create/): Create a project (repository, scaffold commit and dev instance)
- [railgrid app list](https://railgrid.ai/docs/reference/cli/commands/app-list/): List App Studio projects
- [railgrid app promote](https://railgrid.ai/docs/reference/cli/commands/app-promote/): Promote the latest built commit (or --commit) to production
- [railgrid app publish](https://railgrid.ai/docs/reference/cli/commands/app-publish/): Set production visibility: public, restricted or private
- [railgrid app status](https://railgrid.ai/docs/reference/cli/commands/app-status/): Show a project's repository, commits, promotion and publishing state
- [railgrid app sync](https://railgrid.ai/docs/reference/cli/commands/app-sync/): Load the repository into the project workspace and sync it to <name>-dev
- [railgrid commit](https://railgrid.ai/docs/reference/cli/commands/commit/): Record local git commits through railgrid (code__commit_files)
- [railgrid completion](https://railgrid.ai/docs/reference/cli/commands/completion/): Generate the autocompletion script for the specified shell
- [railgrid completion bash](https://railgrid.ai/docs/reference/cli/commands/completion-bash/): Generate the autocompletion script for bash
- [railgrid completion fish](https://railgrid.ai/docs/reference/cli/commands/completion-fish/): Generate the autocompletion script for fish
- [railgrid completion powershell](https://railgrid.ai/docs/reference/cli/commands/completion-powershell/): Generate the autocompletion script for powershell
- [railgrid completion zsh](https://railgrid.ai/docs/reference/cli/commands/completion-zsh/): Generate the autocompletion script for zsh
- [railgrid connect](https://railgrid.ai/docs/reference/cli/commands/connect/): Point kubectl at a Kubernetes edge
- [railgrid dev](https://railgrid.ai/docs/reference/cli/commands/dev/): Manage development environment for railgrid
- [railgrid dev delete](https://railgrid.ai/docs/reference/cli/commands/dev-delete/): Delete development environment
- [railgrid dev init](https://railgrid.ai/docs/reference/cli/commands/dev-init/): Initialize a local railgrid environment (one kind cluster: hub, providers and an edge)
- [railgrid dev update](https://railgrid.ai/docs/reference/cli/commands/dev-update/): Upgrade the railgrid-hub release on an existing local environment
- [railgrid disconnect](https://railgrid.ai/docs/reference/cli/commands/disconnect/): Point kubectl back at the hub workspace
- [railgrid edge](https://railgrid.ai/docs/reference/cli/commands/edge/): Create, list, inspect and remove edges (clusters and servers)
- [railgrid edge create](https://railgrid.ai/docs/reference/cli/commands/edge-create/): Create an edge and print its join command
- [railgrid edge delete](https://railgrid.ai/docs/reference/cli/commands/edge-delete/): Delete an edge (the agent on it loses hub access)
- [railgrid edge get](https://railgrid.ai/docs/reference/cli/commands/edge-get/): Show an edge's connection status and details
- [railgrid edge join-command](https://railgrid.ai/docs/reference/cli/commands/edge-join-command/): Print the agent join command for an edge
- [railgrid edge kubeconfig](https://railgrid.ai/docs/reference/cli/commands/edge-kubeconfig/): Print or merge a kubeconfig for a Kubernetes edge
- [railgrid edge list](https://railgrid.ai/docs/reference/cli/commands/edge-list/): List edges
- [railgrid edge upgrade](https://railgrid.ai/docs/reference/cli/commands/edge-upgrade/): Print upgrade instructions for an edge agent
- [railgrid env](https://railgrid.ai/docs/reference/cli/commands/env/): Print shell exports for calling the hub as you
- [railgrid init](https://railgrid.ai/docs/reference/cli/commands/init/): Run a railgrid hub in-process (server side, not a client command)
- [railgrid install](https://railgrid.ai/docs/reference/cli/commands/install/): Install the railgrid agent
- [railgrid login](https://railgrid.ai/docs/reference/cli/commands/login/): Log in to a railgrid hub (browser OIDC flow, or a static token)
- [railgrid logout](https://railgrid.ai/docs/reference/cli/commands/logout/): Forget the hub credentials on this machine
- [railgrid mcp](https://railgrid.ai/docs/reference/cli/commands/mcp/): MCP endpoints for AI clients (Claude Code, Cursor, Codex)
- [railgrid mcp claude](https://railgrid.ai/docs/reference/cli/commands/mcp-claude/): Add the workspace MCP server to Claude Code
- [railgrid mcp codex](https://railgrid.ai/docs/reference/cli/commands/mcp-codex/): Add the workspace MCP server to Codex
- [railgrid mcp proxy](https://railgrid.ai/docs/reference/cli/commands/mcp-proxy/): Serve the workspace MCP endpoint over stdio, authenticated as you
- [railgrid mcp url](https://railgrid.ai/docs/reference/cli/commands/mcp-url/): Print the MCP endpoint URL
- [railgrid org](https://railgrid.ai/docs/reference/cli/commands/org/): Organizations you belong to, and who is in them
- [railgrid org create](https://railgrid.ai/docs/reference/cli/commands/org-create/): Create an organization (you become its admin)
- [railgrid org list](https://railgrid.ai/docs/reference/cli/commands/org-list/): List the organizations you belong to
- [railgrid org members](https://railgrid.ai/docs/reference/cli/commands/org-members/): List and change who has access to the organization
- [railgrid org members add](https://railgrid.ai/docs/reference/cli/commands/org-members-add/): Add a member to the organization (admin only)
- [railgrid org members list](https://railgrid.ai/docs/reference/cli/commands/org-members-list/): List organization members
- [railgrid org members remove](https://railgrid.ai/docs/reference/cli/commands/org-members-remove/): Remove a member from the organization (admin only)
- [railgrid org members set-role](https://railgrid.ai/docs/reference/cli/commands/org-members-set-role/): Change a member's role in the organization (admin only)
- [railgrid sandbox](https://railgrid.ai/docs/reference/cli/commands/sandbox/): Drive a development-mode instance: sync, exec, logs, restart, status
- [railgrid sandbox env](https://railgrid.ai/docs/reference/cli/commands/sandbox-env/): Set environment variables on the component's running dev process
- [railgrid sandbox exec](https://railgrid.ai/docs/reference/cli/commands/sandbox-exec/): Run a command in the component and exit with its exit code
- [railgrid sandbox logs](https://railgrid.ai/docs/reference/cli/commands/sandbox-logs/): Print the dev process log
- [railgrid sandbox restart](https://railgrid.ai/docs/reference/cli/commands/sandbox-restart/): Restart the component's dev process
- [railgrid sandbox status](https://railgrid.ai/docs/reference/cli/commands/sandbox-status/): Show the instance status, or a component's process state
- [railgrid sandbox sync](https://railgrid.ai/docs/reference/cli/commands/sandbox-sync/): Push a directory into the component workspace (authoritative)
- [railgrid skills](https://railgrid.ai/docs/reference/cli/commands/skills/): Install agent skills from the railgrid repository into Claude Code and Codex
- [railgrid skills install](https://railgrid.ai/docs/reference/cli/commands/skills-install/): Install skills for Claude Code and Codex (all skills by default)
- [railgrid skills list](https://railgrid.ai/docs/reference/cli/commands/skills-list/): List the skills available in the repository
- [railgrid ssh](https://railgrid.ai/docs/reference/cli/commands/ssh/): Open an SSH session to a Linux server edge via the hub
- [railgrid token](https://railgrid.ai/docs/reference/cli/commands/token/): Print a bearer token for the hub (refreshing it when needed)
- [railgrid use](https://railgrid.ai/docs/reference/cli/commands/use/): Switch the active organization and workspace
- [railgrid version](https://railgrid.ai/docs/reference/cli/commands/version/): Print version information
- [railgrid whoami](https://railgrid.ai/docs/reference/cli/commands/whoami/): Show who you are logged in as, and where kubectl points
- [railgrid workspace](https://railgrid.ai/docs/reference/cli/commands/workspace/): Workspaces of an organization, and who is in them
- [railgrid workspace create](https://railgrid.ai/docs/reference/cli/commands/workspace-create/): Create a workspace in an organization
- [railgrid workspace list](https://railgrid.ai/docs/reference/cli/commands/workspace-list/): List the workspaces of an organization
- [railgrid workspace members](https://railgrid.ai/docs/reference/cli/commands/workspace-members/): List and change who has access to the workspace
- [railgrid workspace members add](https://railgrid.ai/docs/reference/cli/commands/workspace-members-add/): Add a member to the workspace (admin only)
- [railgrid workspace members list](https://railgrid.ai/docs/reference/cli/commands/workspace-members-list/): List workspace members
- [railgrid workspace members remove](https://railgrid.ai/docs/reference/cli/commands/workspace-members-remove/): Remove a member from the workspace (admin only)
- [railgrid workspace members set-role](https://railgrid.ai/docs/reference/cli/commands/workspace-members-set-role/): Change a member's role in the workspace (admin only)