Set service variables using the cli

It looks like the railway variables set command was removed (https://github.com/railwayapp/cli/pull/304) is there a way to set variables via the cli at this point?
GitHub
Migrate to CLI v3 by nebulatgs · Pull Request #304 · railwayapp/cli
The repository tracking changes can be found at https://github.com/railwayapp/cliv3 Summary of Changes Migrate to using Rust with Clap for CLI args Use the v2 Public API Support for railway servic...
7 Replies
Percy
Percy10mo ago
Project ID: N/A
Brody
Brody10mo ago
there isn't anymore, would you mind sharing your usecase?
iloveitaly
iloveitalyOP10mo ago
@Brody I'd like to have an encrypted secrets file (SECRET=NAME) and be able to programatically update the server vars from that file. Similar to heroku config:set i.e. configuring the server via UI allows for all sorts of mistakes and doesn't encode the process in code so other eng can replicate / rererun
Brody
Brody10mo ago
the original command that let you do that was never dealing with a physical file, it was just calling the api to add variables to your service on railway. that functionality alone is easy enough to implement and I'm sure if someone wrote a pr for it the team would merge it. but for others to replicate your project with the exact same set of variables you would want to create a template!
iloveitaly
iloveitalyOP10mo ago
Yeah, not interested in a physical file—want to pipe shell vars into stdin and have railway variables set update the prod config. https://docs.railway.app/guides/manage-variables looks like The Way. Didn't realize there was a public api. awesome.
Railway Docs
Manage Variables with the Public API | Railway Docs
Documentation for Railway
iloveitaly
iloveitalyOP10mo ago
cf14aa29-3b66-4444-88c0-9a957991682d
Brody
Brody10mo ago
oh yeah forgot to mention that, my bad
Want results from more Discord servers?
Add your server