railway init
Create a new Railway project and link it to the current directory.
Usage
railway init [OPTIONS]Aliases
railway new
Options
| Flag | Description |
|---|---|
-n, --name <NAME> | Project name (randomly generated if not provided) |
-w, --workspace <ID|NAME> | Workspace to create the project in |
--json | Output in JSON format |
Examples
Interactive project creation
railway initPrompts you to select a workspace and enter a project name.
Create with specific name
railway init --name my-apiCreate in specific workspace
railway init --name my-api --workspace "My Team"Non-interactive (CI/CD)
railway init --name my-api --workspace my-team-id --jsonOutput
After creation, the project is automatically linked to your current directory. You can start deploying with railway up.