env variables are empty - Hono

Hello can you help me with some small example how to work locally with env variables?
I tried c.env.API_KEY
i tried env(c)
i tried env(c, "workerd")
each combo with .dev.vars and wrangler.toml vars

Every time when wranger dev it says
(wrangler.toml)
Your worker has access to the following bindings:
or
(.dev.vars)
Using vars defined in .dev.vars
Your worker has access to the following bindings:
  • Vars:
    • COOKIE_SECRET: "(hidden)"
    • AUTH_URL: "(hidden)"
using wrangler dev, wrangler dev --local or i turned on remote mode. Same result everytime which is empty object / undefined variable when i console log it.

Any tips? checked github and hono docs. Seems like I am missing something really trivial. How are you using hono locally with env vars? Seems weird that it says Your worker has access to the following bindings but there is nothing :/
Was this page helpful?