Create new environment from CLI?

Can I create ephemeral environments from the CLI?
14 Replies
Percy
Percy2y ago
Project ID: N/A
ohhmaar
ohhmaarOP2y ago
N/A
Brody
Brody2y 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
ohhmaarOP2y ago
The railway-app bot in github comments on PRs and provides the URL of your new domain like so
ohhmaar
ohhmaarOP2y ago
Do you know if this can be captured in anyway?
Brody
Brody2y ago
i do not, sorry
ohhmaar
ohhmaarOP2y 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
Brody2y ago
i dont know off the top of my head, but you can view the api playground here https://railway.app/graphiql
ohhmaar
ohhmaarOP2y ago
Looks like theres something here
ohhmaar
ohhmaarOP2y ago
Would be nice if this got integrated via CLI.
Brody
Brody2y ago
you're welcome to open a pr for that
Adam
Adam2y ago
'`]
Brody
Brody2y ago
you good?
Adam
Adam2y ago
no
Want results from more Discord servers?
Add your server