{
  "id": "railway",
  "name": "Railway CLI",
  "homepage": "https://docs.railway.com/cli",
  "description": "The Railway CLI lets you interact with your Railway projects from the command line.",
  "icon": "SimpleIcons:railway",
  "executables": [
    "railway"
  ],
  "dotfiles": {
    "paths": [
      "~/.railway/config.json"
    ],
    "exclude": [
      "~/.railway/bin/"
    ],
    "secret": [],
    "side_effect": false,
    "secret_paths": [
      {
        "file": "~/.railway/config.json",
        "match": {
          "key_path": [
            "user.token",
            "user.accessToken",
            "user.refreshToken"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.railway/config.json",
        "match": {
          "key_path": [
            "projects.*.projectPath"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Railway CLI",
    "description": "Use the subcommand tabs to deploy, run a command or read logs.",
    "quality": "ai-draft",
    "base": "fig:railway",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/railway.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "up"
        ],
        "label": "Deploy",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/railway.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Path",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "detach",
            "label": "Detach from build logs",
            "type": "boolean",
            "option": [
              "--detach",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "service",
            "label": "Service",
            "type": "string",
            "option": [
              "--service",
              "-s"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "environment",
            "label": "Environment",
            "type": "string",
            "option": [
              "--environment",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "deploy",
            "label": "Deploy",
            "fields": [
              "path",
              "service",
              "detach"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "detach",
              "service",
              "environment"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run with project variables",
        "description": "Everything after the options is the local command; type it at the prompt after the form fills.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/railway.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "service",
            "label": "Service",
            "type": "string",
            "option": [
              "--service",
              "-s"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "environment",
            "label": "Environment",
            "type": "string",
            "option": [
              "--environment",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run",
            "fields": [
              "service",
              "environment"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "service",
              "environment"
            ]
          }
        ]
      },
      {
        "path": [
          "logs"
        ],
        "label": "Show logs",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/railway.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "lines",
            "label": "Number of lines",
            "type": "integer",
            "option": [
              "--lines",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "tail",
            "label": "Last lines",
            "fields": [
              "lines"
            ],
            "required": [
              "lines"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "lines"
            ]
          }
        ]
      }
    ]
  }
}
