productivity
Railway CLI for Shell Scripts
Use the Railway CLI for shell scripts with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
Railway CLI for Shell Scripts
Call integration functions from shell scripts with stable JSON input and output.
Use shell scripts for small local automations that need one or more integration calls. The Railway CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Railway CLI for Shell Scripts
kosmokrator integrations:configure railway --set access_token="$RAILWAY_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call railway.railway_list_projects '{}' --json Discovery Before Execution
Agents and scripts can inspect Railway docs and schemas before choosing a function.
kosmo integrations:docs railway --json
kosmo integrations:docs railway.railway_list_projects --json
kosmo integrations:schema railway.railway_list_projects --json
kosmo integrations:search "Railway" --json
kosmo integrations:list --json Useful Railway CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
railway.railway_list_projects | Read | none | List all Railway projects the authenticated user has access to. Returns project IDs, names, descriptions, and team info. |
railway.railway_get_project | Read | project_id | Get detailed information about a specific Railway project, including its environments and plugins. |
railway.railway_create_project | Write | name, description | Create a new Railway project with a name and optional description. |
railway.railway_list_services | Read | project_id | List all services in a Railway project. Returns service IDs, names, and repository info. |
railway.railway_get_service | Read | service_id | Get detailed information about a specific Railway service, including its source configuration and repository details. |
railway.railway_list_deployments | Read | service_id, environment_id, limit | List deployments for a Railway service. Returns deployment status, environment, and creator info. |
railway.railway_get_current_user | Read | none | Get information about the currently authenticated Railway user. Useful for verifying API credentials. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.