You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been thinking it would be nice for the CLI to be able to cache environment variables.
The use case I'm thinking of here is CLI usage without internet or during a Railway outage. I know this presents a certain security risk but if you're already logged in to the CLI and someone gains physical access to your machine it's already game over. (Could also make offline access/caching opt-in only)
Example:
railway login && railway link -> link to a project
railway run pnpm dev -> runs as expected, pulling context from environment variables set in the project
oh great heavens internet pooped
railway run pnpm dev -> runs as expected, pulling context from last known environment variables set in the project
The text was updated successfully, but these errors were encountered:
I have to wonder, how would caching work? I'm assuming that there would need to be a timestamp saved in the local cache and some kind of extra endpoint for checking if the environment variables on apiv2 have changed since the last time you got them. Or hash cached variables on client side to match against server side hash?
Either way I can't really think of how to do it without checking the backend every time, unless the offline would just act as a fallback, working only if the api call fails.
note: I am working on POC for second idea now that I've had it lol
I've been thinking it would be nice for the CLI to be able to cache environment variables.
The use case I'm thinking of here is CLI usage without internet or during a Railway outage. I know this presents a certain security risk but if you're already logged in to the CLI and someone gains physical access to your machine it's already game over. (Could also make offline access/caching opt-in only)
Example:
railway login && railway link
-> link to a projectrailway run pnpm dev
-> runs as expected, pulling context from environment variables set in the projectoh great heavens internet pooped
railway run pnpm dev
-> runs as expected, pulling context from last known environment variables set in the projectThe text was updated successfully, but these errors were encountered: