R
Railway13mo ago
ohhmaar

Create new environment from CLI?

Can I create ephemeral environments from the CLI?
14 Replies
Percy
Percy13mo ago
Project ID: N/A
ohhmaar
ohhmaar13mo ago
N/A
Brody
Brody13mo ago
nope
railway --help

Interact with Railway via CLI

Usage: railway [OPTIONS] <COMMAND>

Commands:
add Add a new plugin to your project
completion Generate completion script
connect Connect to a plugin's shell (psql for Postgres, mongosh for MongoDB, etc.)
delete Delete plugins from a project
domain Generates a domain for a service if there is not a railway provided domain
docs Open Railway Documentation in default browser
down Remove the most recent deployment
environment Change the active environment
init Create a new project
link Associate existing project with current directory, may specify projectId as an argument
list List all projects in your Railway account
login Login to your Railway account
logout Logout of your Railway account
logs View the most-recent deploy's logs
open Open your project dashboard
run Run a local command using variables from the active environment
service Link a service to the current project
shell Open a subshell with Railway variables available
status Show information about the current project
unlink Disassociate project from current directory
up Upload and deploy project from the current directory
variables Show variables for active environment
whoami Get the current logged in user
help Print this message or the help of the given subcommand(s)

Options:
--json Output in JSON format
-h, --help Print help
-V, --version Print version
railway --help

Interact with Railway via CLI

Usage: railway [OPTIONS] <COMMAND>

Commands:
add Add a new plugin to your project
completion Generate completion script
connect Connect to a plugin's shell (psql for Postgres, mongosh for MongoDB, etc.)
delete Delete plugins from a project
domain Generates a domain for a service if there is not a railway provided domain
docs Open Railway Documentation in default browser
down Remove the most recent deployment
environment Change the active environment
init Create a new project
link Associate existing project with current directory, may specify projectId as an argument
list List all projects in your Railway account
login Login to your Railway account
logout Logout of your Railway account
logs View the most-recent deploy's logs
open Open your project dashboard
run Run a local command using variables from the active environment
service Link a service to the current project
shell Open a subshell with Railway variables available
status Show information about the current project
unlink Disassociate project from current directory
up Upload and deploy project from the current directory
variables Show variables for active environment
whoami Get the current logged in user
help Print this message or the help of the given subcommand(s)

Options:
--json Output in JSON format
-h, --help Print help
-V, --version Print version
ohhmaar
ohhmaar13mo ago
The railway-app bot in github comments on PRs and provides the URL of your new domain like so
ohhmaar
ohhmaar13mo ago
Do you know if this can be captured in anyway?
Brody
Brody13mo ago
i do not, sorry
ohhmaar
ohhmaar13mo ago
Hmm. Do you know if the APIs expose this information? Because railway does generate a new environment + domain on new PR triggers, so functionality is there.
Brody
Brody13mo ago
i dont know off the top of my head, but you can view the api playground here https://railway.app/graphiql
ohhmaar
ohhmaar13mo ago
Looks like theres something here
ohhmaar
ohhmaar13mo ago
Would be nice if this got integrated via CLI.
Brody
Brody13mo ago
you're welcome to open a pr for that
Adam
Adam13mo ago
'`]
Brody
Brody13mo ago
you good?
Adam
Adam13mo ago
no