Read env.variable outside root?

Hi,
Is there a way to read env.variable outside root?
I have variable in frontity.settings.js :

const settings = {
  name: "frontity",
  state: {
    frontity: {
      url: "https://---",
       ...
    },
    env: {
      // All environment variables should be added here.
      // Can be accessed in components using state.env.VARIABLE_NAME
      API_URL: process.env.API,
    },
  },

I can read API_URL inside root file like state.env.API_URL … but is there a way to do it outside?
Thanks for suggestions.