CLI API Reference

The following commands are available in the CLI


Connect to an existing project or create a new one

Running init with no project ID will bring a menu that allows you to create a new project, or select an existing project.


Run a command inside of the Railway environment.

This injects all environment variables associated with the plugins you have install in your project.


Change which environment you are using. View environment docs for more information.


View the status of your Railway project and user.


View all the environment variables associated with your project and environment.


Open your current Railway project in the browser.


Login to your Railway account.

This will open the browser to


If you are in an environment where the terminal cannot open a web browser, (i.e. SSH session or Codespaces), you can perform a browserless login.

This will prompt you to go to a URL (you can copy and paste) and present you with a 4 word code that you need to verify. If the codes match, click "Verify" and you will be logged in


Logout of your Railway account.


View what user is currently authenticated with Railway


Deploy the current directory to your Railway project. The currently selected environment is used.

Edit this file on GitHub